Class SRSInfo


  • public class SRSInfo
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      SRSInfo​(int srid)
      SRID will be converted to EPSG URI: http://www.opengis.net/def/crs/EPSG/0/srid.
      SRSInfo​(java.lang.String srsURI)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static org.locationtech.jts.geom.Envelope buildDomainEnvelope​(org.opengis.referencing.crs.CoordinateReferenceSystem crs, java.lang.Boolean isAxisXY)  
      static java.lang.Boolean checkAxisXY​(org.opengis.referencing.crs.CoordinateReferenceSystem crs)  
      static java.lang.String convertSRID​(int srid)  
      static java.lang.String convertSRID​(java.math.BigInteger srid)  
      boolean equals​(java.lang.Object obj)  
      org.opengis.referencing.crs.CoordinateReferenceSystem getCrs()
      OpenGIS Coordinate Reference System.
      static SRSInfo getDefaultWktCRS84​(java.lang.String srsURI)  
      org.locationtech.jts.geom.Envelope getDomainEnvelope()
      Domain of validity in XY coordinate order.
      double getDomainRangeX()
      Range of domain of validity in X axis.
      java.lang.String getSrsURI()
      URI of the Spatial Reference System
      Identical values to SRID.
      UnitsOfMeasure getUnitsOfMeasure()
      Units of Measure for the coordinate reference system.
      static SRSInfo getUnrecognised​(java.lang.String srsURI)
      Unrecognised SRS URI are assumed to follow the default CRS84 so that operations do not error but may not complete as expected.
      int hashCode()  
      java.lang.Boolean isAxisXY()
      Check if axis is in XY order.
      java.lang.Boolean isGeographic()
      Check if the SRS is geographic (i.e.
      java.lang.Boolean isSRSRecognised()
      Check if the SRS URI is recognised as a OpenGIS coordinate reference system.
      java.lang.Boolean isWktDefault()
      Check if the SRS is default for WKT Literals.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • DEFAULT_WKT_CRS84_CODE

        public static final java.lang.String DEFAULT_WKT_CRS84_CODE
        See Also:
        Constant Field Values
      • DEFAULT_WKT_CRS84

        public static final SRSInfo DEFAULT_WKT_CRS84
    • Method Detail

      • checkAxisXY

        public static final java.lang.Boolean checkAxisXY​(org.opengis.referencing.crs.CoordinateReferenceSystem crs)
      • buildDomainEnvelope

        public static final org.locationtech.jts.geom.Envelope buildDomainEnvelope​(org.opengis.referencing.crs.CoordinateReferenceSystem crs,
                                                                                   java.lang.Boolean isAxisXY)
      • convertSRID

        public static final java.lang.String convertSRID​(java.math.BigInteger srid)
        Parameters:
        srid -
        Returns:
        srsURI using SRID
      • convertSRID

        public static final java.lang.String convertSRID​(int srid)
        Parameters:
        srid -
        Returns:
        srsURI using SRID
      • getSrsURI

        public java.lang.String getSrsURI()
        URI of the Spatial Reference System
        Identical values to SRID.
        Returns:
        SRS URI
      • getCrs

        public org.opengis.referencing.crs.CoordinateReferenceSystem getCrs()
        OpenGIS Coordinate Reference System.
        Returns:
        Coordinate Reference System
      • getUnitsOfMeasure

        public UnitsOfMeasure getUnitsOfMeasure()
        Units of Measure for the coordinate reference system.
        Returns:
        Units of Measure
      • isAxisXY

        public java.lang.Boolean isAxisXY()
        Check if axis is in XY order.
        Returns:
        True if XY order.
      • isSRSRecognised

        public java.lang.Boolean isSRSRecognised()
        Check if the SRS URI is recognised as a OpenGIS coordinate reference system.
        Returns:
        True if SRS is recognised.
      • isGeographic

        public java.lang.Boolean isGeographic()
        Check if the SRS is geographic (i.e. latitude, longitude on a sphere).
        Returns:
        True if a Geographic SRS, e.g. WGS84.
      • isWktDefault

        public java.lang.Boolean isWktDefault()
        Check if the SRS is default for WKT Literals.
        Returns:
        True if CRS84 SRS, i.e. http://www.opengis.net/def/crs/OGC/1.3/CRS84.
      • getDomainEnvelope

        public org.locationtech.jts.geom.Envelope getDomainEnvelope()
        Domain of validity in XY coordinate order.
        Returns:
        Bounding box of valid values.
      • getDomainRangeX

        public double getDomainRangeX()
        Range of domain of validity in X axis.
        Returns:
        Difference between min and max values in X axis.
      • getDefaultWktCRS84

        public static final SRSInfo getDefaultWktCRS84​(java.lang.String srsURI)
                                                throws SRSInfoException
        Parameters:
        srsURI - Allows alternative srsURI to be associated with CRS84.
        Returns:
        SRSInfo using default setup for WKT but alternative srsURI.
        Throws:
        SRSInfoException
      • getUnrecognised

        public static final SRSInfo getUnrecognised​(java.lang.String srsURI)
                                             throws SRSInfoException
        Unrecognised SRS URI are assumed to follow the default CRS84 so that operations do not error but may not complete as expected.
        Parameters:
        srsURI -
        Returns:
        SRSInfo with default setup for WKT without SRS URI
        Throws:
        SRSInfoException
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object