java.lang.Object
org.opengis.cite.ogcapifeatures10.conformance.crs.query.crs.CoordinateSystem

public class CoordinateSystem extends Object
Encapsulates an CRS from
Author:
Lyn Goltz
  • Constructor Details

    • CoordinateSystem

      public CoordinateSystem(String code)

      Constructor for CoordinateSystem.

      Parameters:
      code - the coordinate system, never null
  • Method Details

    • getCode

      public String getCode()

      Getter for the field code.

      Returns:
      the code of the crs, never null
    • getAsHeaderValue

      public String getAsHeaderValue()

      getAsHeaderValue.

      Returns:
      the crs as header value (like <CODE>, never null
    • getSrid

      public int getSrid()
      srid from the passed crs
      Returns:
      the parsed srid, -1 if the crs is null
    • getCodeWithAuthority

      public String getCodeWithAuthority()

      getCodeWithAuthority.

      Returns:
      the code with the authority: EPSG:CODE, may be null
    • isValid

      public boolean isValid()
        1. For http-URIs (starting with http:) validate that the string conforms to the syntax specified
           by RFC 7230, section 2.7.1.
        2. For https-URIs (starting with https:) validate that the string conforms to the syntax specified
           by RFC 7230, section 2.7.2.
        3. For URNs (starting with urn:) validate that the string conforms to the syntax specified
           by RFC 8141, section 2.
        4. For OGC URNs (starting with urn:ogc:def:crs:) and OGC http-URIs (starting with http://www.opengis.net/def/crs/)
           validate that the string conforms to the syntax specified by OGC Name Type Specification - definitions - part 1 – basic name.
       
      Returns:
      true if the crs is valid, false otherwise
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object