Package org.geotools.referencing.datum

Examples of org.geotools.referencing.datum.DefaultGeodeticDatum


     */
    public GeographicCRS getGeographicCRS() {
        if (geographicCRS == null) {
            final String name = Vocabulary.format(VocabularyKeys.GEODETIC_2D);
            geographicCRS = new DefaultGeographicCRS(name,
                    new DefaultGeodeticDatum(name, getEllipsoid(), DefaultPrimeMeridian.GREENWICH),
                        DefaultEllipsoidalCS.GEODETIC_2D);
        }
        return geographicCRS;
    }
View Full Code Here


        if (identifiers == null)
            throw new IllegalArgumentException("Reference Identifier not available");
        final Map<String, Object> properties = new HashMap<String, Object>(4);
        properties.put(DefaultGeodeticDatum.NAME_KEY, identifiers[0]);
        properties.put(DefaultGeodeticDatum.ALIAS_KEY, identifiers);
        DefaultGeodeticDatum datum = new DefaultGeodeticDatum(properties, ellipsoid,
                DefaultPrimeMeridian.GREENWICH);
        return datum;
    }
View Full Code Here

    /**
     * Build a base {@link GeographicCRS} given the parameters to specify a Geodetic Datum
     */
    public static GeographicCRS getBaseCRS(final double equatorialRadius,
            final double inverseFlattening) {
        final DefaultGeodeticDatum datum = Utilities.getDefaultGeodeticDatum("WGS84",
                equatorialRadius, inverseFlattening, SI.METER);
        final GeographicCRS sourceCRS = new DefaultGeographicCRS("WGS-84", datum,
                DefaultGeographicCRS.WGS84.getCoordinateSystem());
        return sourceCRS;
    }
View Full Code Here

      // lookup the Prime Meridian.
      final PrimeMeridian primeMeridian = createPrimeMeridian(metadata,
          unit);

      // DATUM
      datum = new DefaultGeodeticDatum(datumName, ellipsoid,
          primeMeridian);
    } else {
      /**
       * NOT USER DEFINED DATUM
       */
 
View Full Code Here

        properties.put("scope",         "This is a scope");
        properties.put("scope_fr",      "Valide dans ce domaine");
        properties.put("remarks",       "There is remarks");
        properties.put("remarks_fr",    "Voici des remarques");

        DefaultGeodeticDatum datum = new DefaultGeodeticDatum(properties,
                DefaultEllipsoid.createEllipsoid("Test", 1000, 1000, SI.METER),
                new DefaultPrimeMeridian("Test", 12));

        assertEquals("name",          "This is a name",         datum.getName   ().getCode());
        assertEquals("scope",         "This is a scope",        datum.getScope  ().toString(null));
        assertEquals("scope_fr",      "Valide dans ce domaine", datum.getScope  ().toString(Locale.FRENCH));
        assertEquals("remarks",       "There is remarks",       datum.getRemarks().toString(null));
        assertEquals("remarks_fr",    "Voici des remarques",    datum.getRemarks().toString(Locale.FRENCH));
    }
View Full Code Here

        getTestData().copyTo(OvverideCRSTest.class.getResourceAsStream("override_epsg.properties"), "epsg/override_epsg.properties");
    }
   
    public void testOverride() throws Exception {
        CoordinateReferenceSystem epsg3003 = CRS.decode("EPSG:3003");
        DefaultGeodeticDatum datum3003 = (DefaultGeodeticDatum) (((ProjectedCRSepsg3003).getDatum());
        BursaWolfParameters[] bwParamArray3003 = datum3003.getBursaWolfParameters();
        assertEquals(1, bwParamArray3003.length);
        BursaWolfParameters bw3003 = bwParamArray3003[0];
        assertEquals(-104.1, bw3003.dx);
        assertEquals(-49.1, bw3003.dy);
        assertEquals(-9.9, bw3003.dz);
        assertEquals(0.971, bw3003.ex);
        assertEquals(-2.917, bw3003.ey);
        assertEquals(0.714, bw3003.ez);
        assertEquals(-11.68, bw3003.ppm);
       
        // without an override they should be the same as 3002
        CoordinateReferenceSystem epsg3002 = CRS.decode("EPSG:3002");
        DefaultGeodeticDatum datum3002 = (DefaultGeodeticDatum) (((ProjectedCRSepsg3002).getDatum());
        BursaWolfParameters[] bwParamArray3002 = datum3002.getBursaWolfParameters();
        assertEquals(1, bwParamArray3002.length);
        BursaWolfParameters bw3002 = bwParamArray3002[0];
        assertFalse(bw3002.equals(bw3003));
    }
View Full Code Here

    }

    @Test
    public void testOverride() throws Exception {
        CoordinateReferenceSystem epsg3003 = CRS.decode("EPSG:3003");
        DefaultGeodeticDatum datum3003 = (DefaultGeodeticDatum) (((ProjectedCRSepsg3003).getDatum());
        BursaWolfParameters[] bwParamArray3003 = datum3003.getBursaWolfParameters();
        assertEquals(1, bwParamArray3003.length);
        BursaWolfParameters bw3003 = bwParamArray3003[0];
        double tol = 1E-7;
        assertEquals(-104.1, bw3003.dx, tol);
        assertEquals(-49.1, bw3003.dy, tol);
        assertEquals(-9.9, bw3003.dz, tol);
        assertEquals(0.971, bw3003.ex, tol);
        assertEquals(-2.917, bw3003.ey, tol);
        assertEquals(0.714, bw3003.ez, tol);
        assertEquals(-11.68, bw3003.ppm, tol);
       
        // without an override they should be the same as 3002
        CoordinateReferenceSystem epsg3002 = CRS.decode("EPSG:3002");
        DefaultGeodeticDatum datum3002 = (DefaultGeodeticDatum) (((ProjectedCRSepsg3002).getDatum());
        BursaWolfParameters[] bwParamArray3002 = datum3002.getBursaWolfParameters();
        assertEquals(1, bwParamArray3002.length);
        BursaWolfParameters bw3002 = bwParamArray3002[0];
        assertFalse(bw3002.equals(bw3003));
    }
View Full Code Here

TOP

Related Classes of org.geotools.referencing.datum.DefaultGeodeticDatum

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.