Class DefaultConversion
- All Implemented Interfaces:
Serializable,IdentifiedObject,Conversion,CoordinateOperation,Operation,SingleOperation
- Direct Known Subclasses:
DefaultProjection,DefiningConversion
An operation on coordinates that does not include any change of Datum. The best-known example of a coordinate
conversion is a map projection. The parameters describing coordinate conversions are defined rather than empirically
derived. Note that some conversions have no parameters.
- Since:
- 2.1
- Author:
- Martin Desruisseaux (IRD)
- See Also:
-
Field Summary
Fields inherited from class DefaultOperation
methodFields inherited from class AbstractCoordinateOperation
domainOfValidity, EMPTY_ACCURACY_ARRAY, sourceCRS, targetCRS, transformFields inherited from class AbstractIdentifiedObject
EMPTY_ALIAS_ARRAY, EMPTY_IDENTIFIER_ARRAY, IDENTIFIER_COMPARATOR, NAME_COMPARATOR, REMARKS_COMPARATORFields inherited from class Formattable
SINGLE_LINEFields inherited from interface CoordinateOperation
COORDINATE_OPERATION_ACCURACY_KEY, DOMAIN_OF_VALIDITY_KEY, OPERATION_VERSION_KEY, SCOPE_KEYFields inherited from interface IdentifiedObject
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY -
Constructor Summary
ConstructorsConstructorDescriptionDefaultConversion(Map<String, ?> properties, CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, MathTransform transform, OperationMethod method) Constructs a conversion from a set of properties.DefaultConversion(Conversion definition, CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, MathTransform transform) Constructs a new conversion with the same values than the specified one, together with the specified source and target CRS. -
Method Summary
Modifier and TypeMethodDescriptionstatic Conversioncreate(Conversion definition, CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, MathTransform transform, Class<? extends Conversion> typeHint) Returns a conversion from the specified defining conversion.Methods inherited from class DefaultOperation
create, equals, formatWKT, getMethod, getParameterValues, hashCodeMethods inherited from class AbstractCoordinateOperation
getAccuracy, getAccuracy, getCoordinateOperationAccuracy, getDomainOfValidity, getMathTransform, getOperationVersion, getScope, getSourceCRS, getTargetCRS, getTypeMethods inherited from class AbstractIdentifiedObject
asSet, ensureAngularUnit, ensureLinearUnit, ensureNonNull, ensureNonNull, ensureTimeUnit, equals, equals, equals, equals, getAlias, getIdentifier, getIdentifier, getIdentifiers, getName, getName, getName, getProperties, getProperties, getRemarks, nameMatches, nameMatches, nameMatchesMethods inherited from class Formattable
cleanupThreadLocals, toString, toWKT, toWKT, toWKT, toWKTMethods inherited from interface Conversion
getOperationVersion, getSourceCRS, getTargetCRSMethods inherited from interface CoordinateOperation
getCoordinateOperationAccuracy, getDomainOfValidity, getMathTransform, getScopeMethods inherited from interface IdentifiedObject
getAlias, getIdentifiers, getName, getRemarks, toWKTMethods inherited from interface Operation
getMethod, getParameterValues
-
Constructor Details
-
DefaultConversion
public DefaultConversion(Conversion definition, CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, MathTransform transform) Constructs a new conversion with the same values than the specified one, together with the specified source and target CRS. While the source conversion can be an arbitrary one, it is typically a defining conversion.- Parameters:
definition- The defining conversion.sourceCRS- The source CRS.targetCRS- The target CRS.transform- Transform from positions in the source CRS to positions in the target CRS.
-
DefaultConversion
public DefaultConversion(Map<String, ?> properties, CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, MathTransform transform, OperationMethod method) Constructs a conversion from a set of properties. The properties given in argument follow the same rules than for theAbstractCoordinateOperationconstructor.- Parameters:
properties- Set of properties. Should contains at least"name".sourceCRS- The source CRS.targetCRS- The target CRS.transform- Transform from positions in the source CRS to positions in the target CRS.method- The operation method.
-
-
Method Details
-
create
public static Conversion create(Conversion definition, CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, MathTransform transform, Class<? extends Conversion> typeHint) Returns a conversion from the specified defining conversion. The new conversion will be a more specific type like a planar, cylindrical or conic projection. This type is inferred from theconversionargument when possible. However the inferred type is not always the most accurate one, so an optionaltypeHintargument may be specified in order to get a more specific subclass. This later argument is just a hint: it may benulland will be ignored if it conflict with the automatically inferred type.- Parameters:
definition- The defining conversion.sourceCRS- The source CRS.targetCRS- The target CRS.transform- Transform from positions in the source CRS to positions in the target CRS.typeHint- One ofPlanarProjection.class,CylindricalProjection.classorConicProjection.class, ornull.- Returns:
- The conversion of the given type if possible.
- Since:
- 2.4
- See Also:
-