Class OperationFactoryWrapper
java.lang.Object
org.locationtech.proj4j.geoapi.Wrapper
org.locationtech.proj4j.geoapi.OperationFactoryWrapper
- All Implemented Interfaces:
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, Serializable
Wraps a PROJ4J implementation behind the equivalent GeoAPI interface.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final CoordinateTransformFactoryThe 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.operation.CoordinateOperationcreateConcatenatedOperation(Map<String, ?> properties, org.opengis.referencing.operation.CoordinateOperation... operations) org.opengis.referencing.operation.ConversioncreateDefiningConversion(Map<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.getCode()Returns the factory name.org.opengis.metadata.citation.CitationReturns an identification of the softwware that provides the CRS definitions.(package private) ObjectReturns the PROJ4J backing implementation.private static CoordinateReferenceSystemReturns the given CRS as a PROJ4J implementation.(package private) static OperationFactoryWrapperWraps the given implementation.Methods inherited from class Wrapper
equals, getAlias, getAuthority, getCodeSpace, getDomainOfValidity, getIdentifiers, getName, getRemarks, getScope, getVersion, hashCode, toString, toWKT
-
Field Details
-
impl
The wrapped PROJ4 implementation.
-
-
Constructor Details
-
OperationFactoryWrapper
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
-
unwrap
private static CoordinateReferenceSystem unwrap(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.FactoryException Creates 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.FactoryException Creates 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(Map<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(Map<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
-