Class Geographic3Dto2D
java.lang.Object
org.apache.sis.io.wkt.FormattableObject
org.apache.sis.referencing.AbstractIdentifiedObject
org.apache.sis.referencing.operation.DefaultOperationMethod
org.apache.sis.internal.referencing.provider.AbstractProvider
org.apache.sis.internal.referencing.provider.GeodeticOperation
org.apache.sis.internal.referencing.provider.GeographicRedimension
org.apache.sis.internal.referencing.provider.Geographic3Dto2D
- All Implemented Interfaces:
Serializable
,Formattable
,MathTransformProvider
,Deprecable
,LenientComparable
,org.opengis.referencing.IdentifiedObject
,org.opengis.referencing.operation.OperationMethod
The provider for "Geographic 3D to 2D conversion" (EPSG:9659).
This is a trivial operation that just drop the height in a geographic coordinate.
The inverse operation arbitrarily sets the ellipsoidal height to zero.
- Since:
- 0.7
- Version:
- 1.3
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
A temporary placeholder used for formatting aPARAM_MT["Geographic 3D to 2D conversion"]
element in Well-Known Text format. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.opengis.parameter.ParameterDescriptorGroup
The group of all parameters expected by this coordinate operation (in this case, none).private static final long
Serial number for inter-operability with different versions.private org.opengis.referencing.operation.MathTransform
The unique instance, created when first needed.Fields inherited from class org.apache.sis.internal.referencing.provider.GeodeticOperation
redimensioned
Fields inherited from class org.apache.sis.internal.referencing.provider.AbstractProvider
sourceCSType, sourceOnEllipsoid, targetCSType, targetOnEllipsoid
Fields inherited from class org.apache.sis.referencing.AbstractIdentifiedObject
DEPRECATED_KEY, LOCALE_KEY
Fields inherited from interface org.opengis.referencing.IdentifiedObject
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY
Fields inherited from interface org.opengis.referencing.operation.OperationMethod
FORMULA_KEY
-
Constructor Summary
ConstructorsModifierConstructorDescriptionConstructs a provider with default parameters.private
Geographic3Dto2D
(GeodeticOperation[] redimensioned) Constructs a provider that can be resized. -
Method Summary
Modifier and TypeMethodDescriptionorg.opengis.referencing.operation.MathTransform
createMathTransform
(org.opengis.referencing.operation.MathTransformFactory factory, org.opengis.parameter.ParameterValueGroup values) Returns the transform.(package private) static AbstractProvider
getMethod
(org.opengis.parameter.ParameterDescriptorGroup desc) Workaround while waiting for JDK 9.inverse()
Returns the inverse of this operation.Methods inherited from class org.apache.sis.internal.referencing.provider.GeodeticOperation
redimension, variant3D
Methods inherited from class org.apache.sis.internal.referencing.provider.AbstractProvider
addIdentifierAndLegacy, addNameAndLegacy, builder, createLatitude, createLongitude, createMandatoryLatitude, createScale, createShift, createZeroConstant, getOperationType, recoverableException, resolveAmbiguity
Methods inherited from class org.apache.sis.referencing.operation.DefaultOperationMethod
castOrCopy, computeHashCode, equals, formatTo, getFormula, getInterface, getParameters, getSourceDimensions, getTargetDimensions, redimension
Methods inherited from class org.apache.sis.referencing.AbstractIdentifiedObject
castOrCopy, equals, formatTo, getAlias, getDescription, getIdentifiers, getName, getRemarks, hashCode, isDeprecated, isHeuristicMatchForName
Methods inherited from class org.apache.sis.io.wkt.FormattableObject
print, toString, toString, toWKT
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.opengis.referencing.IdentifiedObject
getAlias, getIdentifiers, getName, getRemarks, toWKT
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerial number for inter-operability with different versions.- See Also:
-
PARAMETERS
public static final org.opengis.parameter.ParameterDescriptorGroup PARAMETERSThe group of all parameters expected by this coordinate operation (in this case, none). -
transform
private transient org.opengis.referencing.operation.MathTransform transformThe unique instance, created when first needed.
-
-
Constructor Details
-
Geographic3Dto2D
public Geographic3Dto2D()Constructs a provider with default parameters. -
Geographic3Dto2D
Constructs a provider that can be resized.
-
-
Method Details
-
inverse
Returns the inverse of this operation.- Overrides:
inverse
in classGeodeticOperation
- Returns:
this
for mostGeodeticOperation
instances.- See Also:
-
getMethod
Workaround while waiting for JDK 9. After migration to Jigsaw,inverse()
should return directly the unique provider instance. -
createMathTransform
public org.opengis.referencing.operation.MathTransform createMathTransform(org.opengis.referencing.operation.MathTransformFactory factory, org.opengis.parameter.ParameterValueGroup values) throws org.opengis.util.FactoryException Returns the transform.Implementation note: creating a transform that drop a dimension is trivial. We even have a helper method for that:Matrices.createDimensionSelect(int, int[])
The difficulty is that the inverse of that transform will set the height to NaN, while we want zero. The trick is to first create the transform for the inverse transform with the zero that we want, then get the inverse of that inverse transform. The transform that we get will remember where it come from (its inverse).This work with SIS implementation, but is not guaranteed to work with other implementations. For that reason, this method does not use the given
factory
.- Specified by:
createMathTransform
in interfaceMathTransformProvider
- Overrides:
createMathTransform
in classGeographicRedimension
- Parameters:
factory
- ignored (can be null).values
- ignored.- Returns:
- the math transform.
- Throws:
org.opengis.util.FactoryException
- should never happen.
-