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 Details

  • Constructor Details

    • OperationFactoryWrapper

      private OperationFactoryWrapper(CoordinateTransformFactory impl)
      Creates a new wrapper for the given PROJ4J implementation.
  • Method Details

    • wrap

      Wraps the given implementation.
      Parameters:
      impl - the implementation to wrap, or null
      Returns:
      the wrapper, or null if the given implementation was null
    • implementation

      Object implementation()
      Returns the PROJ4J backing implementation..
      Specified by:
      implementation in class Wrapper
      Returns:
      the PROJ4J backing implementation
    • getCode

      public String getCode()
      Returns the factory name..
      Specified by:
      getCode in interface org.opengis.metadata.Identifier
      Specified by:
      getCode in class Wrapper
      Returns:
      the factory name
    • 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:
      getVendor in interface org.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 the Importer class when the given CRS is a PROJ4J wrapper.
      Parameters:
      name - "source" or "target", in case an error message needs to be produced
      crs - 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:
      createOperation in interface org.opengis.referencing.operation.CoordinateOperationFactory
      Parameters:
      sourceCRS - the source coordinate reference system
      targetCRS - 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:
      createOperation in interface org.opengis.referencing.operation.CoordinateOperationFactory
      Parameters:
      sourceCRS - the source coordinate reference system
      targetCRS - the target coordinate reference system
      method - 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:
      createConcatenatedOperation in interface org.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:
      createDefiningConversion in interface org.opengis.referencing.operation.CoordinateOperationFactory
      Throws:
      org.opengis.util.FactoryException