public class AbstractCoordinateOperation extends AbstractIdentifiedObject implements CoordinateOperation
Default
instead.
An exception to this rule may occur when it is not possible to identify the exact operation type.
CoordinateOperation
instances created
using only SIS factories and static constants can be shared by many objects and passed between threads without
synchronization.Defined in the sis-referencing
module
DEPRECATED_KEY, LOCALE_KEY
COORDINATE_OPERATION_ACCURACY_KEY, DOMAIN_OF_VALIDITY_KEY, OPERATION_VERSION_KEY, SCOPE_KEY
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY
Modifier | Constructor and Description |
---|---|
protected |
AbstractCoordinateOperation(CoordinateOperation operation)
Creates a new coordinate operation with the same values than the specified one.
|
|
AbstractCoordinateOperation(Map<String,?> properties,
CoordinateReferenceSystem sourceCRS,
CoordinateReferenceSystem targetCRS,
CoordinateReferenceSystem interpolationCRS,
MathTransform transform)
Creates a coordinate operation from the given properties.
|
Modifier and Type | Method and Description |
---|---|
static AbstractCoordinateOperation |
castOrCopy(CoordinateOperation object)
Returns a SIS coordinate operation implementation with the values of the given arbitrary implementation.
|
protected long |
computeHashCode()
Invoked by
hashCode() for computing the hash code when first needed. |
boolean |
equals(Object object,
ComparisonMode mode)
Compares this coordinate operation with the specified object for equality.
|
protected String |
formatTo(Formatter formatter)
Formats this coordinate operation in Well Known Text (WKT) version 2 format.
|
Collection<PositionalAccuracy> |
getCoordinateOperationAccuracy()
Returns an estimation of the impact of this operation on point accuracy.
|
Extent |
getDomainOfValidity()
Returns the area or region or timeframe in which this coordinate operation is valid.
|
Class<? extends CoordinateOperation> |
getInterface()
Returns the GeoAPI interface implemented by this class.
|
CoordinateReferenceSystem |
getInterpolationCRS()
Returns the CRS which is neither the source CRS or
target CRS but still required for performing the operation.
|
double |
getLinearAccuracy()
Returns an estimation of positional accuracy in metres, or
NaN if unknown. |
MathTransform |
getMathTransform()
Returns the object for transforming coordinates in the source CRS
to coordinates in the target CRS.
|
String |
getOperationVersion()
Returns the version of the coordinate operation.
|
InternationalString |
getScope()
Returns a description of domain of usage, or limitations of usage, for which this operation is valid.
|
CoordinateReferenceSystem |
getSourceCRS()
Returns the source CRS, or
null if unspecified. |
CoordinateReferenceSystem |
getTargetCRS()
Returns the target CRS, or
null if unspecified. |
Set<Integer> |
getWrapAroundChanges()
Returns the indices of target dimensions where "wrap around" may happen as a result of this coordinate operation.
|
boolean |
isDefiningConversion()
|
castOrCopy, equals, getAlias, getDescription, getIdentifiers, getName, getRemarks, hashCode, isDeprecated, isHeuristicMatchForName
print, toString, toString, toWKT
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getAlias, getIdentifiers, getName, getRemarks, toWKT
public AbstractCoordinateOperation(Map<String,?> properties, CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, CoordinateReferenceSystem interpolationCRS, MathTransform transform)
Property name | Value type | Returned by |
---|---|---|
"operationVersion" | String |
getOperationVersion() |
"coordinateOperationAccuracy" | PositionalAccuracy (optionally as array) |
getCoordinateOperationAccuracy() |
"domainOfValidity" | Extent |
getDomainOfValidity() |
"scope" | InternationalString or String |
getScope() |
Defined in parent class (reminder) | ||
"name" | Identifier or String |
AbstractIdentifiedObject.getName() |
"alias" | GenericName or CharSequence (optionally as array) |
AbstractIdentifiedObject.getAlias() |
"identifiers" | Identifier (optionally as array) |
AbstractIdentifiedObject.getIdentifiers() |
"remarks" | InternationalString or String |
AbstractIdentifiedObject.getRemarks() |
properties
can be null
.
If non-null, the dimension of CRS arguments shall be related to the transform
argument as below:
sourceCRS
shall be equal to the transform
source dimension minus the dimension of the interpolationCRS
(if any).targetCRS
shall be equal to the transform
target dimension, minus the dimension of the interpolationCRS
(if any).interpolationCRS
is non-null, then the given transform
shall expect input ordinates
in the following order:
properties
- the properties to be given to the identified object.sourceCRS
- the source CRS, or null
if unspecified.targetCRS
- the target CRS, or null
if unspecified.interpolationCRS
- the CRS of additional coordinates needed for the operation, or null
if none.transform
- transform from positions in the source CRS to positions in the target CRS,
or null
if unspecified.protected AbstractCoordinateOperation(CoordinateOperation operation)
This constructor performs a shallow copy, i.e. the properties are not cloned.
operation
- the coordinate operation to copy.castOrCopy(CoordinateOperation)
public static AbstractCoordinateOperation castOrCopy(CoordinateOperation object)
null
, then this method returns null
.Transformation
,
Conversion
,
Projection
,
CylindricalProjection
,
ConicProjection
,
PlanarProjection
,
PassThroughOperation
or
ConcatenatedOperation
,
then this method delegates to the castOrCopy(…)
method of the corresponding SIS subclass.
Note that if the given object implements more than one of the above-cited interfaces,
then the castOrCopy(…)
method to be used is unspecified.AbstractCoordinateOperation
, then it is returned unchanged.AbstractCoordinateOperation
instance is created using the
copy constructor
and returned. Note that this is a shallow copy operation, since the other
properties contained in the given object are not recursively copied.object
- the object to get as a SIS implementation, or null
if none.null
if the argument was null.public Class<? extends CoordinateOperation> getInterface()
CoordinateOperation.class
.
Subclasses implementing a more specific GeoAPI interface shall override this method.getInterface
in class AbstractIdentifiedObject
public boolean isDefiningConversion()
true
if this coordinate operation is for the definition of a
derived or
projected CRS.
The standard (ISO 19111) approach constructs defining conversion
as an operation of type Conversion
with null source and target CRS.
But SIS supports also defining conversions with non-null CRS provided that:
GeneralDerivedCRS.getBaseCRS()
is the source CRS of this operation, andGeneralDerivedCRS.getConversionFromBase()
is this operation instance.true
, the source and target CRS are not marshalled in XML documents.true
if this coordinate operation is for the definition of a derived or projected CRS.public CoordinateReferenceSystem getSourceCRS()
null
if unspecified.
The source CRS is mandatory for transformations only.
This information is optional for conversions according
the ISO 19111 standard, but Apache SIS tries to provide that CRS in most cases anyway.getSourceCRS
in interface CoordinateOperation
null
if not available.public CoordinateReferenceSystem getTargetCRS()
null
if unspecified.
The target CRS is mandatory for transformations only.
This information is optional for conversions according
the ISO 19111 standard, but Apache SIS tries to provide that CRS in most cases anyway.getTargetCRS
in interface CoordinateOperation
null
if not available.public CoordinateReferenceSystem getInterpolationCRS()
null
if none.public String getOperationVersion()
getOperationVersion
in interface CoordinateOperation
null
in none.public Collection<PositionalAccuracy> getCoordinateOperationAccuracy()
getCoordinateOperationAccuracy
in interface CoordinateOperation
getLinearAccuracy()
public double getLinearAccuracy()
NaN
if unknown.
The default implementation tries to infer a value from the metadata returned by
getCoordinateOperationAccuracy()
using SIS-specific heuristics.
CRS.getLinearAccuracy(CoordinateOperation)
public Extent getDomainOfValidity()
getDomainOfValidity
in interface CoordinateOperation
null
if not available.public InternationalString getScope()
getScope
in interface CoordinateOperation
null
if none.public MathTransform getMathTransform()
getMathTransform
in interface CoordinateOperation
null
if not applicable.public Set<Integer> getWrapAroundChanges()
ProjectedCRS
is a special case of
GeneralDerivedCRS
and derived CRS can have rotations.The default implementation infers this set by inspecting the source and target coordinate system axes.
It returns the indices of all target axes having RangeMeaning.WRAPAROUND
and for which the following condition holds: a colinear source axis exists with compatible unit of measurement,
and the range (taking unit conversions in account) or range meaning of those source and target axes are not
the same.
public boolean equals(Object object, ComparisonMode mode)
mode
argument
is ComparisonMode.STRICT
or BY_CONTRACT
, then all available
properties are compared including the domain of validity and the
scope.equals
in interface LenientComparable
equals
in class AbstractIdentifiedObject
object
- the object to compare to this
.mode
- STRICT
for performing a strict comparison, or
IGNORE_METADATA
for ignoring properties
that do not make a difference in the numerical results of coordinate operations.true
if both objects are equal for the given comparison mode.AbstractIdentifiedObject.computeHashCode()
,
Utilities.deepEquals(Object, Object, ComparisonMode)
protected long computeHashCode()
hashCode()
for computing the hash code when first needed.
See AbstractIdentifiedObject.computeHashCode()
for more information.computeHashCode
in class AbstractIdentifiedObject
protected String formatTo(Formatter formatter)
formatTo
in class AbstractIdentifiedObject
formatter
- the formatter to use."CoordinateOperation"
.Copyright © 2010–2017 The Apache Software Foundation. All rights reserved.