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 Summary
FieldsModifier and TypeFieldDescription(package private) final CRSFactoryThe wrapped PROJ4 implementation.Fields inherited from class Wrapper
BIDIMENSIONAL, TRIDIMENSIONALFields inherited from interface org.opengis.metadata.Identifier
AUTHORITY_KEY, CODE_KEYFields inherited from interface org.opengis.referencing.ReferenceIdentifier
CODESPACE_KEY, VERSION_KEY -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateCreates a new wrapper for the given PROJ4J implementation. -
Method Summary
Modifier and TypeMethodDescriptionorg.opengis.referencing.crs.CompoundCRScreateCompoundCRS(String code) org.opengis.referencing.crs.CoordinateReferenceSystemCreates a CRS from a code in the"AUTHORITY:CODE"syntax.org.opengis.referencing.crs.DerivedCRScreateDerivedCRS(String code) org.opengis.referencing.crs.EngineeringCRScreateEngineeringCRS(String code) org.opengis.referencing.crs.GeocentricCRScreateGeocentricCRS(String code) org.opengis.referencing.crs.GeographicCRScreateGeographicCRS(String code) Creates the CRS from the specified code and cast to a geographic CRS.org.opengis.referencing.crs.ImageCRScreateImageCRS(String code) org.opengis.referencing.IdentifiedObjectcreateObject(String code) Generic method defined in parent interface.org.opengis.referencing.crs.ProjectedCRScreateProjectedCRS(String code) Creates the CRS from the specified code and cast to a projected CRS.org.opengis.referencing.crs.TemporalCRScreateTemporalCRS(String code) org.opengis.referencing.crs.VerticalCRScreateVerticalCRS(String code) getAuthorityCodes(Class<? extends org.opengis.referencing.IdentifiedObject> type) getCode()Returns the factory name.org.opengis.util.InternationalStringgetDescriptionText(String code) Returns the name of the CRS for the given code.org.opengis.metadata.citation.CitationReturns an identification of the softwware that provides the CRS definitions.(package private) ObjectReturns the PROJ4J backing implementation.(package private) static AuthorityFactoryWrapperwrap(CRSFactory impl) Wraps the given implementation.Methods inherited from class Wrapper
equals, getAlias, getAuthority, getCodeSpace, getDomainOfValidity, getIdentifiers, getName, getRemarks, getScope, getVersion, hashCode, toString, toWKTMethods inherited from interface org.opengis.referencing.AuthorityFactory
getAuthority
-
Field Details
-
impl
The wrapped PROJ4 implementation.
-
-
Constructor Details
-
AuthorityFactoryWrapper
Creates a new wrapper for the given PROJ4J implementation.
-
-
Method Details
-
wrap
Wraps the given implementation.- Parameters:
impl- the implementation to wrap, ornull- Returns:
- the wrapper, or
nullif the given implementation was null
-
implementation
Object implementation()Returns the PROJ4J backing implementation..- Specified by:
implementationin classWrapper- Returns:
- the PROJ4J backing implementation
-
getCode
-
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:
getVendorin interfaceorg.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:
getDescriptionTextin interfaceorg.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:
createObjectin interfaceorg.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:
createCoordinateReferenceSystemin 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(String code) throws org.opengis.util.FactoryException Creates the CRS from the specified code and cast to a geographic CRS.- Specified by:
createGeographicCRSin 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(String code) throws org.opengis.util.FactoryException Creates the CRS from the specified code and cast to a projected CRS.- Specified by:
createProjectedCRSin 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(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException - Specified by:
createGeocentricCRSin interfaceorg.opengis.referencing.crs.CRSAuthorityFactory- Throws:
org.opengis.referencing.NoSuchAuthorityCodeExceptionorg.opengis.util.FactoryException
-
createVerticalCRS
public org.opengis.referencing.crs.VerticalCRS createVerticalCRS(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException - Specified by:
createVerticalCRSin interfaceorg.opengis.referencing.crs.CRSAuthorityFactory- Throws:
org.opengis.referencing.NoSuchAuthorityCodeExceptionorg.opengis.util.FactoryException
-
createTemporalCRS
public org.opengis.referencing.crs.TemporalCRS createTemporalCRS(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException - Specified by:
createTemporalCRSin interfaceorg.opengis.referencing.crs.CRSAuthorityFactory- Throws:
org.opengis.referencing.NoSuchAuthorityCodeExceptionorg.opengis.util.FactoryException
-
createEngineeringCRS
public org.opengis.referencing.crs.EngineeringCRS createEngineeringCRS(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException - Specified by:
createEngineeringCRSin interfaceorg.opengis.referencing.crs.CRSAuthorityFactory- Throws:
org.opengis.referencing.NoSuchAuthorityCodeExceptionorg.opengis.util.FactoryException
-
createImageCRS
public org.opengis.referencing.crs.ImageCRS createImageCRS(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException - Specified by:
createImageCRSin interfaceorg.opengis.referencing.crs.CRSAuthorityFactory- Throws:
org.opengis.referencing.NoSuchAuthorityCodeExceptionorg.opengis.util.FactoryException
-
createDerivedCRS
public org.opengis.referencing.crs.DerivedCRS createDerivedCRS(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException - Specified by:
createDerivedCRSin interfaceorg.opengis.referencing.crs.CRSAuthorityFactory- Throws:
org.opengis.referencing.NoSuchAuthorityCodeExceptionorg.opengis.util.FactoryException
-
createCompoundCRS
public org.opengis.referencing.crs.CompoundCRS createCompoundCRS(String code) throws org.opengis.util.FactoryException - Specified by:
createCompoundCRSin interfaceorg.opengis.referencing.crs.CRSAuthorityFactory- Throws:
org.opengis.util.FactoryException
-
getAuthorityCodes
-