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) CRSFactoryimplThe wrapped PROJ4 implementation.-
Fields inherited from class org.locationtech.proj4j.geoapi.Wrapper
BIDIMENSIONAL, TRIDIMENSIONAL
-
-
Constructor Summary
Constructors Modifier Constructor Description privateAuthorityFactoryWrapper(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.CompoundCRScreateCompoundCRS(java.lang.String code)org.opengis.referencing.crs.CoordinateReferenceSystemcreateCoordinateReferenceSystem(java.lang.String code)Creates a CRS from a code in the"AUTHORITY:CODE"syntax.org.opengis.referencing.crs.DerivedCRScreateDerivedCRS(java.lang.String code)org.opengis.referencing.crs.EngineeringCRScreateEngineeringCRS(java.lang.String code)org.opengis.referencing.crs.GeocentricCRScreateGeocentricCRS(java.lang.String code)org.opengis.referencing.crs.GeographicCRScreateGeographicCRS(java.lang.String code)Creates the CRS from the specified code and cast to a geographic CRS.org.opengis.referencing.crs.ImageCRScreateImageCRS(java.lang.String code)org.opengis.referencing.IdentifiedObjectcreateObject(java.lang.String code)Generic method defined in parent interface.org.opengis.referencing.crs.ProjectedCRScreateProjectedCRS(java.lang.String code)Creates the CRS from the specified code and cast to a projected CRS.org.opengis.referencing.crs.TemporalCRScreateTemporalCRS(java.lang.String code)org.opengis.referencing.crs.VerticalCRScreateVerticalCRS(java.lang.String code)java.util.Set<java.lang.String>getAuthorityCodes(java.lang.Class<? extends org.opengis.referencing.IdentifiedObject> type)java.lang.StringgetCode(){@return the factory name}.org.opengis.util.InternationalStringgetDescriptionText(java.lang.String code)Returns the name of the CRS for the given code.org.opengis.metadata.citation.CitationgetVendor(){@return an identification of the softwware that provides the CRS definitions}.(package private) java.lang.Objectimplementation(){@return the PROJ4J backing implementation}.(package private) static AuthorityFactoryWrapperwrap(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
nullif the given implementation was null
-
implementation
java.lang.Object implementation()
{@return the PROJ4J backing implementation}.- Specified by:
implementationin 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:
getVendorin interfaceorg.opengis.util.Factory
-
getDescriptionText
public org.opengis.util.InternationalString getDescriptionText(java.lang.String code) throws org.opengis.util.FactoryExceptionReturns 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(java.lang.String code) throws org.opengis.util.FactoryExceptionGeneric 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(java.lang.String code) throws org.opengis.util.FactoryExceptionCreates 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(java.lang.String code) throws org.opengis.util.FactoryExceptionCreates 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(java.lang.String code) throws org.opengis.util.FactoryExceptionCreates 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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.String code) throws org.opengis.util.FactoryException- Specified by:
createCompoundCRSin 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:
getAuthorityCodesin interfaceorg.opengis.referencing.AuthorityFactory- Throws:
org.opengis.util.FactoryException
-
-