org.opengis.cite.ogcapifeatures10.conformance.crs.query.crs

## Class CoordinateSystem

- 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 Summary

    Constructors
    Constructor and Description
    `CoordinateSystem(String code)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `String` | `getAsHeaderValue()`
    `String` | `getCode()`
    `String` | `getCodeWithAuthority()`
    `int` | `getSrid()` srid from the passed crs
    `int` | `hashCode()`
    `boolean` | `isValid()` 1.
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### CoordinateSystem

          public CoordinateSystem(String code)

      Parameters:
        `code` - the coordinate system, never `null`

  - ### Method Detail

    - #### getCode

          public String getCode()

      Returns:
        the code of the crs, never `null`

    - #### getAsHeaderValue

          public String 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`
      Throws:
        `UnknownCrsException` - if the srid could not be parsed

    - #### getCodeWithAuthority

          public String getCodeWithAuthority()

      Returns:
        the code with the authority: EPSG:CODE, may be `null`
      Throws:
        `UnknownCrsException` - if the crs is not a OGC URN (starting with urn:ogc:def:crs:epsg) or OGC http-URIs (starting with http://www.opengis.net/def/crs/epsg) with EPSG auhority

    - #### 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`

Copyright © 2023 Open Geospatial Consortium. All rights reserved.