Package org.locationtech.proj4j.geoapi
Class OperationFactoryWrapper
- java.lang.Object
-
- org.locationtech.proj4j.geoapi.Wrapper
-
- org.locationtech.proj4j.geoapi.OperationFactoryWrapper
-
- All Implemented Interfaces:
java.io.Serializable,org.opengis.metadata.Identifier,org.opengis.referencing.ObjectFactory,org.opengis.referencing.operation.CoordinateOperationFactory,org.opengis.referencing.ReferenceIdentifier,org.opengis.util.Factory
final class OperationFactoryWrapper extends Wrapper implements org.opengis.referencing.operation.CoordinateOperationFactory, java.io.Serializable
Wraps a PROJ4J implementation behind the equivalent GeoAPI interface.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) CoordinateTransformFactoryimplThe wrapped PROJ4 implementation.-
Fields inherited from class org.locationtech.proj4j.geoapi.Wrapper
BIDIMENSIONAL, TRIDIMENSIONAL
-
-
Constructor Summary
Constructors Modifier Constructor Description privateOperationFactoryWrapper(CoordinateTransformFactory 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.operation.CoordinateOperationcreateConcatenatedOperation(java.util.Map<java.lang.String,?> properties, org.opengis.referencing.operation.CoordinateOperation... operations)org.opengis.referencing.operation.ConversioncreateDefiningConversion(java.util.Map<java.lang.String,?> properties, org.opengis.referencing.operation.OperationMethod method, org.opengis.parameter.ParameterValueGroup parameters)org.opengis.referencing.operation.CoordinateOperationcreateOperation(org.opengis.referencing.crs.CoordinateReferenceSystem sourceCRS, org.opengis.referencing.crs.CoordinateReferenceSystem targetCRS)Creates a coordinate operation between the given pair of CRSs.org.opengis.referencing.operation.CoordinateOperationcreateOperation(org.opengis.referencing.crs.CoordinateReferenceSystem sourceCRS, org.opengis.referencing.crs.CoordinateReferenceSystem targetCRS, org.opengis.referencing.operation.OperationMethod method)Creates a coordinate operation between the given pair of CRSs, ignoring the given method.java.lang.StringgetCode(){@return the factory name}.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}.private static CoordinateReferenceSystemunwrap(java.lang.String name, org.opengis.referencing.crs.CoordinateReferenceSystem crs)Returns the given CRS as a PROJ4J implementation.(package private) static OperationFactoryWrapperwrap(CoordinateTransformFactory 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 CoordinateTransformFactory impl
The wrapped PROJ4 implementation.
-
-
Constructor Detail
-
OperationFactoryWrapper
private OperationFactoryWrapper(CoordinateTransformFactory impl)
Creates a new wrapper for the given PROJ4J implementation.
-
-
Method Detail
-
wrap
static OperationFactoryWrapper wrap(CoordinateTransformFactory 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
-
unwrap
private static CoordinateReferenceSystem unwrap(java.lang.String name, org.opengis.referencing.crs.CoordinateReferenceSystem crs)
Returns the given CRS as a PROJ4J implementation. This method avoids loading theImporterclass when the given CRS is a PROJ4J wrapper.- Parameters:
name- "source" or "target", in case an error message needs to be producedcrs- the CRS to unwrap- Returns:
- the PROJ4J object for the given CRS.
-
createOperation
public org.opengis.referencing.operation.CoordinateOperation createOperation(org.opengis.referencing.crs.CoordinateReferenceSystem sourceCRS, org.opengis.referencing.crs.CoordinateReferenceSystem targetCRS) throws org.opengis.util.FactoryExceptionCreates a coordinate operation between the given pair of CRSs.- Specified by:
createOperationin interfaceorg.opengis.referencing.operation.CoordinateOperationFactory- Parameters:
sourceCRS- the source coordinate reference systemtargetCRS- the target coordinate reference system- Returns:
- coordinate operation from source to target
- Throws:
org.opengis.util.FactoryException- if the operation cannot be created
-
createOperation
public org.opengis.referencing.operation.CoordinateOperation createOperation(org.opengis.referencing.crs.CoordinateReferenceSystem sourceCRS, org.opengis.referencing.crs.CoordinateReferenceSystem targetCRS, org.opengis.referencing.operation.OperationMethod method) throws org.opengis.util.FactoryExceptionCreates a coordinate operation between the given pair of CRSs, ignoring the given method.- Specified by:
createOperationin interfaceorg.opengis.referencing.operation.CoordinateOperationFactory- Parameters:
sourceCRS- the source coordinate reference systemtargetCRS- the target coordinate reference systemmethod- ignored- Returns:
- coordinate operation from source to target
- Throws:
org.opengis.util.FactoryException- if the operation cannot be created
-
createConcatenatedOperation
public org.opengis.referencing.operation.CoordinateOperation createConcatenatedOperation(java.util.Map<java.lang.String,?> properties, org.opengis.referencing.operation.CoordinateOperation... operations) throws org.opengis.util.FactoryException- Specified by:
createConcatenatedOperationin interfaceorg.opengis.referencing.operation.CoordinateOperationFactory- Throws:
org.opengis.util.FactoryException
-
createDefiningConversion
public org.opengis.referencing.operation.Conversion createDefiningConversion(java.util.Map<java.lang.String,?> properties, org.opengis.referencing.operation.OperationMethod method, org.opengis.parameter.ParameterValueGroup parameters) throws org.opengis.util.FactoryException- Specified by:
createDefiningConversionin interfaceorg.opengis.referencing.operation.CoordinateOperationFactory- Throws:
org.opengis.util.FactoryException
-
-