Class DefaultProjectedCRS

All Implemented Interfaces:
Serializable, Formattable, Deprecable, Lenient­Comparable, Coordinate­Reference­System, General­Derived­CRS, Projected­CRS, Single­CRS, Identified­Object, Reference­System

public class DefaultProjectedCRS extends AbstractCRS implements ProjectedCRS
A 2-dimensional coordinate reference system used to approximate the shape of the earth on a planar surface. It is done in such a way that the distortion that is inherent to the approximation is carefully controlled and known. Distortion correction is commonly applied to calculated bearings and distances to produce values that are a close match to actual field values.

Used with datum type: Geodetic.
Used with coordinate system type: Cartesian.

Immutability and thread safety

This class is immutable and thus thread-safe if the property values (not necessarily the map itself), the coordinate system and the datum instances given to the constructor are also immutable. Unless otherwise noted in the javadoc, this condition holds if all components were created using only SIS factories and static constants.
Since:
0.6
See Also:
  • Constructor Details

  • Method Details

    • castOrCopy

      public static DefaultProjectedCRS castOrCopy(ProjectedCRS object)
      Returns a SIS coordinate reference system implementation with the same values than the given arbitrary implementation. If the given object is null, then this method returns null. Otherwise if the given object is already a SIS implementation, then the given object is returned unchanged. Otherwise a new SIS implementation is created and initialized to the attribute values of the given object.
      Parameters:
      object - the object to get as a SIS implementation, or null if none.
      Returns:
      a SIS implementation containing the values of the given object (may be the given object itself), or null if the argument was null.
    • getInterface

      public Class<? extends ProjectedCRS> getInterface()
      Returns the GeoAPI interface implemented by this class. The SIS implementation returns Projected­CRS​.class.

      Note for implementers

      Subclasses usually do not need to override this method since GeoAPI does not define Projected­CRS sub-interface. Overriding possibility is left mostly for implementers who wish to extend GeoAPI with their own set of interfaces.
      Returns:
      Projected­CRS​.class or a user-defined sub-interface.
    • getDatum

      public GeodeticDatum getDatum()
      Returns the datum of the base CRS.
      Specified by:
      get­Datum in interface Projected­CRS
      Specified by:
      get­Datum in interface Single­CRS
      Returns:
      the datum of the base CRS.
    • getBaseCRS

      public GeographicCRS getBaseCRS()
      Returns the geographic CRS on which the map projection is applied. This CRS defines the datum of this CRS and (at least implicitly) the source of the conversion from base.
      Specified by:
      get­Base­CRS in interface General­Derived­CRS
      Specified by:
      get­Base­CRS in interface Projected­CRS
      Returns:
      the base coordinate reference system, which must be geographic.
    • getConversionFromBase

      public Projection getConversionFromBase()
      Returns the map projection from the base CRS to this CRS. In Apache SIS, the conversion source and target CRS are set to the following values:
      Note: This is different than ISO 19111, which allows source and target CRS to be null.
      Specified by:
      get­Conversion­From­Base in interface General­Derived­CRS
      Specified by:
      get­Conversion­From­Base in interface Projected­CRS
      Returns:
      the map projection from base CRS to this CRS.
    • getCoordinateSystem

      public final CartesianCS getCoordinateSystem()
      Returns the coordinate system.
      Specified by:
      get­Coordinate­System in interface Coordinate­Reference­System
      Specified by:
      get­Coordinate­System in interface Projected­CRS
      Specified by:
      get­Coordinate­System in interface Single­CRS
      Overrides:
      get­Coordinate­System in class Abstract­CRS
      Returns:
      the coordinate system.
    • forConvention

      public DefaultProjectedCRS forConvention(AxesConvention convention)
      Returns a coordinate reference system equivalent to this one but with axes rearranged according the given convention. If this CRS is already compatible with the given convention, then this method returns this.
      Overrides:
      for­Convention in class Abstract­CRS
      Parameters:
      convention - the axes convention for which a coordinate reference system is desired.
      Returns:
      a coordinate reference system compatible with the given convention (may be this).
      See Also:
    • equals

      public boolean equals(Object object, ComparisonMode mode)
      Compares this coordinate reference system with the specified object for equality. In addition to the metadata documented in the parent class, this method considers coordinate system axes of the base CRS as metadata. This means that if the given Comparison­Mode is IGNORE_METADATA or APPROXIMATE, then axis order of the base geographic CRS are ignored (but not axis order of this projected CRS).
      Specified by:
      equals in interface Lenient­Comparable
      Parameters:
      object - the object to compare to this.
      mode - STRICT for performing a strict comparison, or IGNORE_METADATA for comparing only properties relevant to coordinate transformations.
      Returns:
      true if both objects are equal.
      See Also:
    • computeHashCode

      protected long computeHashCode()
      Invoked by hash­Code() for computing the hash code when first needed. See Abstract­Identified­Object​.compute­Hash­Code() for more information.
      Returns:
      the hash code value. This value may change in any future Apache SIS version.
    • formatTo

      protected String formatTo(Formatter formatter)
      Formats the inner part of the Well Known Text (WKT) representation of this CRS.

      Example

      Well-Known Text (version 2) of a projected coordinate reference system using the Lambert Conformal method.
      ProjectedCRS[“NTF (Paris) / Lambert zone II”,
        BaseGeodCRS[“NTF (Paris)”,
          Datum[“Nouvelle Triangulation Francaise”,
            Ellipsoid[“NTF”, 6378249.2, 293.4660212936269, LengthUnit[“metre”, 1]]],
            PrimeMeridian[“Paris”, 2.5969213, AngleUnit[“grad”, 0.015707963267948967]]],
        Conversion[“Lambert zone II”,
          Method[“Lambert Conic Conformal (1SP)”, Id[“EPSG”, 9801, Citation[“IOGP”]]],
          Parameter[“Latitude of natural origin”, 52.0, AngleUnit[“grad”, 0.015707963267948967], Id[“EPSG”, 8801]],
          Parameter[“Longitude of natural origin”, 0.0, AngleUnit[“degree”, 0.017453292519943295], Id[“EPSG”, 8802]],
          Parameter[“Scale factor at natural origin”, 0.99987742, ScaleUnit[“unity”, 1], Id[“EPSG”, 8805]],
          Parameter[“False easting”, 600000.0, LengthUnit[“metre”, 1], Id[“EPSG”, 8806]],
          Parameter[“False northing”, 2200000.0, LengthUnit[“metre”, 1], Id[“EPSG”, 8807]]],
        CS[“Cartesian”, 2],
          Axis[“Easting (E)”, east, Order[1]],
          Axis[“Northing (N)”, north, Order[2]],
          LengthUnit[“metre”, 1],
        Id[“EPSG”, 27572, Citation[“IOGP”], URI[“urn:ogc:def:crs:EPSG::27572”]]]
      

      Same coordinate reference system using WKT 1.

      PROJCS[“NTF (Paris) / Lambert zone II”,
        GEOGCS[“NTF (Paris)”,
          DATUM[“Nouvelle Triangulation Francaise”,
            SPHEROID[“NTF”, 6378249.2, 293.4660212936269]],
            PRIMEM[“Paris”, 2.33722917],
          UNIT[“degree”, 0.017453292519943295],
          AXIS[“Longitude”, EAST],
          AXIS[“Latitude”, NORTH]],
        PROJECTION[“Lambert_Conformal_Conic_1SP”, AUTHORITY[“EPSG”, “9801”]],
        PARAMETER[“latitude_of_origin”, 46.8],
        PARAMETER[“central_meridian”, 0.0],
        PARAMETER[“scale_factor”, 0.99987742],
        PARAMETER[“false_easting”, 600000.0],
        PARAMETER[“false_northing”, 2200000.0],
        UNIT[“metre”, 1],
        AXIS[“Easting”, EAST],
        AXIS[“Northing”, NORTH],
        AUTHORITY[“EPSG”, “27572”]]
      
      Overrides:
      format­To in class Abstract­CRS
      Parameters:
      formatter - the formatter where to format the inner content of this WKT element.
      Returns:
      "Projected­CRS" (WKT 2) or "Proj­CS" (WKT 1).
      See Also: