Class CoordinateOperations
java.lang.Object
org.apache.sis.internal.system.SystemListener
org.apache.sis.internal.referencing.CoordinateOperations
- All Implemented Interfaces:
EventListener
The default coordinate operation factory, provided in a separated class for deferring class loading
until first needed. Contains also utility methods related to coordinate operations.
- Since:
- 0.7
- Version:
- 1.1
- Author:
- Martin Desruisseaux (Geomatys)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringTheDefaultGeodeticDatum.BURSA_WOLF_KEYvalue.static final ThreadLocal<Supplier<double[]>> Value ofCoordinateOperationContext.getConstantCoordinates().static final StringThe key for specifying the base type of the coordinate operation to create.static final StringThe key for specifying explicitly the value to be returned bySingleOperation.getParameterValues(). -
Method Summary
Modifier and TypeMethodDescriptionprotected voidInvoked when the classpath changed.factory()Returns the factory.static DefaultMathTransformFactoryReturns the SIS implementation ofMathTransformFactory.static org.opengis.referencing.operation.CoordinateOperationFactorygetCoordinateOperationFactory(Map<String, ?> properties, org.opengis.referencing.operation.MathTransformFactory mtFactory, org.opengis.referencing.crs.CRSFactory crsFactory, org.opengis.referencing.cs.CSFactory csFactory) Returns the coordinate operation factory to use for the given properties and math transform factory.static org.opengis.referencing.operation.OperationMethodgetOperationMethod(Iterable<? extends org.opengis.referencing.operation.OperationMethod> methods, String identifier) Returns the operation method for the specified name or identifier.static booleanisWrapAround(org.opengis.referencing.cs.CoordinateSystemAxis axis) Returnstrueif the given axis is of kind "Wrap Around".wrapAroundChanges(org.opengis.referencing.crs.CoordinateReferenceSystem source, org.opengis.referencing.cs.CoordinateSystem target) Computes indices of target dimensions where "wrap around" may happen as a result of a coordinate operation.wrapAroundChanges(org.opengis.referencing.operation.CoordinateOperation op) Returns indices of target dimensions where "wrap around" may happen as a result of a coordinate operation.Methods inherited from class org.apache.sis.internal.system.SystemListener
add, databaseChanged, fireClasspathChanged, remove
-
Field Details
-
BURSA_WOLF_KEY
TheDefaultGeodeticDatum.BURSA_WOLF_KEYvalue.- See Also:
-
PARAMETERS_KEY
The key for specifying explicitly the value to be returned bySingleOperation.getParameterValues(). It is usually not necessary to specify those parameters because they are inferred either from theMathTransform, or specified explicitly in aDefiningConversion. However, there is a few cases, for example the Molodenski transform, where none of the above can apply, because SIS implements those operations as a concatenation of math transforms, and such concatenations do not haveParameterValueGroup.- See Also:
-
OPERATION_TYPE_KEY
The key for specifying the base type of the coordinate operation to create. This optional entry is used byDefaultCoordinateOperationFactory.createSingleOperation(…). Apache SIS tries to infer this value automatically, but this entry may help SIS to perform a better choice in some cases. For example, an "Affine" operation can be both a conversion or a transformation (the latter is used in datum shift in geocentric coordinates).- See Also:
-
CONSTANT_COORDINATES
Value ofCoordinateOperationContext.getConstantCoordinates(). This thread-local is used as a workaround for the fact that we do not yet provide a public API for this functionality. This workaround should be deleted after a public API is defined.
-
-
Method Details
-
classpathChanged
protected void classpathChanged()Invoked when the classpath changed.- Specified by:
classpathChangedin classSystemListener
-
factory
Returns the factory.- Returns:
- the system-wide factory.
-
factoryMT
Returns the SIS implementation ofMathTransformFactory.- Returns:
- SIS implementation of transform factory.
-
getCoordinateOperationFactory
public static org.opengis.referencing.operation.CoordinateOperationFactory getCoordinateOperationFactory(Map<String, ?> properties, org.opengis.referencing.operation.MathTransformFactory mtFactory, org.opengis.referencing.crs.CRSFactory crsFactory, org.opengis.referencing.cs.CSFactory csFactory) Returns the coordinate operation factory to use for the given properties and math transform factory. If the given properties are empty and themtFactoryis the system default, then this method returns the system defaultCoordinateOperationFactoryinstead of creating a new one.It is okay to set all parameters to
nullin order to get the system default factory.- Parameters:
properties- the default properties.mtFactory- the math transform factory to use.crsFactory- the factory to use if the operation factory needs to create CRS for intermediate steps.csFactory- the factory to use if the operation factory needs to create CS for intermediate steps.- Returns:
- the coordinate operation factory to use.
-
getOperationMethod
public static org.opengis.referencing.operation.OperationMethod getOperationMethod(Iterable<? extends org.opengis.referencing.operation.OperationMethod> methods, String identifier) Returns the operation method for the specified name or identifier. The given argument shall be either a method name (e.g. "Transverse Mercator") or one of its identifiers (e.g."EPSG:9807").- Parameters:
methods- the method candidates.identifier- the name or identifier of the operation method to search.- Returns:
- the coordinate operation method for the given name or identifier, or
nullif none. - See Also:
-
isWrapAround
public static boolean isWrapAround(org.opengis.referencing.cs.CoordinateSystemAxis axis) Returnstrueif the given axis is of kind "Wrap Around". Defined here because used together withwrapAroundChanges(…).- Parameters:
axis- the axis to test.- Returns:
trueif the given axis has "wrap around" range meaning.
-
wrapAroundChanges
public static Set<Integer> wrapAroundChanges(org.opengis.referencing.operation.CoordinateOperation op) Returns indices of target dimensions where "wrap around" may happen as a result of a coordinate operation. This is usually the longitude axis when the source CRS uses the [-180 … +180]° range and the target CRS uses the [0 … 360]° range, or the converse.- Parameters:
op- the coordinate operation for which to get "wrap around" target dimensions.- Returns:
- target dimensions where "wrap around" may happen, or an empty set if none.
- See Also:
-
wrapAroundChanges
public static Set<Integer> wrapAroundChanges(org.opengis.referencing.crs.CoordinateReferenceSystem source, org.opengis.referencing.cs.CoordinateSystem target) Computes indices of target dimensions where "wrap around" may happen as a result of a coordinate operation. This is usually the longitude axis when the source CRS uses the [-180 … +180]° range and the target CRS uses the [0 … 360]° range, or the converse.- Parameters:
source- the source of the coordinate operation.target- the target of the coordinate operation.- Returns:
- target dimensions where "wrap around" may happen, or an empty set if none.
-