Class DefaultProjectedCRS

    • Method Detail

      • 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.
      • 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:
        Abstract­CS​.for­Convention(Axes­Convention)
      • 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:
        WKT 2 specification §9