001/*
002 *    GeoAPI - Java interfaces for OGC/ISO standards
003 *    http://www.geoapi.org
004 *
005 *    Copyright (C) 2011-2019 Open Geospatial Consortium, Inc.
006 *    All Rights Reserved. http://www.opengeospatial.org/ogc/legal
007 *
008 *    Permission to use, copy, and modify this software and its documentation, with
009 *    or without modification, for any purpose and without fee or royalty is hereby
010 *    granted, provided that you include the following on ALL copies of the software
011 *    and documentation or portions thereof, including modifications, that you make:
012 *
013 *    1. The full text of this NOTICE in a location viewable to users of the
014 *       redistributed or derivative work.
015 *    2. Notice of any changes or modifications to the OGC files, including the
016 *       date changes were made.
017 *
018 *    THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE
019 *    NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
020 *    TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT
021 *    THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY
022 *    PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
023 *
024 *    COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
025 *    CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
026 *
027 *    The name and trademarks of copyright holders may NOT be used in advertising or
028 *    publicity pertaining to the software without specific, written prior permission.
029 *    Title to copyright in this software and any associated documentation will at all
030 *    times remain with copyright holders.
031 */
032package org.opengis.test.referencing.gigs;
033
034import java.util.List;
035
036import org.opengis.util.Factory;
037import org.opengis.util.FactoryException;
038import org.opengis.util.NoSuchIdentifierException;
039import org.opengis.referencing.operation.Transformation;
040import org.opengis.referencing.operation.CoordinateOperation;
041import org.opengis.referencing.operation.CoordinateOperationAuthorityFactory;
042import org.opengis.referencing.operation.OperationMethod;
043import org.opengis.test.Configuration;
044import org.opengis.test.FactoryFilter;
045
046import org.junit.Test;
047import org.junit.runner.RunWith;
048import org.junit.runners.Parameterized;
049
050import static org.junit.Assume.*;
051import static org.opengis.test.Assert.*;
052
053
054/**
055 * Verifies reference coordinate transformations bundled with the geoscience software.
056 *
057 * <table class="gigs" summary="Test description"><tr>
058 *   <th>Test method:</th>
059 *   <td>Compare transformation definitions included in the software against the EPSG Dataset.</td>
060 * </tr><tr>
061 *   <th>Test data:</th>
062 *   <td><a href="doc-files/GIGS_2007_libGeodTfm.csv">{@code GIGS_2007_libGeodTfm.csv}</a>
063 *       and EPSG Dataset.</td>
064 * </tr><tr>
065 *   <th>Tested API:</th>
066 *   <td>{@link CoordinateOperationAuthorityFactory#createCoordinateOperation(String)}.</td>
067 * </tr><tr>
068 *   <th>Expected result:</th>
069 *   <td>Transformation definitions bundled with the software should have the same name, method name,
070 *       defining parameters and parameter values as in EPSG Dataset. The values of the parameters should
071 *       be correct to at least 10 significant figures. Transformations missing from the software or at
072 *       variance with those in the EPSG Dataset should be reported.</td>
073 * </tr></table>
074 *
075 *
076 * <div class="note"><b>Usage example:</b>
077 * in order to specify their factories and run the tests in a JUnit framework, implementors can
078 * define a subclass in their own test suite as in the example below:
079 *
080 * <blockquote><pre>import org.junit.runner.RunWith;
081 *import org.junit.runners.JUnit4;
082 *import org.opengis.test.referencing.gigs.GIGS2007;
083 *
084 *&#64;RunWith(JUnit4.class)
085 *public class MyTest extends GIGS2007 {
086 *    public MyTest() {
087 *        super(new MyCoordinateOperationAuthorityFactory());
088 *    }
089 *}</pre></blockquote>
090 * </div>
091 *
092 * @author  GIGS (IOGP)
093 * @author  Martin Desruisseaux (Geomatys)
094 * @author  Alexis Manin (Geomatys)
095 * @version 3.1
096 * @since   3.1
097 */
098@RunWith(Parameterized.class)
099public strictfp class GIGS2007 extends AuthorityFactoryTestCase<Transformation> {
100    /**
101     * Name of the expected transformation method.
102     */
103    public String methodName;
104
105    /**
106     * The coordinate transformation created by the factory,
107     * or {@code null} if not yet created or if CRS creation failed.
108     *
109     * @see #copAuthorityFactory
110     */
111    private Transformation transformation;
112
113    /**
114     * Factory to use for building {@link Transformation} instances, or {@code null} if none.
115     * This is the factory used by the {@link #getIdentifiedObject()} method.
116     */
117    protected final CoordinateOperationAuthorityFactory copAuthorityFactory;
118
119    /**
120     * Returns a default set of factories to use for running the tests. Those factories are given
121     * in arguments to the constructor when this test class is instantiated directly by JUnit (for
122     * example as a {@linkplain org.junit.runners.Suite.SuiteClasses suite} element), instead than
123     * subclassed by the implementor. The factories are fetched as documented in the
124     * {@link #factories(Class[])} javadoc.
125     *
126     * @return the default set of arguments to be given to the {@code GIGS2007} constructor.
127     */
128    @Parameterized.Parameters
129    @SuppressWarnings("unchecked")
130    public static List<Factory[]> factories() {
131        return factories(FactoryFilter.ByAuthority.EPSG, CoordinateOperationAuthorityFactory.class);
132    }
133
134    /**
135     * Creates a new test using the given factory. If a given factory is {@code null},
136     * then the tests which depend on it will be skipped.
137     *
138     * @param copFactory  factory for creating {@link Transformation} instances.
139     */
140    public GIGS2007(final CoordinateOperationAuthorityFactory copFactory) {
141        super(copFactory);
142        copAuthorityFactory = copFactory;
143    }
144
145    /**
146     * Returns information about the configuration of the test which has been run.
147     * This method returns a map containing:
148     *
149     * <ul>
150     *   <li>All the following values associated to the {@link org.opengis.test.Configuration.Key} of the same name:
151     *     <ul>
152     *       <li>{@link #isStandardNameSupported}</li>
153     *       <li>{@link #isStandardAliasSupported}</li>
154     *       <li>{@link #isDependencyIdentificationSupported}</li>
155     *       <li>{@link #copAuthorityFactory}</li>
156     *     </ul>
157     *   </li>
158     * </ul>
159     *
160     * @return the configuration of the test being run.
161     */
162    @Override
163    public Configuration configuration() {
164        final Configuration op = super.configuration();
165        assertNull(op.put(Configuration.Key.copAuthorityFactory, copAuthorityFactory));
166        return op;
167    }
168
169    /**
170     * Returns the transformation instance to be tested. When this method is invoked for the first time, it creates the
171     * transformation to test by invoking the {@link CoordinateOperationAuthorityFactory#createCoordinateOperation(String)}
172     * method with the current {@link #code} value in argument. The created object is then cached and returned in all
173     * subsequent invocations of this method.
174     *
175     * @return the transformation instance to test.
176     * @throws FactoryException if an error occurred while creating the transformation instance.
177     */
178    @Override
179    public Transformation getIdentifiedObject() throws FactoryException {
180        if (transformation == null) {
181            assumeNotNull(copAuthorityFactory);
182            final String codeAsString = String.valueOf(code);
183            final CoordinateOperation operation;
184            try {
185                operation = copAuthorityFactory.createCoordinateOperation(codeAsString);
186            } catch (NoSuchIdentifierException e) {
187                /*
188                 * Relaxed the exception type from NoSuchAuthorityCodeException because CoordinateOperation creation
189                 * will typically use MathTransformFactory under the hood, which throws NoSuchIdentifierException for
190                 * non-implemented operation methods (may be identified by their name rather than EPSG code).
191                 */
192                unsupportedCode(Transformation.class, code);
193                throw e;
194            }
195            if (operation != null) {                        // For consistency with the behavior in other classes.
196                assertInstanceOf(codeAsString, Transformation.class, operation);
197                transformation = (Transformation) operation;
198            }
199        }
200        return transformation;
201    }
202
203    /**
204     * Verifies the properties of the transformation given by {@link #getIdentifiedObject()}.
205     */
206    private void verifyTransformation() throws FactoryException {
207        final Transformation transformation = getIdentifiedObject();
208        assertNotNull("Transformation", transformation);
209        validators.validate(transformation);
210
211        // Transformation identifier.
212        assertContainsCode("Transformation.getIdentifiers()", "EPSG", code, transformation.getIdentifiers());
213
214        // Transformation name.
215        if (isStandardNameSupported) {
216            configurationTip = Configuration.Key.isStandardNameSupported;
217            assertEquals("Transformation.getName()", name, getVerifiableName(transformation));
218            configurationTip = null;
219        }
220
221        // Operation method.
222        final OperationMethod m = transformation.getMethod();
223        assertNotNull("Transformation.getMethod()", m);
224
225        // Operation method name.
226        if (isStandardNameSupported) {
227            configurationTip = Configuration.Key.isStandardNameSupported;
228            assertEquals("Transformation.getMethod().getName()", methodName, getVerifiableName(m));
229            configurationTip = null;
230        }
231    }
232
233    /**
234     * Tests “AGD66 to GDA94 (11)” transformation creation from the factory.
235     *
236     * <ul>
237     *   <li>EPSG transformation code: <b>1803</b></li>
238     *   <li>EPSG transformation name: <b>AGD66 to GDA94 (11)</b></li>
239     *   <li>Transformation method: <b>NTv2</b></li>
240     *   <li>Particularly important to E&amp;P industry.</li>
241     * </ul>
242     *
243     * @throws FactoryException if an error occurred while creating the transformation from the EPSG code.
244     */
245    @Test
246    public void testAGD66_to_GDA94() throws FactoryException {
247        important = true;
248        name       = "AGD66 to GDA94 (11)";
249        methodName = "NTv2";
250        verifyTransformation();
251    }
252
253    /**
254     * Tests “AGD66 to WGS 84 (17)” transformation creation from the factory.
255     *
256     * <ul>
257     *   <li>EPSG transformation code: <b>15786</b></li>
258     *   <li>EPSG transformation name: <b>AGD66 to WGS 84 (17)</b></li>
259     *   <li>Transformation method: <b>NTv2</b></li>
260     *   <li>Specific usage / Remarks: <b>EPSG copy of 1803.</b></li>
261     *   <li>Particularly important to E&amp;P industry.</li>
262     * </ul>
263     *
264     * @throws FactoryException if an error occurred while creating the transformation from the EPSG code.
265     */
266    @Test
267    public void testAGD66_to_WGS84() throws FactoryException {
268        important = true;
269        name       = "AGD66 to WGS 84 (17)";
270        methodName = "NTv2";
271        verifyTransformation();
272    }
273
274    /**
275     * Tests “AGD84 to GDA94 (5)” transformation creation from the factory.
276     *
277     * <ul>
278     *   <li>EPSG transformation code: <b>1804</b></li>
279     *   <li>EPSG transformation name: <b>AGD84 to GDA94 (5)</b></li>
280     *   <li>Transformation method: <b>NTv2</b></li>
281     *   <li>Particularly important to E&amp;P industry.</li>
282     * </ul>
283     *
284     * @throws FactoryException if an error occurred while creating the transformation from the EPSG code.
285     */
286    @Test
287    public void testAGD84_to_GDA94() throws FactoryException {
288        important = true;
289        name       = "AGD84 to GDA94 (5)";
290        methodName = "NTv2";
291        verifyTransformation();
292    }
293
294    /**
295     * Tests “AGD84 to WGS 84 (9)” transformation creation from the factory.
296     *
297     * <ul>
298     *   <li>EPSG transformation code: <b>15785</b></li>
299     *   <li>EPSG transformation name: <b>AGD84 to WGS 84 (9)</b></li>
300     *   <li>Transformation method: <b>NTv2</b></li>
301     *   <li>Specific usage / Remarks: <b>EPSG copy of 1804.</b></li>
302     *   <li>Particularly important to E&amp;P industry.</li>
303     * </ul>
304     *
305     * @throws FactoryException if an error occurred while creating the transformation from the EPSG code.
306     */
307    @Test
308    public void testAGD84_to_WGS84() throws FactoryException {
309        important = true;
310        name       = "AGD84 to WGS 84 (9)";
311        methodName = "NTv2";
312        verifyTransformation();
313    }
314
315    /**
316     * Tests “Amersfoort to WGS 84 (3)” transformation creation from the factory.
317     *
318     * <ul>
319     *   <li>EPSG transformation code: <b>15934</b></li>
320     *   <li>EPSG transformation name: <b>Amersfoort to WGS 84 (3)</b></li>
321     *   <li>Transformation method: <b>Coordinate Frame rotation</b></li>
322     *   <li>Specific usage / Remarks: <b>Uses unusual unit (microradian) as rotation unit.</b></li>
323     * </ul>
324     *
325     * @throws FactoryException if an error occurred while creating the transformation from the EPSG code.
326     */
327    @Test
328    public void testAmersfoort_to_WGS84() throws FactoryException {
329        name       = "Amersfoort to WGS 84 (3)";
330        methodName = "Coordinate Frame rotation";
331        verifyTransformation();
332    }
333
334    /**
335     * Tests “Bogota 1975 to MAGNA-SIRGAS (9)” transformation creation from the factory.
336     *
337     * <ul>
338     *   <li>EPSG transformation code: <b>15730</b></li>
339     *   <li>EPSG transformation name: <b>Bogota 1975 to MAGNA-SIRGAS (9)</b></li>
340     *   <li>Transformation method: <b>Molodensky-Badekas 10-parameter transformation</b></li>
341     *   <li>Specific usage / Remarks: <b>Uses unusual unit (radian) as rotation unit.</b></li>
342     * </ul>
343     *
344     * @throws FactoryException if an error occurred while creating the transformation from the EPSG code.
345     */
346    @Test
347    public void testBogota1975_to_MAGNASIRGAS() throws FactoryException {
348        name       = "Bogota 1975 to MAGNA-SIRGAS (9)";
349        methodName = "Molodensky-Badekas 10-parameter transformation";
350        verifyTransformation();
351    }
352
353    /**
354     * Tests “Bogota 1975 to WGS 84 (3)” transformation creation from the factory.
355     *
356     * <ul>
357     *   <li>EPSG transformation code: <b>15715</b></li>
358     *   <li>EPSG transformation name: <b>Bogota 1975 to WGS 84 (3)</b></li>
359     *   <li>Transformation method: <b>Coordinate Frame rotation</b></li>
360     *   <li>Specific usage / Remarks: <b>Uses unusual unit (radian) as rotation unit.</b></li>
361     *   <li>Particularly important to E&amp;P industry.</li>
362     * </ul>
363     *
364     * @throws FactoryException if an error occurred while creating the transformation from the EPSG code.
365     */
366    @Test
367    public void testBogota1975_to_WGS84() throws FactoryException {
368        important = true;
369        name       = "Bogota 1975 to WGS 84 (3)";
370        methodName = "Coordinate Frame rotation";
371        verifyTransformation();
372    }
373
374    /**
375     * Tests “Camacupa to WGS 84 (10)” transformation creation from the factory.
376     *
377     * <ul>
378     *   <li>EPSG transformation code: <b>1327</b></li>
379     *   <li>EPSG transformation name: <b>Camacupa to WGS 84 (10)</b></li>
380     *   <li>Transformation method: <b>Geocentric translations</b></li>
381     *   <li>Particularly important to E&amp;P industry.</li>
382     * </ul>
383     *
384     * @throws FactoryException if an error occurred while creating the transformation from the EPSG code.
385     */
386    @Test
387    public void testCamacupa_to_WGS84() throws FactoryException {
388        important = true;
389        name       = "Camacupa to WGS 84 (10)";
390        methodName = "Geocentric translations";
391        verifyTransformation();
392    }
393
394    /**
395     * Tests “CH1903 to WGS 84 (1)” transformation creation from the factory.
396     *
397     * <ul>
398     *   <li>EPSG transformation code: <b>1753</b></li>
399     *   <li>EPSG transformation name: <b>CH1903 to WGS 84 (1)</b></li>
400     *   <li>Transformation method: <b>Coordinate Frame rotation</b></li>
401     *   <li>Specific usage / Remarks: <b>Uses unusual unit (centesimal second) as rotation unit.</b></li>
402     * </ul>
403     *
404     * @throws FactoryException if an error occurred while creating the transformation from the EPSG code.
405     */
406    @Test
407    public void testCH1903_to_WGS84() throws FactoryException {
408        name       = "CH1903 to WGS 84 (1)";
409        methodName = "Coordinate Frame rotation";
410        verifyTransformation();
411    }
412
413    /**
414     * Tests “ED50 to WGS 84 (18)” transformation creation from the factory.
415     *
416     * <ul>
417     *   <li>EPSG transformation code: <b>1311</b></li>
418     *   <li>EPSG transformation name: <b>ED50 to WGS 84 (18)</b></li>
419     *   <li>Transformation method: <b>Position Vector 7-param. transformation</b></li>
420     *   <li>Particularly important to E&amp;P industry.</li>
421     * </ul>
422     *
423     * @throws FactoryException if an error occurred while creating the transformation from the EPSG code.
424     */
425    @Test
426    public void testED50_to_WGS84_18() throws FactoryException {
427        important = true;
428        name       = "ED50 to WGS 84 (18)";
429        methodName = "Position Vector 7-param. transformation";
430        verifyTransformation();
431    }
432
433    /**
434     * Tests “ED50 to WGS 84 (23)” transformation creation from the factory.
435     *
436     * <ul>
437     *   <li>EPSG transformation code: <b>1612</b></li>
438     *   <li>EPSG transformation name: <b>ED50 to WGS 84 (23)</b></li>
439     *   <li>Transformation method: <b>Position Vector 7-param. transformation</b></li>
440     *   <li>Particularly important to E&amp;P industry.</li>
441     * </ul>
442     *
443     * @throws FactoryException if an error occurred while creating the transformation from the EPSG code.
444     */
445    @Test
446    public void testED50_to_WGS84_23() throws FactoryException {
447        important = true;
448        name       = "ED50 to WGS 84 (23)";
449        methodName = "Position Vector 7-param. transformation";
450        verifyTransformation();
451    }
452
453    /**
454     * Tests “ED50 to WGS 84 (24)” transformation creation from the factory.
455     *
456     * <ul>
457     *   <li>EPSG transformation code: <b>1613</b></li>
458     *   <li>EPSG transformation name: <b>ED50 to WGS 84 (24)</b></li>
459     *   <li>Transformation method: <b>Position Vector 7-param. transformation</b></li>
460     *   <li>Particularly important to E&amp;P industry.</li>
461     * </ul>
462     *
463     * @throws FactoryException if an error occurred while creating the transformation from the EPSG code.
464     */
465    @Test
466    public void testED50_to_WGS84_24() throws FactoryException {
467        important = true;
468        name       = "ED50 to WGS 84 (24)";
469        methodName = "Position Vector 7-param. transformation";
470        verifyTransformation();
471    }
472
473    /**
474     * Tests “ED50 to WGS 84 (32)” transformation creation from the factory.
475     *
476     * <ul>
477     *   <li>EPSG transformation code: <b>1999</b></li>
478     *   <li>EPSG transformation name: <b>ED50 to WGS 84 (32)</b></li>
479     *   <li>Transformation method: <b>Position Vector 7-param. transformation</b></li>
480     *   <li>Particularly important to E&amp;P industry.</li>
481     * </ul>
482     *
483     * @throws FactoryException if an error occurred while creating the transformation from the EPSG code.
484     */
485    @Test
486    public void testED50_to_WGS84_32() throws FactoryException {
487        important = true;
488        name       = "ED50 to WGS 84 (32)";
489        methodName = "Position Vector 7-param. transformation";
490        verifyTransformation();
491    }
492
493    /**
494     * Tests “ED50 to WGS 84 (36)” transformation creation from the factory.
495     *
496     * <ul>
497     *   <li>EPSG transformation code: <b>1998</b></li>
498     *   <li>EPSG transformation name: <b>ED50 to WGS 84 (36)</b></li>
499     *   <li>Transformation method: <b>Position Vector 7-param. transformation</b></li>
500     *   <li>Particularly important to E&amp;P industry.</li>
501     * </ul>
502     *
503     * @throws FactoryException if an error occurred while creating the transformation from the EPSG code.
504     */
505    @Test
506    public void testED50_to_WGS84_36() throws FactoryException {
507        important = true;
508        name       = "ED50 to WGS 84 (36)";
509        methodName = "Position Vector 7-param. transformation";
510        verifyTransformation();
511    }
512
513    /**
514     * Tests “La Canoa to WGS 84 (2)” transformation creation from the factory.
515     *
516     * <ul>
517     *   <li>EPSG transformation code: <b>1096</b></li>
518     *   <li>EPSG transformation name: <b>La Canoa to WGS 84 (2)</b></li>
519     *   <li>Transformation method: <b>Molodensky-Badekas 10-parameter transformation</b></li>
520     *   <li>Specific usage / Remarks: <b>Identify whether 1095 or 1096 or both are given.</b></li>
521     *   <li>Particularly important to E&amp;P industry.</li>
522     * </ul>
523     *
524     * @throws FactoryException if an error occurred while creating the transformation from the EPSG code.
525     */
526    @Test
527    public void testLaCanoa_to_WGS84() throws FactoryException {
528        important = true;
529        name       = "La Canoa to WGS 84 (2)";
530        methodName = "Molodensky-Badekas 10-parameter transformation";
531        verifyTransformation();
532    }
533
534    /**
535     * Tests “NAD27 to NAD83 (1)” transformation creation from the factory.
536     *
537     * <ul>
538     *   <li>EPSG transformation code: <b>1241</b></li>
539     *   <li>EPSG transformation name: <b>NAD27 to NAD83 (1)</b></li>
540     *   <li>Transformation method: <b>NADCON</b></li>
541     *   <li>Particularly important to E&amp;P industry.</li>
542     * </ul>
543     *
544     * @throws FactoryException if an error occurred while creating the transformation from the EPSG code.
545     */
546    @Test
547    public void testNAD27_to_NAD83_1() throws FactoryException {
548        important = true;
549        name       = "NAD27 to NAD83 (1)";
550        methodName = "NADCON";
551        verifyTransformation();
552    }
553
554    /**
555     * Tests “NAD27 to NAD83 (2)” transformation creation from the factory.
556     *
557     * <ul>
558     *   <li>EPSG transformation code: <b>1243</b></li>
559     *   <li>EPSG transformation name: <b>NAD27 to NAD83 (2)</b></li>
560     *   <li>Transformation method: <b>NADCON</b></li>
561     *   <li>Particularly important to E&amp;P industry.</li>
562     * </ul>
563     *
564     * @throws FactoryException if an error occurred while creating the transformation from the EPSG code.
565     */
566    @Test
567    public void testNAD27_to_NAD83_2() throws FactoryException {
568        important = true;
569        name       = "NAD27 to NAD83 (2)";
570        methodName = "NADCON";
571        verifyTransformation();
572    }
573
574    /**
575     * Tests “NAD27 to NAD83 (4)” transformation creation from the factory.
576     *
577     * <ul>
578     *   <li>EPSG transformation code: <b>1313</b></li>
579     *   <li>EPSG transformation name: <b>NAD27 to NAD83 (4)</b></li>
580     *   <li>Transformation method: <b>NTv2</b></li>
581     *   <li>Particularly important to E&amp;P industry.</li>
582     * </ul>
583     *
584     * @throws FactoryException if an error occurred while creating the transformation from the EPSG code.
585     */
586    @Test
587    public void testNAD27_to_NAD83_4() throws FactoryException {
588        important = true;
589        name       = "NAD27 to NAD83 (4)";
590        methodName = "NTv2";
591        verifyTransformation();
592    }
593
594    /**
595     * Tests “NAD27 to WGS 84 (33)” transformation creation from the factory.
596     *
597     * <ul>
598     *   <li>EPSG transformation code: <b>1693</b></li>
599     *   <li>EPSG transformation name: <b>NAD27 to WGS 84 (33)</b></li>
600     *   <li>Transformation method: <b>NTv2</b></li>
601     *   <li>Specific usage / Remarks: <b>EPSG copy of 1313.</b></li>
602     *   <li>Particularly important to E&amp;P industry.</li>
603     * </ul>
604     *
605     * @throws FactoryException if an error occurred while creating the transformation from the EPSG code.
606     */
607    @Test
608    public void testNAD27_to_WGS84() throws FactoryException {
609        important = true;
610        name       = "NAD27 to WGS 84 (33)";
611        methodName = "NTv2";
612        verifyTransformation();
613    }
614
615    /**
616     * Tests “NAD27 to WGS 84 (79)” transformation creation from the factory.
617     *
618     * <ul>
619     *   <li>EPSG transformation code: <b>15851</b></li>
620     *   <li>EPSG transformation name: <b>NAD27 to WGS 84 (79)</b></li>
621     *   <li>Transformation method: <b>NADCON</b></li>
622     *   <li>Specific usage / Remarks: <b>EPSG copy of 1241.</b></li>
623     *   <li>Particularly important to E&amp;P industry.</li>
624     * </ul>
625     *
626     * @throws FactoryException if an error occurred while creating the transformation from the EPSG code.
627     */
628    @Test
629    public void testNAD27_to_WGS84_79() throws FactoryException {
630        important = true;
631        name       = "NAD27 to WGS 84 (79)";
632        methodName = "NADCON";
633        verifyTransformation();
634    }
635
636    /**
637     * Tests “NAD27 to WGS 84 (85)” transformation creation from the factory.
638     *
639     * <ul>
640     *   <li>EPSG transformation code: <b>15864</b></li>
641     *   <li>EPSG transformation name: <b>NAD27 to WGS 84 (85)</b></li>
642     *   <li>Transformation method: <b>NADCON</b></li>
643     *   <li>Specific usage / Remarks: <b>EPSG copy of 1243.</b></li>
644     *   <li>Particularly important to E&amp;P industry.</li>
645     * </ul>
646     *
647     * @throws FactoryException if an error occurred while creating the transformation from the EPSG code.
648     */
649    @Test
650    public void testNAD27_to_WGS84_85() throws FactoryException {
651        important = true;
652        name       = "NAD27 to WGS 84 (85)";
653        methodName = "NADCON";
654        verifyTransformation();
655    }
656
657    /**
658     * Tests “NTF (Paris) to NTF (1)” transformation creation from the factory.
659     *
660     * <ul>
661     *   <li>EPSG transformation code: <b>1763</b></li>
662     *   <li>EPSG transformation name: <b>NTF (Paris) to NTF (1)</b></li>
663     *   <li>Transformation method: <b>Longitude rotation</b></li>
664     *   <li>Specific usage / Remarks: <b>Uses unusual unit (grad) as rotation unit.</b></li>
665     *   <li>Particularly important to E&amp;P industry.</li>
666     * </ul>
667     *
668     * @throws FactoryException if an error occurred while creating the transformation from the EPSG code.
669     */
670    @Test
671    public void testNTF_Paris__to_NTF() throws FactoryException {
672        important = true;
673        name       = "NTF (Paris) to NTF (1)";
674        methodName = "Longitude rotation";
675        verifyTransformation();
676    }
677
678    /**
679     * Tests “PSAD56 to WGS 84 (13)” transformation creation from the factory.
680     *
681     * <ul>
682     *   <li>EPSG transformation code: <b>1095</b></li>
683     *   <li>EPSG transformation name: <b>PSAD56 to WGS 84 (13)</b></li>
684     *   <li>Transformation method: <b>Molodensky-Badekas 10-parameter transformation</b></li>
685     *   <li>Specific usage / Remarks: <b>Identify whether 1095 or 1096 or both are given.</b></li>
686     *   <li>Particularly important to E&amp;P industry.</li>
687     * </ul>
688     *
689     * @throws FactoryException if an error occurred while creating the transformation from the EPSG code.
690     */
691    @Test
692    public void testPSAD56_to_WGS84() throws FactoryException {
693        important = true;
694        name       = "PSAD56 to WGS 84 (13)";
695        methodName = "Molodensky-Badekas 10-parameter transformation";
696        verifyTransformation();
697    }
698}