Class AuthorityFactoryWrapper

java.lang.Object
org.locationtech.proj4j.geoapi.Wrapper
org.locationtech.proj4j.geoapi.AuthorityFactoryWrapper
All Implemented Interfaces:
Serializable, org.opengis.metadata.Identifier, org.opengis.referencing.AuthorityFactory, org.opengis.referencing.crs.CRSAuthorityFactory, org.opengis.referencing.ReferenceIdentifier, org.opengis.util.Factory

final class AuthorityFactoryWrapper extends Wrapper implements org.opengis.referencing.crs.CRSAuthorityFactory, Serializable
Wraps a PROJ4J implementation behind the equivalent GeoAPI interface.
  • Field Details

    • impl

      final CRSFactory impl
      The wrapped PROJ4 implementation.
  • Constructor Details

    • AuthorityFactoryWrapper

      private AuthorityFactoryWrapper(CRSFactory impl)
      Creates a new wrapper for the given PROJ4J implementation.
  • Method Details

    • wrap

      static AuthorityFactoryWrapper wrap(CRSFactory impl)
      Wraps the given implementation.
      Parameters:
      impl - the implementation to wrap, or null
      Returns:
      the wrapper, or null if the given implementation was null
    • implementation

      Object implementation()
      Returns the PROJ4J backing implementation..
      Specified by:
      implementation in class Wrapper
      Returns:
      the PROJ4J backing implementation
    • getCode

      public String getCode()
      Returns the factory name..
      Specified by:
      getCode in interface org.opengis.metadata.Identifier
      Specified by:
      getCode in class Wrapper
      Returns:
      the factory name
    • getVendor

      public org.opengis.metadata.citation.Citation getVendor()
      Returns an identification of the softwware that provides the CRS definitions.. This is not the authority (EPSG, ESRI, etc).
      Specified by:
      getVendor in interface org.opengis.util.Factory
      Returns:
      an identification of the softwware that provides the CRS definitions
    • getDescriptionText

      public org.opengis.util.InternationalString getDescriptionText(String code) throws org.opengis.util.FactoryException
      Returns the name of the CRS for the given code. Usually, this method is for fetching the name without the cost of creating the full CRS. However, this implementation is inefficient in this regard.
      Specified by:
      getDescriptionText in interface org.opengis.referencing.AuthorityFactory
      Throws:
      org.opengis.util.FactoryException
    • createObject

      public org.opengis.referencing.IdentifiedObject createObject(String code) throws org.opengis.util.FactoryException
      Generic method defined in parent interface.
      Specified by:
      createObject in interface org.opengis.referencing.AuthorityFactory
      Throws:
      org.opengis.util.FactoryException
    • createCoordinateReferenceSystem

      public org.opengis.referencing.crs.CoordinateReferenceSystem createCoordinateReferenceSystem(String code) throws org.opengis.util.FactoryException
      Creates a CRS from a code in the "AUTHORITY:CODE" syntax. If the authority is unspecified, then "EPSG" is assumed.
      Specified by:
      createCoordinateReferenceSystem in interface org.opengis.referencing.crs.CRSAuthorityFactory
      Parameters:
      code - the authority (optional) and code of the CRS to create
      Returns:
      the CRS for the given code
      Throws:
      org.opengis.util.FactoryException - if the CRS cannot be created
    • createGeographicCRS

      public org.opengis.referencing.crs.GeographicCRS createGeographicCRS(String code) throws org.opengis.util.FactoryException
      Creates the CRS from the specified code and cast to a geographic CRS.
      Specified by:
      createGeographicCRS in interface org.opengis.referencing.crs.CRSAuthorityFactory
      Parameters:
      code - the authority (optional) and code of the CRS to create
      Returns:
      the CRS for the given code
      Throws:
      org.opengis.util.FactoryException - if the CRS cannot be created or is not geographic
    • createProjectedCRS

      public org.opengis.referencing.crs.ProjectedCRS createProjectedCRS(String code) throws org.opengis.util.FactoryException
      Creates the CRS from the specified code and cast to a projected CRS.
      Specified by:
      createProjectedCRS in interface org.opengis.referencing.crs.CRSAuthorityFactory
      Parameters:
      code - the authority (optional) and code of the CRS to create
      Returns:
      the CRS for the given code
      Throws:
      org.opengis.util.FactoryException - if the CRS cannot be created or is not projected
    • createGeocentricCRS

      public org.opengis.referencing.crs.GeocentricCRS createGeocentricCRS(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
      Specified by:
      createGeocentricCRS in interface org.opengis.referencing.crs.CRSAuthorityFactory
      Throws:
      org.opengis.referencing.NoSuchAuthorityCodeException
      org.opengis.util.FactoryException
    • createVerticalCRS

      public org.opengis.referencing.crs.VerticalCRS createVerticalCRS(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
      Specified by:
      createVerticalCRS in interface org.opengis.referencing.crs.CRSAuthorityFactory
      Throws:
      org.opengis.referencing.NoSuchAuthorityCodeException
      org.opengis.util.FactoryException
    • createTemporalCRS

      public org.opengis.referencing.crs.TemporalCRS createTemporalCRS(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
      Specified by:
      createTemporalCRS in interface org.opengis.referencing.crs.CRSAuthorityFactory
      Throws:
      org.opengis.referencing.NoSuchAuthorityCodeException
      org.opengis.util.FactoryException
    • createEngineeringCRS

      public org.opengis.referencing.crs.EngineeringCRS createEngineeringCRS(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
      Specified by:
      createEngineeringCRS in interface org.opengis.referencing.crs.CRSAuthorityFactory
      Throws:
      org.opengis.referencing.NoSuchAuthorityCodeException
      org.opengis.util.FactoryException
    • createImageCRS

      public org.opengis.referencing.crs.ImageCRS createImageCRS(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
      Specified by:
      createImageCRS in interface org.opengis.referencing.crs.CRSAuthorityFactory
      Throws:
      org.opengis.referencing.NoSuchAuthorityCodeException
      org.opengis.util.FactoryException
    • createDerivedCRS

      public org.opengis.referencing.crs.DerivedCRS createDerivedCRS(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
      Specified by:
      createDerivedCRS in interface org.opengis.referencing.crs.CRSAuthorityFactory
      Throws:
      org.opengis.referencing.NoSuchAuthorityCodeException
      org.opengis.util.FactoryException
    • createCompoundCRS

      public org.opengis.referencing.crs.CompoundCRS createCompoundCRS(String code) throws org.opengis.util.FactoryException
      Specified by:
      createCompoundCRS in interface org.opengis.referencing.crs.CRSAuthorityFactory
      Throws:
      org.opengis.util.FactoryException
    • getAuthorityCodes

      public Set<String> getAuthorityCodes(Class<? extends org.opengis.referencing.IdentifiedObject> type) throws org.opengis.util.FactoryException
      Specified by:
      getAuthorityCodes in interface org.opengis.referencing.AuthorityFactory
      Throws:
      org.opengis.util.FactoryException