org.geotoolkit.referencing.operation.projection
Class Equirectangular

Object
  extended by FormattableObject
      extended by AbstractMathTransform
          extended by AbstractMathTransform2D
              extended by UnitaryProjection
                  extended by Equirectangular
All Implemented Interfaces:
Serializable, Formattable, Parameterized, LenientComparable, MathTransform, MathTransform2D

@Immutable
public class Equirectangular
extends UnitaryProjection

Equidistant Cylindrical projection (EPSG codes 1028, 1029, 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

Since:
2.2
Version:
3.00
Author:
John Grange, Martin Desruisseaux (IRD, Geomatys)
See Also:
Serialized Form
Module:
referencing/geotk-referencing (download)    View source code for this class

Nested Class Summary
 
Nested classes/interfaces inherited from class UnitaryProjection
UnitaryProjection.Parameters
 
Field Summary
 
Fields inherited from class UnitaryProjection
excentricity, excentricitySquared
 
Fields inherited from class FormattableObject
EPSG, GEOTIFF, INTERNAL, OGC, SINGLE_LINE
 
Constructor Summary
protected Equirectangular(UnitaryProjection.Parameters parameters)
          Constructs a new map projection from the supplied parameters.
 
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 UnitaryProjection
computeHashCode, equals, finish, getParameterValues, getUnmarshalledParameters, inverse, resetWarnings, rollLongitude, unrollLongitude
 
Methods inherited from class AbstractMathTransform2D
getSourceDimensions, getTargetDimensions, transform
 
Methods inherited from class AbstractMathTransform
createTransformedShape, derivative, derivative, ensureNonNull, equals, formatWKT, getName, hashCode, rollLongitude, transform, transform, transform, transform
 
Methods inherited from class FormattableObject
getDefaultIndentation, print, setDefaultIndentation, toString, toWKT, toWKT, toWKT
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface MathTransform2D
createTransformedShape, derivative
 
Methods inherited from interface MathTransform
derivative, toWKT, transform, transform, transform, transform
 

Constructor Detail

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.
Method Detail

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.