Package org.locationtech.proj4j.geoapi
Class AuthorityFactoryWrapper
- java.lang.Object
-
- org.locationtech.proj4j.geoapi.Wrapper
-
- org.locationtech.proj4j.geoapi.AuthorityFactoryWrapper
-
- All Implemented Interfaces:
java.io.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, java.io.Serializable
Wraps a PROJ4J implementation behind the equivalent GeoAPI interface.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) CRSFactory
impl
The wrapped PROJ4 implementation.-
Fields inherited from class org.locationtech.proj4j.geoapi.Wrapper
BIDIMENSIONAL, TRIDIMENSIONAL
-
-
Constructor Summary
Constructors Modifier Constructor Description private
AuthorityFactoryWrapper(CRSFactory impl)
Creates a new wrapper for the given PROJ4J implementation.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.opengis.referencing.crs.CompoundCRS
createCompoundCRS(java.lang.String code)
org.opengis.referencing.crs.CoordinateReferenceSystem
createCoordinateReferenceSystem(java.lang.String code)
Creates a CRS from a code in the"AUTHORITY:CODE"
syntax.org.opengis.referencing.crs.DerivedCRS
createDerivedCRS(java.lang.String code)
org.opengis.referencing.crs.EngineeringCRS
createEngineeringCRS(java.lang.String code)
org.opengis.referencing.crs.GeocentricCRS
createGeocentricCRS(java.lang.String code)
org.opengis.referencing.crs.GeographicCRS
createGeographicCRS(java.lang.String code)
Creates the CRS from the specified code and cast to a geographic CRS.org.opengis.referencing.crs.ImageCRS
createImageCRS(java.lang.String code)
org.opengis.referencing.IdentifiedObject
createObject(java.lang.String code)
Generic method defined in parent interface.org.opengis.referencing.crs.ProjectedCRS
createProjectedCRS(java.lang.String code)
Creates the CRS from the specified code and cast to a projected CRS.org.opengis.referencing.crs.TemporalCRS
createTemporalCRS(java.lang.String code)
org.opengis.referencing.crs.VerticalCRS
createVerticalCRS(java.lang.String code)
java.util.Set<java.lang.String>
getAuthorityCodes(java.lang.Class<? extends org.opengis.referencing.IdentifiedObject> type)
java.lang.String
getCode()
{@return the factory name}.org.opengis.util.InternationalString
getDescriptionText(java.lang.String code)
Returns the name of the CRS for the given code.org.opengis.metadata.citation.Citation
getVendor()
{@return an identification of the softwware that provides the CRS definitions}.(package private) java.lang.Object
implementation()
{@return the PROJ4J backing implementation}.(package private) static AuthorityFactoryWrapper
wrap(CRSFactory impl)
Wraps the given implementation.-
Methods inherited from class org.locationtech.proj4j.geoapi.Wrapper
equals, getAlias, getAuthority, getCodeSpace, getDomainOfValidity, getIdentifiers, getName, getRemarks, getScope, getVersion, hashCode, toString, toWKT
-
-
-
-
Field Detail
-
impl
final CRSFactory impl
The wrapped PROJ4 implementation.
-
-
Constructor Detail
-
AuthorityFactoryWrapper
private AuthorityFactoryWrapper(CRSFactory impl)
Creates a new wrapper for the given PROJ4J implementation.
-
-
Method Detail
-
wrap
static AuthorityFactoryWrapper wrap(CRSFactory impl)
Wraps the given implementation.- Parameters:
impl
- the implementation to wrap, ornull
- Returns:
- the wrapper, or
null
if the given implementation was null
-
implementation
java.lang.Object implementation()
{@return the PROJ4J backing implementation}.- Specified by:
implementation
in classWrapper
-
getCode
public java.lang.String getCode()
{@return the factory name}.
-
getVendor
public org.opengis.metadata.citation.Citation getVendor()
{@return an identification of the softwware that provides the CRS definitions}. This is not the authority (EPSG, ESRI, etc).- Specified by:
getVendor
in interfaceorg.opengis.util.Factory
-
getDescriptionText
public org.opengis.util.InternationalString getDescriptionText(java.lang.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 interfaceorg.opengis.referencing.AuthorityFactory
- Throws:
org.opengis.util.FactoryException
-
createObject
public org.opengis.referencing.IdentifiedObject createObject(java.lang.String code) throws org.opengis.util.FactoryException
Generic method defined in parent interface.- Specified by:
createObject
in interfaceorg.opengis.referencing.AuthorityFactory
- Throws:
org.opengis.util.FactoryException
-
createCoordinateReferenceSystem
public org.opengis.referencing.crs.CoordinateReferenceSystem createCoordinateReferenceSystem(java.lang.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 interfaceorg.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(java.lang.String code) throws org.opengis.util.FactoryException
Creates the CRS from the specified code and cast to a geographic CRS.- Specified by:
createGeographicCRS
in interfaceorg.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(java.lang.String code) throws org.opengis.util.FactoryException
Creates the CRS from the specified code and cast to a projected CRS.- Specified by:
createProjectedCRS
in interfaceorg.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(java.lang.String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
- Specified by:
createGeocentricCRS
in interfaceorg.opengis.referencing.crs.CRSAuthorityFactory
- Throws:
org.opengis.referencing.NoSuchAuthorityCodeException
org.opengis.util.FactoryException
-
createVerticalCRS
public org.opengis.referencing.crs.VerticalCRS createVerticalCRS(java.lang.String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
- Specified by:
createVerticalCRS
in interfaceorg.opengis.referencing.crs.CRSAuthorityFactory
- Throws:
org.opengis.referencing.NoSuchAuthorityCodeException
org.opengis.util.FactoryException
-
createTemporalCRS
public org.opengis.referencing.crs.TemporalCRS createTemporalCRS(java.lang.String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
- Specified by:
createTemporalCRS
in interfaceorg.opengis.referencing.crs.CRSAuthorityFactory
- Throws:
org.opengis.referencing.NoSuchAuthorityCodeException
org.opengis.util.FactoryException
-
createEngineeringCRS
public org.opengis.referencing.crs.EngineeringCRS createEngineeringCRS(java.lang.String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
- Specified by:
createEngineeringCRS
in interfaceorg.opengis.referencing.crs.CRSAuthorityFactory
- Throws:
org.opengis.referencing.NoSuchAuthorityCodeException
org.opengis.util.FactoryException
-
createImageCRS
public org.opengis.referencing.crs.ImageCRS createImageCRS(java.lang.String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
- Specified by:
createImageCRS
in interfaceorg.opengis.referencing.crs.CRSAuthorityFactory
- Throws:
org.opengis.referencing.NoSuchAuthorityCodeException
org.opengis.util.FactoryException
-
createDerivedCRS
public org.opengis.referencing.crs.DerivedCRS createDerivedCRS(java.lang.String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
- Specified by:
createDerivedCRS
in interfaceorg.opengis.referencing.crs.CRSAuthorityFactory
- Throws:
org.opengis.referencing.NoSuchAuthorityCodeException
org.opengis.util.FactoryException
-
createCompoundCRS
public org.opengis.referencing.crs.CompoundCRS createCompoundCRS(java.lang.String code) throws org.opengis.util.FactoryException
- Specified by:
createCompoundCRS
in interfaceorg.opengis.referencing.crs.CRSAuthorityFactory
- Throws:
org.opengis.util.FactoryException
-
getAuthorityCodes
public java.util.Set<java.lang.String> getAuthorityCodes(java.lang.Class<? extends org.opengis.referencing.IdentifiedObject> type) throws org.opengis.util.FactoryException
- Specified by:
getAuthorityCodes
in interfaceorg.opengis.referencing.AuthorityFactory
- Throws:
org.opengis.util.FactoryException
-
-