org.geotoolkit.referencing.operation.projection
Class Equirectangular
Object
FormattableObject
AbstractMathTransform
AbstractMathTransform2D
UnitaryProjection
Equirectangular
- All Implemented Interfaces:
- Serializable, Formattable, Parameterized, LenientComparable, MathTransform, MathTransform2D
@Immutable
public class Equirectangular
- extends UnitaryProjection
Equidistant Cylindrical projection (EPSG codes 9842, 9823). See the
Cylindrical
Equidistant projection on MathWorld for an overview. See any of the following providers
for a list of programmatic parameters:
Description
In the particular case where the latitude of natural origin is at the equator,
this projection is also called Plate Carrée. This is used for example
in WGS84 / Plate Carrée (EPSG:32662).
References
- John P. Snyder (Map Projections - A Working Manual,
U.S. Geological Survey Professional Paper 1395, 1987)
- "Coordinate Conversions and Transformations including Formulas",
EPSG Guidence Note Number 7 part 2, Version 24.
- Since:
- 2.2
- Version:
- 3.00
- Author:
- John Grange, Martin Desruisseaux (IRD, Geomatys)
- See Also:
- Serialized Form
- Module:
|
Method Summary |
static MathTransform2D |
create(ParameterDescriptorGroup descriptor,
ParameterValueGroup values)
Creates an Equidistant Cylindrical projection from the given parameters. |
ParameterDescriptorGroup |
getParameterDescriptors()
Returns the parameter descriptors for this unitary projection. |
protected void |
inverseTransform(double[] srcPts,
int srcOff,
double[] dstPts,
int dstOff)
Transforms the specified (x,y) coordinates
and stores the result in dstPts (angles in radians). |
boolean |
isIdentity()
Returns true if this unitary projection is the identity transform. |
protected void |
transform(double[] srcPts,
int srcOff,
double[] dstPts,
int dstOff)
Transforms the specified (λ,φ) coordinates
(units in radians) and stores the result in dstPts (linear distance
on a unit sphere). |
void |
transform(double[] srcPts,
int srcOff,
double[] dstPts,
int dstOff,
int numPts)
Converts a list of coordinate point ordinal values. |
| Methods inherited from class AbstractMathTransform |
createTransformedShape, derivative, derivative, ensureNonNull, equals, formatWKT, getName, hashCode, rollLongitude, transform, transform, transform, transform |
Equirectangular
protected Equirectangular(UnitaryProjection.Parameters parameters)
- Constructs a new map projection from the supplied parameters.
- Parameters:
parameters - The parameters of the projection to be created.
create
public static MathTransform2D create(ParameterDescriptorGroup descriptor,
ParameterValueGroup values)
- Creates an Equidistant Cylindrical projection from the given parameters. The
descriptor argument is usually one of the
PARAMETERS constants defined
in the EquidistantCylindrical class or a subclass, but is not restricted to.
If a different descriptor is supplied, it is user's responsibility to ensure that it
is suitable to an Equidistant Cylindrical projection.
- Parameters:
descriptor - Typically EquidistantCylindrical.PARAMETERS.values - The parameter values of the projection to create.
- Returns:
- The map projection.
- Since:
- 3.00
getParameterDescriptors
public ParameterDescriptorGroup getParameterDescriptors()
- Returns the parameter descriptors for this unitary projection. Note that
the returned descriptor is about the unitary projection, not the full one.
- Specified by:
getParameterDescriptors in interface Parameterized- Overrides:
getParameterDescriptors in class AbstractMathTransform2D
- Returns:
- The parameter descriptors for this math transform, or
null. - See Also:
OperationMethod.getParameters()
transform
protected void transform(double[] srcPts,
int srcOff,
double[] dstPts,
int dstOff)
throws ProjectionException
- Transforms the specified (λ,φ) coordinates
(units in radians) and stores the result in
dstPts (linear distance
on a unit sphere).
- Specified by:
transform in class UnitaryProjection
- Parameters:
srcPts - The array containing the source point coordinate, as (longitude,
latitude) angles in radians.srcOff - The offset of the point to be converted in the source array.dstPts - the array into which the converted point coordinate is returned (may be
the same than srcPts). Ordinates will be in a dimensionless unit,
as a linear distance on a unit sphere or ellipse.dstOff - The offset of the location of the converted point that is
stored in the destination array.
- Throws:
ProjectionException - if the point can't be converted.
transform
public void transform(double[] srcPts,
int srcOff,
double[] dstPts,
int dstOff,
int numPts)
throws TransformException
- Converts a list of coordinate point ordinal values.
Note:
We override the super-class method only as an optimization in the special case
where the target coordinates are written at the same locations than the source
coordinates. In such case, we can take advantage of the fact that the φ value
is not modified by the unitary Equirectangular projection.
- Specified by:
transform in interface MathTransform- Overrides:
transform in class UnitaryProjection
- Parameters:
srcPts - The array containing the source point coordinates.srcOff - The offset to the first point to be converted in the source array.dstPts - The array into which the converted point coordinates are returned.
May be the same than srcPts.dstOff - The offset to the location of the first converted point that is
stored in the destination array.numPts - The number of point objects to be converted.
- Throws:
TransformException - if a point can't be converted.
inverseTransform
protected void inverseTransform(double[] srcPts,
int srcOff,
double[] dstPts,
int dstOff)
throws ProjectionException
- Transforms the specified (x,y) coordinates
and stores the result in
dstPts (angles in radians).
- Specified by:
inverseTransform in class UnitaryProjection
- Parameters:
srcPts - The array containing the source point coordinate, as linear distance
on a unit sphere or ellipse.srcOff - The offset of the point to be converted in the source array.dstPts - the array into which the converted point coordinate is returned (may be
the same than srcPts). Ordinates will be (longitude,
latitude) angles in radians.dstOff - The offset of the location of the converted point that is
stored in the destination array.
- Throws:
ProjectionException - if the point can't be converted.
isIdentity
public boolean isIdentity()
- Returns
true if this unitary projection is the identity transform.
The kernel of an equirectangular projection is an identity transform if it
doesn't performs longitude rolling.
- Specified by:
isIdentity in interface MathTransform- Overrides:
isIdentity in class AbstractMathTransform
Copyright © 2009-2011 Geotoolkit.org. All Rights Reserved.