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;
035import javax.measure.Unit;
036import javax.measure.quantity.Angle;
037
038import org.opengis.util.Factory;
039import org.opengis.util.FactoryException;
040import org.opengis.util.InternationalString;
041import org.opengis.referencing.cs.CSFactory;
042import org.opengis.referencing.crs.CRSFactory;
043import org.opengis.referencing.crs.GeodeticCRS;
044import org.opengis.referencing.crs.GeocentricCRS;
045import org.opengis.referencing.crs.GeographicCRS;
046import org.opengis.referencing.cs.AxisDirection;
047import org.opengis.referencing.cs.CartesianCS;
048import org.opengis.referencing.cs.EllipsoidalCS;
049import org.opengis.referencing.cs.CoordinateSystem;
050import org.opengis.referencing.datum.Ellipsoid;
051import org.opengis.referencing.datum.PrimeMeridian;
052import org.opengis.referencing.datum.GeodeticDatum;
053import org.opengis.referencing.datum.DatumFactory;
054import org.opengis.test.Configuration;
055
056import org.junit.Test;
057import org.junit.runner.RunWith;
058import org.junit.runners.Parameterized;
059
060import static org.junit.Assume.*;
061import static org.junit.Assert.*;
062
063
064/**
065 * Verifies that the software allows correct definition of a user-defined geodetic datum and geodetic CRS.
066 * Each test method in this class instantiate exactly one {@link GeodeticDatum}, but
067 * may instantiate an arbitrary amount of {@link GeodeticCRS} using that datum.
068 *
069 * <table class="gigs" summary="Test description"><tr>
070 *   <th>Test method:</th>
071 *   <td>Create user-defined geodetic datum for each of several different datums.
072 *       Create user-defined geodetic CRS for each of several different CRSs.</td>
073 * </tr><tr>
074 *   <th>Test data:</th>
075 *   <td><a href="doc-files/GIGS_3004_userGeodeticDatumCRS.csv">{@code GIGS_3004_userGeodeticDatumCRS.csv}</a>.</td>
076 * </tr><tr>
077 *   <th>Tested API:</th>
078 *   <td>{@link CRSFactory#createGeocentricCRS(Map, GeodeticDatum, CartesianCS)} and<br>
079 *       {@link CRSFactory#createGeographicCRS(Map, GeodeticDatum, EllipsoidalCS)}.</td>
080 * </tr><tr>
081 *   <th>Expected result:</th>
082 *   <td>The software should accept the test data. The properties of the created objects will
083 *       be compared with the properties given to the factory method.</td>
084 * </tr></table>
085 *
086 *
087 * <div class="note"><b>Usage example:</b>
088 * in order to specify their factories and run the tests in a JUnit framework, implementors can
089 * define a subclass in their own test suite as in the example below:
090 *
091 * <blockquote><pre>import org.junit.runner.RunWith;
092 *import org.junit.runners.JUnit4;
093 *import org.opengis.test.referencing.gigs.GIGS3004;
094 *
095 *&#64;RunWith(JUnit4.class)
096 *public class MyTest extends GIGS3004 {
097 *    public MyTest() {
098 *        super(new MyDatumFactory(), new MyCSFactory(), new MyCRSFactory());
099 *    }
100 *}</pre></blockquote>
101 * </div>
102 *
103 * @author  GIGS (IOGP)
104 * @author  Martin Desruisseaux (Geomatys)
105 * @author  Alexis Manin (Geomatys)
106 * @version 3.1
107 * @since   3.1
108 */
109@RunWith(Parameterized.class)
110public strictfp class GIGS3004 extends UserObjectFactoryTestCase<GeodeticDatum> {
111    /**
112     * The datum created by the factory,
113     * or {@code null} if not yet created or if datum creation failed.
114     */
115    private GeodeticDatum datum;
116
117    /**
118     * Data about the geodetic datum ellipsoid.
119     */
120    private final GIGS3002 ellipsoidData;
121
122    /**
123     * Data about the geodetic datum prime meridian.
124     */
125    private final GIGS3003 primeMeridianData;
126
127    /**
128     * Factory to use for building {@link GeodeticCRS} instances, or {@code null} if none.
129     */
130    protected final CRSFactory crsFactory;
131
132    /**
133     * The factory to use for creating coordinate system instances.
134     */
135    private final EPSGMock epsgFactory;
136
137    /**
138     * Returns a default set of factories to use for running the tests. Those factories are given
139     * in arguments to the constructor when this test class is instantiated directly by JUnit (for
140     * example as a {@linkplain org.junit.runners.Suite.SuiteClasses suite} element), instead than
141     * subclassed by the implementor. The factories are fetched as documented in the
142     * {@link #factories(Class[])} javadoc.
143     *
144     * @return the default set of arguments to be given to the {@code GIGS3004} constructor.
145     */
146    @Parameterized.Parameters
147    @SuppressWarnings("unchecked")
148    public static List<Factory[]> factories() {
149        return factories(DatumFactory.class, CSFactory.class, CRSFactory.class);
150    }
151
152    /**
153     * Creates a new test using the given factory. If a given factory is {@code null},
154     * then the tests which depend on it will be skipped.
155     *
156     * @param datumFactory  factory for creating {@link Ellipsoid} and {@link PrimeMeridian} instances.
157     * @param csFactory     factory for creating {@link CoordinateSystem} instances.
158     * @param crsFactory    factory for creating {@link GeodeticCRS} instances.
159     */
160    public GIGS3004(final DatumFactory datumFactory, final CSFactory csFactory, final CRSFactory crsFactory) {
161        super(csFactory, crsFactory);
162        this.crsFactory   = crsFactory;
163        this.epsgFactory  = new EPSGMock(units, datumFactory, csFactory, validators);
164        ellipsoidData     = new GIGS3002(datumFactory);
165        primeMeridianData = new GIGS3003(datumFactory);
166        ellipsoidData.skipTests = true;
167        primeMeridianData.skipTests = true;
168    }
169
170    /**
171     * Returns information about the configuration of the test which has been run.
172     * This method returns a map containing:
173     *
174     * <ul>
175     *   <li>All the following values associated to the {@link org.opengis.test.Configuration.Key} of the same name:
176     *     <ul>
177     *       <li>{@link #isFactoryPreservingUserValues}</li>
178     *       <li>{@linkplain GIGS3002#datumFactory}</li>
179     *       <li>{@code csFactory}</li>
180     *       <li>{@linkplain #crsFactory}</li>
181     *     </ul>
182     *   </li>
183     * </ul>
184     *
185     * @return the configuration of the test being run.
186     */
187    @Override
188    public Configuration configuration() {
189        final Configuration op = super.configuration();
190        assertNull(op.put(Configuration.Key.datumFactory, ellipsoidData.datumFactory));
191        assertNull(op.put(Configuration.Key.csFactory, epsgFactory.getCSFactory()));
192        assertNull(op.put(Configuration.Key.crsFactory, crsFactory));
193        return op;
194    }
195
196    /**
197     * Returns the geodetic datum instance to be tested. When this method is invoked for the first time,
198     * it creates the geodetic datum to test by invoking the corresponding method from {@link DatumFactory}
199     * with the current {@link #properties properties} map in argument.
200     * The created object is then cached and returned in all subsequent invocations of this method.
201     *
202     * @return the geodetic datum instance to test.
203     * @throws FactoryException if an error occurred while creating the geodetic datum instance.
204     */
205    @Override
206    public GeodeticDatum getIdentifiedObject() throws FactoryException {
207        if (datum == null) {
208            assumeNotNull(ellipsoidData.datumFactory);
209            datum = ellipsoidData.datumFactory.createGeodeticDatum(properties,
210                    ellipsoidData.getIdentifiedObject(), primeMeridianData.getIdentifiedObject());
211        }
212        return datum;
213    }
214
215    /**
216     * Creates a geographic CRS for the given properties and verify its properties after construction.
217     *
218     * @param  crsCode  the GIGS code of the CRS to create.
219     * @param  crsName  the GIGS name of the CRS to create.
220     * @param  csCode   the EPSG code of the coordinate system.
221     * @throws FactoryException if an error occurred while creating the CRS instance.
222     */
223    @SuppressWarnings("null")
224    private void createAndVerifyGeographicCRS(final int crsCode, final String crsName, final int csCode)
225            throws FactoryException
226    {
227        if (crsFactory != null) {
228            final GeographicCRS crs = crsFactory.createGeographicCRS(properties(crsCode, crsName),
229                    getIdentifiedObject(), epsgFactory.createEllipsoidalCS(String.valueOf(csCode)));
230            assertNotNull("CRSFactory.createGeographicCRS(…) shall not return null.", crs);
231            validators.validate(crs);
232            verifyIdentification(crs, crsName, String.valueOf(crsCode));
233            /*
234             * Verify axes: may be two- or three-dimensional, (φ,λ) or (λ,φ) order, in angular degrees or grads.
235             * Those properties are inferred from the coordinate system code.
236             */
237            Unit<Angle> angularUnit = units.degree();
238            AxisDirection[] directions = GIGS2004.GEOGRAPHIC_2D;
239            switch (csCode) {
240                case 6403: angularUnit = units.grad(); break;
241                case 6423: directions = GIGS2004.GEOGRAPHIC_3D; break;
242                case 6424: directions = GIGS2004.GEOGRAPHIC_XY; break;
243            }
244            verifyCoordinateSystem(crs.getCoordinateSystem(), EllipsoidalCS.class,
245                    directions, angularUnit, angularUnit, units.metre());
246        }
247    }
248
249    /**
250     * Creates a geocentric CRS for the given properties and verify its properties after construction.
251     *
252     * @param  crsCode  the GIGS code of the CRS to create.
253     * @param  crsName  the GIGS name of the CRS to create.
254     * @param  csCode   the EPSG code of the coordinate system.
255     * @throws FactoryException if an error occurred while creating the CRS instance.
256     */
257    @SuppressWarnings("null")
258    private void createAndVerifyGeocentricCRS(final int crsCode, final String crsName, final int csCode)
259            throws FactoryException
260    {
261        if (crsFactory != null) {
262            final GeocentricCRS crs = crsFactory.createGeocentricCRS(properties(crsCode, crsName),
263                    getIdentifiedObject(), epsgFactory.createCartesianCS(String.valueOf(csCode)));
264            assertNotNull("CRSFactory.createGeocentricCRS(…) shall not return null.", crs);
265            validators.validate(crs);
266            verifyIdentification(crs, crsName, String.valueOf(crsCode));
267            verifyCoordinateSystem(crs.getCoordinateSystem(), CartesianCS.class, GIGS2004.GEOCENTRIC, units.metre());
268        }
269    }
270
271    /**
272     * Verifies the properties of the geodetic datum given by {@link #getIdentifiedObject()}.
273     */
274    final void verifyDatum() throws FactoryException {
275        if (skipTests) {
276            return;
277        }
278        final String name = getName();
279        final String code = getCode();
280        final String anchorPoint = (String) properties.get(GeodeticDatum.ANCHOR_POINT_KEY);
281        final GeodeticDatum datum = getIdentifiedObject();
282        assertNotNull("GeodeticDatum", datum);
283        validators.validate(datum);
284
285        verifyIdentification(datum, name, code);
286        copyConfigurationTo(ellipsoidData, primeMeridianData);
287
288        ellipsoidData.skipTests = false;
289        ellipsoidData.setIdentifiedObject(datum.getEllipsoid());
290        ellipsoidData.verifyEllipsoid();
291
292        primeMeridianData.skipTests = false;
293        primeMeridianData.setIdentifiedObject(datum.getPrimeMeridian());
294        primeMeridianData.verifyPrimeMeridian();
295
296        if (anchorPoint != null) {
297            final InternationalString actual = datum.getAnchorPoint();
298            assertNotNull("GeodeticDatum.getAnchorPoint()", actual);
299            assertEquals ("GeodeticDatum.getAnchorPoint()", anchorPoint, actual.toString());
300        }
301    }
302
303    /**
304     * Tests “GIGS geodetic datum A” geodetic datum creation from the factory.
305     *
306     * <ul>
307     *   <li>GIGS datum code: <b>66001</b></li>
308     *   <li>GIGS datum name: <b>GIGS geodetic datum A</b></li>
309     *   <li>Ellipsoid name: <b>GIGS ellipsoid A</b></li>
310     *   <li>Prime meridian name: <b>GIGS PM A</b></li>
311     *   <li>GIGS coordinate reference system using the datum: <b>64001 – GIGS geocenCRS A</b></li>
312     *   <li>EPSG equivalence: <b>4978 – WGS 84</b></li>
313     * </ul>
314     *
315     * @throws FactoryException if an error occurred while creating the datum or a CRS from the properties.
316     *
317     * @see GIGS2004#testWGS84()
318     */
319    @Test
320    public void testWGS84() throws FactoryException {
321        setCodeAndName(66001, "GIGS geodetic datum A");
322        ellipsoidData.testWGS84();
323        primeMeridianData.testGreenwich();
324        verifyDatum();
325        createAndVerifyGeocentricCRS(64001, "GIGS geocenCRS A", 6500);
326        createAndVerifyGeographicCRS(64002, "GIGS geog3DCRS A", 6423);
327        createAndVerifyGeographicCRS(64003, "GIGS geogCRS A", 6422);
328        createAndVerifyGeographicCRS(64004, "GIGS geogCRS Alonlat", 6424);
329        createAndVerifyGeographicCRS(64033, "GIGS geogCRS Agr", 6403);
330    }
331
332    /**
333     * Tests “GIGS geodetic datum B” geodetic datum creation from the factory.
334     *
335     * <ul>
336     *   <li>GIGS datum code: <b>66002</b></li>
337     *   <li>GIGS datum name: <b>GIGS geodetic datum B</b></li>
338     *   <li>Ellipsoid name: <b>GIGS ellipsoid B</b></li>
339     *   <li>Prime meridian name: <b>GIGS PM A</b></li>
340     *   <li>GIGS coordinate reference system using the datum: <b>64019 – GIGS geog3DCRS B</b></li>
341     * </ul>
342     *
343     * @throws FactoryException if an error occurred while creating the datum or a CRS from the properties.
344     *
345     * @see GIGS2004#testOSGB1936()
346     */
347    @Test
348    public void testOSGB1936() throws FactoryException {
349        setCodeAndName(66002, "GIGS geodetic datum B");
350        ellipsoidData.testAiry();
351        primeMeridianData.testGreenwich();
352        verifyDatum();
353        createAndVerifyGeographicCRS(64019, "GIGS geog3DCRS B", 6423);
354        createAndVerifyGeographicCRS(64005, "GIGS geogCRS B", 6422);
355    }
356
357    /**
358     * Tests “GIGS geodetic datum C” geodetic datum creation from the factory.
359     *
360     * <ul>
361     *   <li>GIGS datum code: <b>66003</b></li>
362     *   <li>GIGS datum name: <b>GIGS geodetic datum C</b></li>
363     *   <li>Ellipsoid name: <b>GIGS ellipsoid C</b></li>
364     *   <li>Prime meridian name: <b>GIGS PM A</b></li>
365     *   <li>GIGS coordinate reference system using the datum: <b>64021 – GIGS geog3DCRS C</b></li>
366     * </ul>
367     *
368     * @throws FactoryException if an error occurred while creating the datum or a CRS from the properties.
369     *
370     * @see GIGS2004#testAmersfoort()
371     */
372    @Test
373    public void testAmersfoort() throws FactoryException {
374        setCodeAndName(66003, "GIGS geodetic datum C");
375        ellipsoidData.testBessel();
376        primeMeridianData.testGreenwich();
377        verifyDatum();
378        createAndVerifyGeographicCRS(64021, "GIGS geog3DCRS C", 6423);
379        createAndVerifyGeographicCRS(64006, "GIGS geogCRS C", 6422);
380    }
381
382    /**
383     * Tests “GIGS geodetic datum D” geodetic datum creation from the factory.
384     *
385     * <ul>
386     *   <li>GIGS datum code: <b>66004</b></li>
387     *   <li>GIGS datum name: <b>GIGS geodetic datum D</b></li>
388     *   <li>Ellipsoid name: <b>GIGS ellipsoid C</b></li>
389     *   <li>Prime meridian name: <b>GIGS PM D</b></li>
390     *   <li>GIGS coordinate reference system using the datum: <b>64007 – GIGS geogCRS D</b></li>
391     *   <li>EPSG equivalence: <b>4813 – Batavia (Jakarta)</b></li>
392     * </ul>
393     *
394     * @throws FactoryException if an error occurred while creating the datum or a CRS from the properties.
395     *
396     * @see GIGS2004#testBatavia_Jakarta()
397     */
398    @Test
399    public void testBatavia_Jakarta() throws FactoryException {
400        setCodeAndName(66004, "GIGS geodetic datum D");
401        ellipsoidData.testBessel();
402        primeMeridianData.testJakarta();
403        verifyDatum();
404        createAndVerifyGeographicCRS(64007, "GIGS geogCRS D", 6422);
405    }
406
407    /**
408     * Tests “GIGS geodetic datum E” geodetic datum creation from the factory.
409     *
410     * <ul>
411     *   <li>GIGS datum code: <b>66005</b></li>
412     *   <li>GIGS datum name: <b>GIGS geodetic datum E</b></li>
413     *   <li>Ellipsoid name: <b>GIGS ellipsoid E</b></li>
414     *   <li>Prime meridian name: <b>GIGS PM A</b></li>
415     *   <li>GIGS coordinate reference system using the datum: <b>64022 – GIGS geog3DCRS E</b></li>
416     * </ul>
417     *
418     * @throws FactoryException if an error occurred while creating the datum or a CRS from the properties.
419     *
420     * @see GIGS2004#testBelge1972()
421     */
422    @Test
423    public void testBelge1972() throws FactoryException {
424        setCodeAndName(66005, "GIGS geodetic datum E");
425        ellipsoidData.testInternational1924();
426        primeMeridianData.testGreenwich();
427        verifyDatum();
428        createAndVerifyGeographicCRS(64022, "GIGS geog3DCRS E", 6423);
429        createAndVerifyGeographicCRS(64008, "GIGS geogCRS E", 6422);
430    }
431
432    /**
433     * Tests “GIGS geodetic datum F” geodetic datum creation from the factory.
434     *
435     * <ul>
436     *   <li>GIGS datum code: <b>66006</b></li>
437     *   <li>GIGS datum name: <b>GIGS geodetic datum F</b></li>
438     *   <li>GIGS datum anchor point: <b>Origin F</b></li>
439     *   <li>Ellipsoid name: <b>GIGS ellipsoid F</b></li>
440     *   <li>Prime meridian name: <b>GIGS PM A</b></li>
441     *   <li>GIGS coordinate reference system using the datum: <b>64009 – GIGS geogCRS F</b></li>
442     *   <li>EPSG equivalence: <b>4283 – GDA94</b></li>
443     * </ul>
444     *
445     * @throws FactoryException if an error occurred while creating the datum or a CRS from the properties.
446     *
447     * @see GIGS2004#testGDA94()
448     */
449    @Test
450    public void testGDA94() throws FactoryException {
451        setCodeAndName(66006, "GIGS geodetic datum F");
452        assertNull(GeodeticDatum.ANCHOR_POINT_KEY, properties.put(GeodeticDatum.ANCHOR_POINT_KEY, "Origin F"));
453        ellipsoidData.testGRS1980();
454        primeMeridianData.testGreenwich();
455        verifyDatum();
456        createAndVerifyGeographicCRS(64009, "GIGS geogCRS F", 6422);
457    }
458
459    /**
460     * Tests “GIGS geodetic datum G” geodetic datum creation from the factory.
461     *
462     * <ul>
463     *   <li>GIGS datum code: <b>66007</b></li>
464     *   <li>GIGS datum name: <b>GIGS geodetic datum G</b></li>
465     *   <li>GIGS datum anchor point: <b>Origin G</b></li>
466     *   <li>Ellipsoid name: <b>GIGS ellipsoid F</b></li>
467     *   <li>Prime meridian name: <b>GIGS PM A</b></li>
468     *   <li>GIGS coordinate reference system using the datum: <b>64010 – GIGS geogCRS G</b></li>
469     *   <li>EPSG equivalence: <b>4258 – ETRS89</b>, <b>4742 – GDM2000</b>, <b>4152 – NAD83(HARN)</b>, <b>4190 – POSGAR98</b>, <b>4674 – SIRGAS 2000</b></li>
470     *   <li>Specific usage / Remarks: <b>This GIGS CRS is functionally equivalent to any ITRS realisation using the GRS 1980 ellipsoid.</b></li>
471     * </ul>
472     *
473     * @throws FactoryException if an error occurred while creating the datum or a CRS from the properties.
474     *
475     * @see GIGS2004#testETRS89()
476     */
477    @Test
478    public void testETRS89() throws FactoryException {
479        setCodeAndName(66007, "GIGS geodetic datum G");
480        assertNull(GeodeticDatum.ANCHOR_POINT_KEY, properties.put(GeodeticDatum.ANCHOR_POINT_KEY, "Origin G"));
481        ellipsoidData.testGRS1980();
482        primeMeridianData.testGreenwich();
483        verifyDatum();
484        createAndVerifyGeographicCRS(64010, "GIGS geogCRS G", 6422);
485    }
486
487    /**
488     * Tests “GIGS geodetic datum H” geodetic datum creation from the factory.
489     *
490     * <ul>
491     *   <li>GIGS datum code: <b>66008</b></li>
492     *   <li>GIGS datum name: <b>GIGS geodetic datum H</b></li>
493     *   <li>Ellipsoid name: <b>GIGS ellipsoid H</b></li>
494     *   <li>Prime meridian name: <b>GIGS PM H</b></li>
495     *   <li>GIGS coordinate reference system using the datum: <b>64011 – GIGS geogCRS H</b></li>
496     *   <li>EPSG equivalence: <b>4807 – NTF (Paris)</b></li>
497     * </ul>
498     *
499     * @throws FactoryException if an error occurred while creating the datum or a CRS from the properties.
500     *
501     * @see GIGS2004#testNTF_Paris()
502     */
503    @Test
504    public void testNTF_Paris() throws FactoryException {
505        setCodeAndName(66008, "GIGS geodetic datum H");
506        ellipsoidData.testClarkeIGN();
507        primeMeridianData.testParis();
508        verifyDatum();
509        createAndVerifyGeographicCRS(64011, "GIGS geogCRS H", 6403);
510    }
511
512    /**
513     * Tests “GIGS geodetic datum J” geodetic datum creation from the factory.
514     *
515     * <ul>
516     *   <li>GIGS datum code: <b>66009</b></li>
517     *   <li>GIGS datum name: <b>GIGS geodetic datum J</b></li>
518     *   <li>Ellipsoid name: <b>GIGS ellipsoid J</b></li>
519     *   <li>Prime meridian name: <b>GIGS PM A</b></li>
520     *   <li>GIGS coordinate reference system using the datum: <b>64012 – GIGS geogCRS J</b></li>
521     *   <li>EPSG equivalence: <b>4267 – NAD27</b></li>
522     * </ul>
523     *
524     * @throws FactoryException if an error occurred while creating the datum or a CRS from the properties.
525     *
526     * @see GIGS2004#testNAD27()
527     */
528    @Test
529    public void testNAD27() throws FactoryException {
530        setCodeAndName(66009, "GIGS geodetic datum J");
531        ellipsoidData.testClarke1866();
532        primeMeridianData.testGreenwich();
533        verifyDatum();
534        createAndVerifyGeographicCRS(64012, "GIGS geogCRS J", 6422);
535    }
536
537    /**
538     * Tests “GIGS geodetic datum K” geodetic datum creation from the factory.
539     *
540     * <ul>
541     *   <li>GIGS datum code: <b>66012</b></li>
542     *   <li>GIGS datum name: <b>GIGS geodetic datum K</b></li>
543     *   <li>Ellipsoid name: <b>GIGS ellipsoid K</b></li>
544     *   <li>Prime meridian name: <b>GIGS PM A</b></li>
545     *   <li>GIGS coordinate reference system using the datum: <b>64015 – GIGS geogCRS K</b></li>
546     *   <li>EPSG equivalence: <b>4237 – HD72</b></li>
547     * </ul>
548     *
549     * @throws FactoryException if an error occurred while creating the datum or a CRS from the properties.
550     *
551     * @see GIGS2004#testHD72()
552     */
553    @Test
554    public void testHD72() throws FactoryException {
555        setCodeAndName(66012, "GIGS geodetic datum K");
556        ellipsoidData.testGRS1967();
557        primeMeridianData.testGreenwich();
558        verifyDatum();
559        createAndVerifyGeographicCRS(64015, "GIGS geogCRS K", 6422);
560    }
561
562    /**
563     * Tests “GIGS geodetic datum L” geodetic datum creation from the factory.
564     *
565     * <ul>
566     *   <li>GIGS datum code: <b>66011</b></li>
567     *   <li>GIGS datum name: <b>GIGS geodetic datum L</b></li>
568     *   <li>GIGS datum anchor point: <b>Origin L</b></li>
569     *   <li>Ellipsoid name: <b>GIGS ellipsoid C</b></li>
570     *   <li>Prime meridian name: <b>GIGS PM A</b></li>
571     *   <li>GIGS coordinate reference system using the datum: <b>64014 – GIGS geogCRS L</b></li>
572     *   <li>EPSG equivalence: <b>4211 – Batavia</b></li>
573     * </ul>
574     *
575     * @throws FactoryException if an error occurred while creating the datum or a CRS from the properties.
576     *
577     * @see GIGS2004#testBatavia()
578     */
579    @Test
580    public void testBatavia() throws FactoryException {
581        setCodeAndName(66011, "GIGS geodetic datum L");
582        assertNull(GeodeticDatum.ANCHOR_POINT_KEY, properties.put(GeodeticDatum.ANCHOR_POINT_KEY, "Origin L"));
583        ellipsoidData.testBessel();
584        primeMeridianData.testGreenwich();
585        verifyDatum();
586        createAndVerifyGeographicCRS(64014, "GIGS geogCRS L", 6422);
587    }
588
589    /**
590     * Tests “GIGS geodetic datum M” geodetic datum creation from the factory.
591     *
592     * <ul>
593     *   <li>GIGS datum code: <b>66016</b></li>
594     *   <li>GIGS datum name: <b>GIGS geodetic datum M</b></li>
595     *   <li>Ellipsoid name: <b>GIGS ellipsoid E</b></li>
596     *   <li>Prime meridian name: <b>GIGS PM A</b></li>
597     *   <li>GIGS coordinate reference system using the datum: <b>64020 – GIGS geogCRS M</b></li>
598     *   <li>EPSG equivalence: <b>4230 – ED50</b></li>
599     * </ul>
600     *
601     * @throws FactoryException if an error occurred while creating the datum or a CRS from the properties.
602     *
603     * @see GIGS2004#testED50()
604     */
605    @Test
606    public void testED50() throws FactoryException {
607        setCodeAndName(66016, "GIGS geodetic datum M");
608        ellipsoidData.testInternational1924();
609        primeMeridianData.testGreenwich();
610        verifyDatum();
611        createAndVerifyGeographicCRS(64020, "GIGS geogCRS M", 6422);
612    }
613
614    /**
615     * Tests “GIGS geodetic datum T” geodetic datum creation from the factory.
616     *
617     * <ul>
618     *   <li>GIGS datum code: <b>66010</b></li>
619     *   <li>GIGS datum name: <b>GIGS geodetic datum T</b></li>
620     *   <li>Ellipsoid name: <b>GIGS ellipsoid H</b></li>
621     *   <li>Prime meridian name: <b>GIGS PM A</b></li>
622     *   <li>GIGS coordinate reference system using the datum: <b>64013 – GIGS geogCRS T</b></li>
623     *   <li>EPSG equivalence: <b>4275 – NTF</b></li>
624     * </ul>
625     *
626     * @throws FactoryException if an error occurred while creating the datum or a CRS from the properties.
627     *
628     * @see GIGS2004#testNTF()
629     */
630    @Test
631    public void testNTF() throws FactoryException {
632        setCodeAndName(66010, "GIGS geodetic datum T");
633        ellipsoidData.testClarkeIGN();
634        primeMeridianData.testGreenwich();
635        verifyDatum();
636        createAndVerifyGeographicCRS(64013, "GIGS geogCRS T", 6403);
637    }
638
639    /**
640     * Tests “GIGS geodetic datum X” geodetic datum creation from the factory.
641     *
642     * <ul>
643     *   <li>GIGS datum code: <b>66013</b></li>
644     *   <li>GIGS datum name: <b>GIGS geodetic datum X</b></li>
645     *   <li>Ellipsoid name: <b>GIGS ellipsoid X</b></li>
646     *   <li>Prime meridian name: <b>GIGS PM A</b></li>
647     *   <li>GIGS coordinate reference system using the datum: <b>64016 – GIGS geogCRS X</b></li>
648     *   <li>EPSG equivalence: <b>4202 – AGD66</b></li>
649     * </ul>
650     *
651     * @throws FactoryException if an error occurred while creating the datum or a CRS from the properties.
652     *
653     * @see GIGS2004#testAGD66()
654     */
655    @Test
656    public void testAGD66() throws FactoryException {
657        setCodeAndName(66013, "GIGS geodetic datum X");
658        ellipsoidData.testAustralianNationalSpheroid();
659        primeMeridianData.testGreenwich();
660        verifyDatum();
661        createAndVerifyGeographicCRS(64016, "GIGS geogCRS X", 6422);
662    }
663
664    /**
665     * Tests “GIGS geodetic datum Y” geodetic datum creation from the factory.
666     *
667     * <ul>
668     *   <li>GIGS datum code: <b>66014</b></li>
669     *   <li>GIGS datum name: <b>GIGS geodetic datum Y</b></li>
670     *   <li>Ellipsoid name: <b>GIGS ellipsoid Y</b></li>
671     *   <li>Prime meridian name: <b>GIGS PM A</b></li>
672     *   <li>GIGS coordinate reference system using the datum: <b>64017 – GIGS geogCRS Y</b></li>
673     *   <li>EPSG equivalence: <b>4284 – Pulkovo 1942</b></li>
674     * </ul>
675     *
676     * @throws FactoryException if an error occurred while creating the datum or a CRS from the properties.
677     *
678     * @see GIGS2004#testPulkovo1942()
679     */
680    @Test
681    public void testPulkovo1942() throws FactoryException {
682        setCodeAndName(66014, "GIGS geodetic datum Y");
683        ellipsoidData.testKrassowsky();
684        primeMeridianData.testGreenwich();
685        verifyDatum();
686        createAndVerifyGeographicCRS(64017, "GIGS geogCRS Y", 6422);
687    }
688
689    /**
690     * Tests “GIGS geodetic datum Z” geodetic datum creation from the factory.
691     *
692     * <ul>
693     *   <li>GIGS datum code: <b>66015</b></li>
694     *   <li>GIGS datum name: <b>GIGS geodetic datum Z</b></li>
695     *   <li>GIGS datum anchor point: <b>Origin Z</b></li>
696     *   <li>Ellipsoid name: <b>GIGS ellipsoid F</b></li>
697     *   <li>Prime meridian name: <b>GIGS PM A</b></li>
698     *   <li>GIGS coordinate reference system using the datum: <b>64018 – GIGS geogCRS Z</b></li>
699     *   <li>EPSG equivalence: <b>4269 – NAD83</b></li>
700     * </ul>
701     *
702     * @throws FactoryException if an error occurred while creating the datum or a CRS from the properties.
703     *
704     * @see GIGS2004#testNAD83()
705     */
706    @Test
707    public void testNAD83() throws FactoryException {
708        setCodeAndName(66015, "GIGS geodetic datum Z");
709        assertNull(GeodeticDatum.ANCHOR_POINT_KEY, properties.put(GeodeticDatum.ANCHOR_POINT_KEY, "Origin Z"));
710        ellipsoidData.testGRS1980();
711        primeMeridianData.testGreenwich();
712        verifyDatum();
713        createAndVerifyGeographicCRS(64018, "GIGS geogCRS Z", 6422);
714    }
715
716    /**
717     * Tests “GIGS geodetic datum AA” geodetic datum creation from the factory.
718     *
719     * <ul>
720     *   <li>GIGS datum code: <b>66326</b></li>
721     *   <li>GIGS datum name: <b>GIGS geodetic datum AA</b></li>
722     *   <li>Ellipsoid name: <b>WGS 84</b></li>
723     *   <li>Prime meridian name: <b>Greenwich</b></li>
724     *   <li>GIGS coordinate reference system using the datum: <b>64326 – GIGS geogCRS AA</b></li>
725     *   <li>EPSG equivalence: <b>4326 – WGS 84</b></li>
726     * </ul>
727     *
728     * @throws FactoryException if an error occurred while creating the datum or a CRS from the properties.
729     *
730     * @see #testWGS84()
731     */
732    @Test
733    public void testWGS84_bis() throws FactoryException {
734        setCodeAndName(66326, "GIGS geodetic datum AA");
735        ellipsoidData.testWGS84();
736        primeMeridianData.testGreenwich();
737        verifyDatum();
738        createAndVerifyGeographicCRS(64326, "GIGS geogCRS AA", 6422);
739    }
740
741    /**
742     * Tests “GIGS geodetic datum BB” geodetic datum creation from the factory.
743     *
744     * <ul>
745     *   <li>GIGS datum code: <b>66277</b></li>
746     *   <li>GIGS datum name: <b>GIGS geodetic datum BB</b></li>
747     *   <li>Ellipsoid name: <b>Airy 1830</b></li>
748     *   <li>Prime meridian name: <b>Greenwich</b></li>
749     *   <li>GIGS coordinate reference system using the datum: <b>64277 – GIGS geogCRS BB</b></li>
750     *   <li>EPSG equivalence: <b>4277 – OSGB 1936</b></li>
751     * </ul>
752     *
753     * @throws FactoryException if an error occurred while creating the datum or a CRS from the properties.
754     *
755     * @see #testOSGB1936()
756     */
757    @Test
758    public void testOSGB1936_bis() throws FactoryException {
759        setCodeAndName(66277, "GIGS geodetic datum BB");
760        ellipsoidData.testAiry();
761        primeMeridianData.testGreenwich();
762        verifyDatum();
763        createAndVerifyGeographicCRS(64277, "GIGS geogCRS BB", 6422);
764    }
765
766    /**
767     * Tests “GIGS geodetic datum CC” geodetic datum creation from the factory.
768     *
769     * <ul>
770     *   <li>GIGS datum code: <b>66289</b></li>
771     *   <li>GIGS datum name: <b>GIGS geodetic datum CC</b></li>
772     *   <li>Ellipsoid name: <b>Bessel 1841</b></li>
773     *   <li>Prime meridian name: <b>Greenwich</b></li>
774     *   <li>GIGS coordinate reference system using the datum: <b>64289 – GIGS geogCRS CC</b></li>
775     *   <li>EPSG equivalence: <b>4289 – Amersfoort</b></li>
776     * </ul>
777     *
778     * @throws FactoryException if an error occurred while creating the datum or a CRS from the properties.
779     *
780     * @see #testAmersfoort()
781     */
782    @Test
783    public void testAmersfoort_bis() throws FactoryException {
784        setCodeAndName(66289, "GIGS geodetic datum CC");
785        ellipsoidData.testBessel();
786        primeMeridianData.testGreenwich();
787        verifyDatum();
788        createAndVerifyGeographicCRS(64289, "GIGS geogCRS CC", 6422);
789    }
790
791    /**
792     * Tests “GIGS geodetic datum DD” geodetic datum creation from the factory.
793     *
794     * <ul>
795     *   <li>GIGS datum code: <b>66813</b></li>
796     *   <li>GIGS datum name: <b>GIGS geodetic datum DD</b></li>
797     *   <li>Ellipsoid name: <b>Bessel 1841</b></li>
798     *   <li>Prime meridian name: <b>Jakarta</b></li>
799     *   <li>GIGS coordinate reference system using the datum: <b>64813 – GIGS geogCRS DD</b></li>
800     *   <li>EPSG equivalence: <b>4813 – Batavia (Jakarta)</b></li>
801     * </ul>
802     *
803     * @throws FactoryException if an error occurred while creating the datum or a CRS from the properties.
804     *
805     * @see #testBatavia_Jakarta()
806     */
807    @Test
808    public void testBatavia_Jakarta_bis() throws FactoryException {
809        setCodeAndName(66813, "GIGS geodetic datum DD");
810        ellipsoidData.testBessel();
811        primeMeridianData.testJakarta();
812        verifyDatum();
813        createAndVerifyGeographicCRS(64813, "GIGS geogCRS DD", 6422);
814    }
815
816    /**
817     * Tests “GIGS geodetic datum EE” geodetic datum creation from the factory.
818     *
819     * <ul>
820     *   <li>GIGS datum code: <b>66313</b></li>
821     *   <li>GIGS datum name: <b>GIGS geodetic datum EE</b></li>
822     *   <li>Ellipsoid name: <b>International 1924</b></li>
823     *   <li>Prime meridian name: <b>Greenwich</b></li>
824     *   <li>GIGS coordinate reference system using the datum: <b>64313 – GIGS geogCRS EE</b></li>
825     *   <li>EPSG equivalence: <b>4313 – Belge 1972</b></li>
826     * </ul>
827     *
828     * @throws FactoryException if an error occurred while creating the datum or a CRS from the properties.
829     *
830     * @see #testBelge1972()
831     */
832    @Test
833    public void testBelge1972_bis() throws FactoryException {
834        setCodeAndName(66313, "GIGS geodetic datum EE");
835        ellipsoidData.testInternational1924();
836        primeMeridianData.testGreenwich();
837        verifyDatum();
838        createAndVerifyGeographicCRS(64313, "GIGS geogCRS EE", 6422);
839    }
840
841    /**
842     * Tests “GIGS geodetic datum FF” geodetic datum creation from the factory.
843     *
844     * <ul>
845     *   <li>GIGS datum code: <b>66283</b></li>
846     *   <li>GIGS datum name: <b>GIGS geodetic datum FF</b></li>
847     *   <li>Ellipsoid name: <b>GRS 1980</b></li>
848     *   <li>Prime meridian name: <b>Greenwich</b></li>
849     *   <li>GIGS coordinate reference system using the datum: <b>64283 – GIGS geogCRS FF</b></li>
850     *   <li>EPSG equivalence: <b>4283 – GDA94</b></li>
851     * </ul>
852     *
853     * @throws FactoryException if an error occurred while creating the datum or a CRS from the properties.
854     *
855     * @see #testGDA94()
856     */
857    @Test
858    public void testGDA94_bis() throws FactoryException {
859        setCodeAndName(66283, "GIGS geodetic datum FF");
860        ellipsoidData.testGRS1980();
861        primeMeridianData.testGreenwich();
862        verifyDatum();
863        createAndVerifyGeographicCRS(64283, "GIGS geogCRS FF", 6422);
864    }
865
866    /**
867     * Tests “GIGS geodetic datum HH” geodetic datum creation from the factory.
868     *
869     * <ul>
870     *   <li>GIGS datum code: <b>66807</b></li>
871     *   <li>GIGS datum name: <b>GIGS geodetic datum HH</b></li>
872     *   <li>Ellipsoid name: <b>Clarke 1880 (IGN)</b></li>
873     *   <li>Prime meridian name: <b>Paris</b></li>
874     *   <li>GIGS coordinate reference system using the datum: <b>64807 – GIGS geogCRS HH</b></li>
875     *   <li>EPSG equivalence: <b>4807 – NTF(Paris)</b></li>
876     * </ul>
877     *
878     * @throws FactoryException if an error occurred while creating the datum or a CRS from the properties.
879     *
880     * @see #testNTF_Paris()
881     */
882    @Test
883    public void testNTF_Paris_bis() throws FactoryException {
884        setCodeAndName(66807, "GIGS geodetic datum HH");
885        ellipsoidData.testClarkeIGN();
886        primeMeridianData.testParis();
887        verifyDatum();
888        createAndVerifyGeographicCRS(64807, "GIGS geogCRS HH", 6422);
889    }
890
891    /**
892     * Tests “GIGS geodetic datum ZZ” geodetic datum creation from the factory.
893     *
894     * <ul>
895     *   <li>GIGS datum code: <b>66269</b></li>
896     *   <li>GIGS datum name: <b>GIGS geodetic datum ZZ</b></li>
897     *   <li>Ellipsoid name: <b>GRS 1980</b></li>
898     *   <li>Prime meridian name: <b>Greenwich</b></li>
899     *   <li>GIGS coordinate reference system using the datum: <b>64269 – GIGS geogCRS ZZ</b></li>
900     *   <li>EPSG equivalence: <b>4269 – NAD83</b></li>
901     * </ul>
902     *
903     * @throws FactoryException if an error occurred while creating the datum or a CRS from the properties.
904     *
905     * @see #testNAD83()
906     */
907    @Test
908    public void testNAD83_bis() throws FactoryException {
909        setCodeAndName(66269, "GIGS geodetic datum ZZ");
910        ellipsoidData.testGRS1980();
911        primeMeridianData.testGreenwich();
912        verifyDatum();
913        createAndVerifyGeographicCRS(64269, "GIGS geogCRS ZZ", 6422);
914    }
915
916    /**
917     * Tests “GIGS geodetic datum B′” geodetic datum creation from the factory.
918     *
919     * <ul>
920     *   <li>GIGS datum code: <b>66017</b></li>
921     *   <li>GIGS datum name: <b>GIGS geodetic datum B′</b></li>
922     *   <li>Ellipsoid name: <b>GIGS ellipsoid B</b></li>
923     *   <li>Prime meridian name: <b>GIGS PM A</b></li>
924     *   <li>GIGS coordinate reference system using the datum: <b>64023 – GIGS geogCRS B′</b></li>
925     * </ul>
926     *
927     * @throws FactoryException if an error occurred while creating the datum or a CRS from the properties.
928     *
929     * @see #testOSGB1936()
930     */
931    @Test
932    public void testOSGB1936_p1() throws FactoryException {
933        setCodeAndName(66017, "GIGS geodetic datum B′");
934        ellipsoidData.testAiry();
935        primeMeridianData.testGreenwich();
936        verifyDatum();
937        createAndVerifyGeographicCRS(64023, "GIGS geogCRS B′", 6422);
938        createAndVerifyGeographicCRS(64024, "GIGS geog3DCRS B′", 6423);
939    }
940
941    /**
942     * Tests “GIGS geodetic datum C′” geodetic datum creation from the factory.
943     *
944     * <ul>
945     *   <li>GIGS datum code: <b>66018</b></li>
946     *   <li>GIGS datum name: <b>GIGS geodetic datum C′</b></li>
947     *   <li>GIGS datum anchor point: <b>Origin C</b></li>
948     *   <li>Ellipsoid name: <b>GIGS ellipsoid C</b></li>
949     *   <li>Prime meridian name: <b>GIGS PM A</b></li>
950     *   <li>GIGS coordinate reference system using the datum: <b>64025 – GIGS geogCRS C′</b></li>
951     * </ul>
952     *
953     * @throws FactoryException if an error occurred while creating the datum or a CRS from the properties.
954     *
955     * @see #testAmersfoort()
956     */
957    @Test
958    public void testAmersfoort_p1() throws FactoryException {
959        setCodeAndName(66018, "GIGS geodetic datum C′");
960        assertNull(GeodeticDatum.ANCHOR_POINT_KEY, properties.put(GeodeticDatum.ANCHOR_POINT_KEY, "Origin C"));
961        ellipsoidData.testBessel();
962        primeMeridianData.testGreenwich();
963        verifyDatum();
964        createAndVerifyGeographicCRS(64025, "GIGS geogCRS C′", 6422);
965        createAndVerifyGeographicCRS(64026, "GIGS geog3DCRS C′", 6423);
966    }
967
968    /**
969     * Tests “GIGS geodetic datum E′” geodetic datum creation from the factory.
970     *
971     * <ul>
972     *   <li>GIGS datum code: <b>66023</b></li>
973     *   <li>GIGS datum name: <b>GIGS geodetic datum E′</b></li>
974     *   <li>Ellipsoid name: <b>GIGS ellipsoid E</b></li>
975     *   <li>Prime meridian name: <b>GIGS PM A</b></li>
976     *   <li>GIGS coordinate reference system using the datum: <b>64027 – GIGS geogCRS E′</b></li>
977     * </ul>
978     *
979     * @throws FactoryException if an error occurred while creating the datum or a CRS from the properties.
980     *
981     * @see #testBelge1972()
982     */
983    @Test
984    public void testBelge1972_p1() throws FactoryException {
985        setCodeAndName(66023, "GIGS geodetic datum E′");
986        ellipsoidData.testInternational1924();
987        primeMeridianData.testGreenwich();
988        verifyDatum();
989        createAndVerifyGeographicCRS(64027, "GIGS geogCRS E′", 6422);
990        createAndVerifyGeographicCRS(64028, "GIGS geog3DCRS E′", 6423);
991    }
992
993    /**
994     * Tests “GIGS geodetic datum J′” geodetic datum creation from the factory.
995     *
996     * <ul>
997     *   <li>GIGS datum code: <b>66021</b></li>
998     *   <li>GIGS datum name: <b>GIGS geodetic datum J′</b></li>
999     *   <li>Ellipsoid name: <b>GIGS ellipsoid J</b></li>
1000     *   <li>Prime meridian name: <b>GIGS PM A</b></li>
1001     *   <li>GIGS coordinate reference system using the datum: <b>64029 – GIGS geogCRS J′</b></li>
1002     * </ul>
1003     *
1004     * @throws FactoryException if an error occurred while creating the datum or a CRS from the properties.
1005     *
1006     * @see #testNAD27()
1007     */
1008    @Test
1009    public void testNAD27_p1() throws FactoryException {
1010        setCodeAndName(66021, "GIGS geodetic datum J′");
1011        ellipsoidData.testClarke1866();
1012        primeMeridianData.testGreenwich();
1013        verifyDatum();
1014        createAndVerifyGeographicCRS(64029, "GIGS geogCRS J′", 6422);
1015    }
1016
1017    /**
1018     * Tests “GIGS geodetic datum J″” geodetic datum creation from the factory.
1019     *
1020     * <ul>
1021     *   <li>GIGS datum code: <b>66019</b></li>
1022     *   <li>GIGS datum name: <b>GIGS geodetic datum J″</b></li>
1023     *   <li>Ellipsoid name: <b>GIGS ellipsoid J</b></li>
1024     *   <li>Prime meridian name: <b>GIGS PM A</b></li>
1025     *   <li>GIGS coordinate reference system using the datum: <b>64030 – GIGS geogCRS J″</b></li>
1026     * </ul>
1027     *
1028     * @throws FactoryException if an error occurred while creating the datum or a CRS from the properties.
1029     *
1030     * @see #testNAD27()
1031     */
1032    @Test
1033    public void testNAD27_p2() throws FactoryException {
1034        setCodeAndName(66019, "GIGS geodetic datum J″");
1035        ellipsoidData.testClarke1866();
1036        primeMeridianData.testGreenwich();
1037        verifyDatum();
1038        createAndVerifyGeographicCRS(64030, "GIGS geogCRS J″", 6422);
1039    }
1040
1041    /**
1042     * Tests “GIGS geodetic datum J‴” geodetic datum creation from the factory.
1043     *
1044     * <ul>
1045     *   <li>GIGS datum code: <b>66020</b></li>
1046     *   <li>GIGS datum name: <b>GIGS geodetic datum J‴</b></li>
1047     *   <li>Ellipsoid name: <b>GIGS ellipsoid J</b></li>
1048     *   <li>Prime meridian name: <b>GIGS PM A</b></li>
1049     *   <li>GIGS coordinate reference system using the datum: <b>64031 – GIGS geogCRS J‴</b></li>
1050     * </ul>
1051     *
1052     * @throws FactoryException if an error occurred while creating the datum or a CRS from the properties.
1053     *
1054     * @see #testNAD27()
1055     */
1056    @Test
1057    public void testNAD27_p3() throws FactoryException {
1058        setCodeAndName(66020, "GIGS geodetic datum J‴");
1059        ellipsoidData.testClarke1866();
1060        primeMeridianData.testGreenwich();
1061        verifyDatum();
1062        createAndVerifyGeographicCRS(64031, "GIGS geogCRS J‴", 6422);
1063    }
1064
1065    /**
1066     * Tests “GIGS geodetic datum X′” geodetic datum creation from the factory.
1067     *
1068     * <ul>
1069     *   <li>GIGS datum code: <b>66022</b></li>
1070     *   <li>GIGS datum name: <b>GIGS geodetic datum X′</b></li>
1071     *   <li>Ellipsoid name: <b>GIGS ellipsoid X</b></li>
1072     *   <li>Prime meridian name: <b>GIGS PM A</b></li>
1073     *   <li>GIGS coordinate reference system using the datum: <b>64032 – GIGS geogCRS X′</b></li>
1074     * </ul>
1075     *
1076     * @throws FactoryException if an error occurred while creating the datum or a CRS from the properties.
1077     */
1078    @Test
1079    public void testAGD66_p1() throws FactoryException {
1080        setCodeAndName(66022, "GIGS geodetic datum X′");
1081        ellipsoidData.testAustralianNationalSpheroid();
1082        primeMeridianData.testGreenwich();
1083        verifyDatum();
1084        createAndVerifyGeographicCRS(64032, "GIGS geogCRS X′", 6422);
1085    }
1086}