Examples of PrimeMeridian


Examples of org.opengis.referencing.datum.PrimeMeridian

     * at fault.
     */
    @Test
    @DependsOnMethod("testCreateAxis")
    public void testCreateGographicCRS() {
        final PrimeMeridian pm = StandardDefinitions.primeMeridian();
        final EllipsoidalCS cs = (EllipsoidalCS) StandardDefinitions.createCoordinateSystem((short) 6422);
        for (final CommonCRS e : CommonCRS.values()) {
            final Ellipsoid ellipsoid = StandardDefinitions.createEllipsoid(e.ellipsoid);
            switch (e) {
                case WGS84:  compare(GeodeticDatumMock.WGS84 .getEllipsoid(), ellipsoid); break;
View Full Code Here

Examples of org.opengis.referencing.datum.PrimeMeridian

                final DefaultPrimeMeridian that = (DefaultPrimeMeridian) object;
                return Numerics.equals(this.greenwichLongitude, that.greenwichLongitude) &&
                        Objects.equals(this.angularUnit,        that.angularUnit);
            }
            case BY_CONTRACT: {
                final PrimeMeridian that = (PrimeMeridian) object;
                return Numerics.equals(getGreenwichLongitude(), that.getGreenwichLongitude()) &&
                        Objects.equals(getAngularUnit(),        that.getAngularUnit());
            }
            default: {
                final DefaultPrimeMeridian that = castOrCopy((PrimeMeridian) object);
                return Numerics.epsilonEqual(this.getGreenwichLongitude(NonSI.DEGREE_ANGLE),
                                             that.getGreenwichLongitude(NonSI.DEGREE_ANGLE), mode);
                /*
                 * Note: if mode==IGNORE_METADATA, we relax the unit check because EPSG uses
                 *       sexagesimal degrees for the Greenwich meridian. Requirying the same
                 *       unit prevent Geodetic.isWGS84(...) method to recognize EPSG's WGS84.
                 */
 
View Full Code Here

Examples of org.opengis.referencing.datum.PrimeMeridian

        // Testinc Datum and Ellipsoid related parsing
        final double inverseFlattening = 298.257223563;
        final double equatorialRadius = 6378137;
        final DefaultGeodeticDatum datum = Utilities.getDefaultGeodeticDatum("WGS84",
                equatorialRadius, inverseFlattening, SI.METER);
        final PrimeMeridian primeMeridian = datum.getPrimeMeridian();
        assertEquals(0, primeMeridian.getGreenwichLongitude(), DELTA);
        final Ellipsoid ellipsoid = datum.getEllipsoid();
        assertEquals(equatorialRadius, ellipsoid.getSemiMajorAxis(), DELTA);
        assertEquals(inverseFlattening, ellipsoid.getInverseFlattening(), DELTA);

        // Testing coordinateReferenceSystem setup
View Full Code Here

Examples of org.opengis.referencing.datum.PrimeMeridian

    // + could be an EPSG code
    // + could be user defined
    // + not defined = greenwich
    final String pmCode = metadata
        .getGeoKey(GeoTiffGCSCodes.GeogPrimeMeridianGeoKey);
    PrimeMeridian pm = null;

    try {
      if (pmCode != null) {
        if (pmCode.equals(GeoTiffConstants.GTUserDefinedGeoKey_String)) {
          try {
View Full Code Here

Examples of org.opengis.referencing.datum.PrimeMeridian

      // ELLIPSOID
      final Ellipsoid ellipsoid = createEllipsoid(unit, metadata);

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

      // DATUM
      datum = new DefaultGeodeticDatum(cleanName(name), ellipsoid,primeMeridian);
    } else {
      /**
 
View Full Code Here

Examples of org.opengis.referencing.datum.PrimeMeridian

        airy1830 = datumFactory.createEllipsoid(name("Airy1830"), 6377563.396, 6356256.910, meters);
        out.println();
        out.println("create Coodinate Reference System....2: ");
        out.println(airy1830.toWKT());

        final PrimeMeridian greenwich;
        final Unit<Angle> degrees = NonSI.DEGREE_ANGLE;
        greenwich = datumFactory.createPrimeMeridian(name("Greenwich"), 0, degrees);
        out.println();
        out.println("create Coodinate Reference System....3: ");
        out.println(greenwich.toWKT());

        // NOTE: we could use the following pre-defined constant instead:
        //       DefaultPrimeMeridian.GREENWICH;
        final GeodeticDatum datum;
        datum = datumFactory.createGeodeticDatum(name("Airy1830"), airy1830, greenwich);
View Full Code Here

Examples of org.opengis.referencing.datum.PrimeMeridian

        final String           name0 = "Nouvelle Triangulation Francaise (Paris)";
        final String           name1 = "Nouvelle_Triangulation_Francaise_Paris";
        final String           name2 = "D_NTF";
        final String           name3 = "NTF (Paris meridian)";
        final Ellipsoid    ellipsoid = DefaultEllipsoid.WGS84;
        final PrimeMeridian meridian = DefaultPrimeMeridian.GREENWICH;
        DatumFactory         factory = new ReferencingObjectFactory();
        final Map<String,?> properties = Collections.singletonMap("name", name1);
        GeodeticDatum datum = factory.createGeodeticDatum(properties, ellipsoid, meridian);
        assertTrue(datum.getAlias().isEmpty());
View Full Code Here

Examples of org.opengis.referencing.datum.PrimeMeridian

*/
void premadeObjects() {
    // premadeObjects start
    GeographicCRS geoCRS = org.geotools.referencing.crs.DefaultGeographicCRS.WGS84;
    GeodeticDatum wgs84Datum = org.geotools.referencing.datum.DefaultGeodeticDatum.WGS84;
    PrimeMeridian greenwichMeridian = org.geotools.referencing.datum.DefaultPrimeMeridian.GREENWICH;
    CartesianCS cartCS = org.geotools.referencing.cs.DefaultCartesianCS.GENERIC_2D;
    CoordinateSystemAxis latAxis = org.geotools.referencing.cs.DefaultCoordinateSystemAxis.GEODETIC_LATITUDE;
    // premadeObjects end
}
View Full Code Here

Examples of org.opengis.referencing.datum.PrimeMeridian

    map.put("name", "Clarke 1866");
   
    Ellipsoid clark1866ellipse = datumFactory.createFlattenedSphere(map, 6378206.4,
            294.978698213901, SI.METER);
   
    PrimeMeridian greenwichMeridian = org.geotools.referencing.datum.DefaultPrimeMeridian.GREENWICH;
   
    final BursaWolfParameters toWGS84 = new BursaWolfParameters(DefaultGeodeticDatum.WGS84);
    toWGS84.dx = -3.0;
    toWGS84.dy = 142;
    toWGS84.dz = 183;
View Full Code Here

Examples of org.opengis.referencing.datum.PrimeMeridian

    //
    // Create a datum used for each CRS
    //
    map.clear();
    map.put("name", "Greenwich Meridian");
    PrimeMeridian greenwichMeridian = datumFactory.createPrimeMeridian(map, 0, NonSI.DEGREE_ANGLE);
   
    map.clear();
    map.put("name", "WGS 84 Ellipsoid Datum");
    Ellipsoid wgs84Ellipsoid = datumFactory.createFlattenedSphere(map, 6378137, 298.257223563,
            SI.METER);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.