Class ZonedGridSystem
java.lang.Object
org.apache.sis.io.wkt.FormattableObject
org.apache.sis.referencing.operation.transform.AbstractMathTransform
org.apache.sis.referencing.operation.transform.AbstractMathTransform2D
org.apache.sis.referencing.operation.projection.ZonedGridSystem
- All Implemented Interfaces:
Serializable
,Parameterized
,LenientComparable
,org.opengis.referencing.operation.MathTransform
,org.opengis.referencing.operation.MathTransform2D
Transverse Mercator Zoned Grid System projection (EPSG codes 9824).
This projection is valid for all the world in a given hemisphere, except the poles.
The Earth is divided into zones, usually 6° width. The zone number is determined
automatically from the longitude and is prefixed to the Easting value.
This map projection is not suitable for geometric calculations like distances and angles, since there is discontinuities (gaps) between zones. Actually this operation is not handled as a map projection by Apache SIS, as can be seen from the different class hierarchy.
Note:
current implementation can only be backed by the Transverse Mercator projection,
but future versions could apply to some other projections if needed.
Examples of CRS using this projection are WGS 84 / UTM grid system EPSG:32600 (northern hemisphere) and EPSG:32700 (southern hemisphere).
- Since:
- 0.8
- Version:
- 1.3
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final class
Inverse of a zoned grid system. -
Field Summary
FieldsModifier and TypeFieldDescription(package private) final double
Westernmost longitude of the first zone.private final org.opengis.referencing.operation.MathTransform2D
The inverse of this map projection.(package private) final AbstractMathTransform
The projection that performs the actual work before we add the zone number.private static final double
The 360° range of longitude values.private static final long
For cross-version compatibility.private static final double
The zone multiplication factor for encoding the zone in the easting.(package private) final double
Width of each Transverse Mercator zone, in the same units than longitude values.Fields inherited from class org.apache.sis.referencing.operation.transform.AbstractMathTransform2D
DIMENSION
-
Constructor Summary
ConstructorsConstructorDescriptionZonedGridSystem
(org.opengis.referencing.operation.OperationMethod method, Parameters parameters, org.opengis.referencing.operation.MathTransformFactory factory) Creates a Zoned Grid System from the given parameters. -
Method Summary
Modifier and TypeMethodDescriptionprotected int
Computes a hash code value for thisZonedGridSystem
.boolean
equals
(Object object, ComparisonMode mode) Compares the given object with this transform for equivalence.Optional
<org.opengis.geometry.Envelope> getDomain
(DomainDefinition criteria) Returns the domain of input coordinates.org.opengis.parameter.ParameterValueGroup
Returns the parameter values of this zoned grid system projection.org.opengis.referencing.operation.MathTransform2D
inverse()
Returns the inverse of this map projection.org.opengis.referencing.operation.Matrix
transform
(double[] srcPts, int srcOff, double[] dstPts, int dstOff, boolean derivate) Projects the specified (λ,φ) coordinates and stores the result indstPts
.Methods inherited from class org.apache.sis.referencing.operation.transform.AbstractMathTransform2D
createTransformedShape, derivative, getSourceDimensions, getTargetDimensions, transform
Methods inherited from class org.apache.sis.referencing.operation.transform.AbstractMathTransform
derivative, equals, formatTo, getContextualParameters, getParameterDescriptors, hashCode, isIdentity, transform, transform, transform, transform, transform, tryConcatenate
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.operation.MathTransform
derivative, isIdentity, toWKT, transform, transform, transform, transform, transform
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor cross-version compatibility.- See Also:
-
RANGE
private static final double RANGEThe 360° range of longitude values.- See Also:
-
ZONE_SCALE
private static final double ZONE_SCALEThe zone multiplication factor for encoding the zone in the easting. This scale factor assumes that the projection results are in metres.- See Also:
-
initialLongitude
final double initialLongitudeWesternmost longitude of the first zone. -
zoneWidth
final double zoneWidthWidth of each Transverse Mercator zone, in the same units than longitude values. This is usually 6°. -
projection
The projection that performs the actual work before we add the zone number. -
inverse
private final org.opengis.referencing.operation.MathTransform2D inverseThe inverse of this map projection.
-
-
Constructor Details
-
ZonedGridSystem
public ZonedGridSystem(org.opengis.referencing.operation.OperationMethod method, Parameters parameters, org.opengis.referencing.operation.MathTransformFactory factory) throws org.opengis.util.FactoryException Creates a Zoned Grid System from the given parameters. Themethod
argument can be the description of one of the following:- "Transverse Mercator Zoned Grid System".
createMapProjection(MathTransformFactory)
method in this class. Instead, the factory must be specified at thisZonedGridSystem
construction time.- Parameters:
method
- description of the projection parameters.parameters
- the parameter values of the projection to create.factory
- the factory to use for creating the transform.- Throws:
org.opengis.util.FactoryException
- if an error occurred while creating a transform.
-
-
Method Details
-
getParameterValues
public org.opengis.parameter.ParameterValueGroup getParameterValues()Returns the parameter values of this zoned grid system projection.- Specified by:
getParameterValues
in interfaceParameterized
- Overrides:
getParameterValues
in classAbstractMathTransform
- Returns:
- the internal parameter values for this zoned grid system projection.
- See Also:
-
getDomain
Returns the domain of input coordinates. The limits defined by this method are arbitrary and may change in any future implementation. Current implementation sets a longitude range of ±180° (i.e. the world) and a latitude range from 84°S to 84°N.- Overrides:
getDomain
in classAbstractMathTransform
- Parameters:
criteria
- controls the definition of transform domain.- Returns:
- estimation of a domain where this transform is considered numerically applicable.
- Since:
- 1.3
- See Also:
-
transform
public org.opengis.referencing.operation.Matrix transform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, boolean derivate) throws org.opengis.referencing.operation.TransformException Projects the specified (λ,φ) coordinates and stores the result indstPts
. In addition, opportunistically computes the projection derivative ifderivate
istrue
. Note that the derivative does not contain zone prefix.- Specified by:
transform
in classAbstractMathTransform
- Parameters:
srcPts
- the array containing the source coordinates (cannot benull
).srcOff
- the offset to the point to be transformed in the source array.dstPts
- the array into which the transformed coordinates is returned. May be the same thansrcPts
. May benull
if only the derivative matrix is desired.dstOff
- the offset to the location of the transformed point that is stored in the destination array.derivate
-true
for computing the derivative, orfalse
if not needed.- Returns:
- the matrix of the projection derivative at the given source position,
or
null
if thederivate
argument isfalse
. - Throws:
org.opengis.referencing.operation.TransformException
- if the coordinates cannot be converted.- See Also:
-
inverse
public org.opengis.referencing.operation.MathTransform2D inverse()Returns the inverse of this map projection.- Specified by:
inverse
in interfaceorg.opengis.referencing.operation.MathTransform
- Specified by:
inverse
in interfaceorg.opengis.referencing.operation.MathTransform2D
- Overrides:
inverse
in classAbstractMathTransform2D
- Returns:
- the inverse of this map projection.
-
computeHashCode
protected int computeHashCode()Computes a hash code value for thisZonedGridSystem
.- Overrides:
computeHashCode
in classAbstractMathTransform
- Returns:
- the hash code value.
-
equals
Compares the given object with this transform for equivalence. If this method returnstrue
, then for any given identical source position, the two compared map projections shall compute the same target position.- Specified by:
equals
in interfaceLenientComparable
- Overrides:
equals
in classAbstractMathTransform
- Parameters:
object
- the object to compare with this map projection for equivalence.mode
- the strictness level of the comparison. Default toComparisonMode.STRICT
.- Returns:
true
if the given object is equivalent to this map projection.- See Also:
-