Class SubTypes
java.lang.Object
org.apache.sis.referencing.operation.SubTypes
Implementation of
AbstractCoordinateOperation
methods that require knowledge about subclasses.
Those methods are defined in a separated static class for avoiding class loading of all implementations
before necessary.
This class currently provides implementation for the following methods:
- Since:
- 0.6
- Version:
- 0.7
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static AbstractCoordinateOperation
castOrCopy
(org.opengis.referencing.operation.CoordinateOperation object) Returns a SIS implementation for the given coordinate operation.(package private) static <T extends org.opengis.referencing.operation.Conversion>
Tcreate
(Class<T> baseType, org.opengis.referencing.operation.Conversion definition, org.opengis.referencing.crs.CoordinateReferenceSystem sourceCRS, org.opengis.referencing.crs.CoordinateReferenceSystem targetCRS, org.opengis.referencing.operation.MathTransformFactory factory) Returns a conversion from the specified defining conversion.(package private) static DefaultConversion
forConversion
(org.opengis.referencing.operation.Conversion object) Returns a SIS implementation for the given conversion.(package private) static boolean
isSingleOperation
(org.opengis.referencing.operation.CoordinateOperation operation) Returnstrue
if the given operation is a single operation but not a pass-through operation.
-
Constructor Details
-
SubTypes
private SubTypes()Do not allow instantiation of this class.
-
-
Method Details
-
isSingleOperation
static boolean isSingleOperation(org.opengis.referencing.operation.CoordinateOperation operation) Returnstrue
if the given operation is a single operation but not a pass-through operation. In an older ISO 19111 model,PassThroughOperation
extendedSingleOperation
, which was a problem for providing a value to the inheritedSingleOperation.getMethod()
method. This has been fixed in newer ISO 19111 model, but for safety with objects following the older model (e.g. GeoAPI 3.0) we are better to perform an explicit exclusion ofPassThroughOperation
. -
castOrCopy
static AbstractCoordinateOperation castOrCopy(org.opengis.referencing.operation.CoordinateOperation object) Returns a SIS implementation for the given coordinate operation. -
forConversion
Returns a SIS implementation for the given conversion.- See Also:
-
create
static <T extends org.opengis.referencing.operation.Conversion> T create(Class<T> baseType, org.opengis.referencing.operation.Conversion definition, org.opengis.referencing.crs.CoordinateReferenceSystem sourceCRS, org.opengis.referencing.crs.CoordinateReferenceSystem targetCRS, org.opengis.referencing.operation.MathTransformFactory factory) throws org.opengis.util.FactoryException Returns a conversion from the specified defining conversion. The new conversion will be a more specific type like a planar, cylindrical or conic projection. The returned conversion will implement at least thebaseType
interface, but may implement a more specific GeoAPI interface if this method has been able to infer the type from theconversion
argument.- Parameters:
baseType
- the base GeoAPI interface to be implemented by the conversion to return.definition
- the defining conversion.sourceCRS
- the source CRS.targetCRS
- the target CRS.factory
- the factory to use for creating a transform from the parameters or for performing axis changes.- Returns:
- the conversion of the given type between the given CRS.
- Throws:
ClassCastException
- if a contradiction is found between the givenbaseType
, the defining conversion type and the method operation type.org.opengis.util.FactoryException
-