org.geotools.referencing.operation.projection
Class ObliqueMercator

java.lang.Object
  extended byorg.geotools.referencing.wkt.Formattable
      extended byorg.geotools.referencing.operation.transform.AbstractMathTransform
          extended byorg.geotools.referencing.operation.projection.MapProjection
              extended byorg.geotools.referencing.operation.projection.ObliqueMercator
All Implemented Interfaces:
org.opengis.referencing.operation.MathTransform, org.opengis.referencing.operation.MathTransform2D, java.io.Serializable

public class ObliqueMercator
extends MapProjection

Oblique Mercator Projection. A conformal, oblique, cylindrical projection with the cylinder touching the ellipsoid (or sphere) along a great circle path (the central line). The Mercator and Transverse Mercator projections can be thought of as special cases of the oblique mercator, where the central line is along the equator or a meridian, respectively. The Oblique Mercator projection has been used in Switzerland, Hungary, Madagascar, Malaysia, Borneo and the panhandle of Alaska.

The Oblique Mercator projection uses a (U,V) coordinate system, with the U axis along the central line. During the forward projection, coordinates from the ellipsoid are projected conformally to a sphere of constant total curvature, called the 'aposphere', before being projected onto the plane. The projection coordinates are further convented to a (X,Y) coordinate system by rotating the calculated (u,v) coordinates to give output (x,y) coordinates. The rotation value is usually the same as the projection azimuth (the angle, east of north, of the central line), but some cases allow a separate rotation parameter.

There are two forms of the oblique mercator, differing in the origin of their grid coordinates. The Hotine_Oblique_Mercator (EPSG code 9812) has grid coordinates start at the intersection of the central line and the equator of the aposphere. The Oblique_Mercator (EPSG code 9815) is the same, except the grid coordinates begin at the central point (where the latitude of center and central line intersect). ESRI separates these two case by appending "Natural_Origin" (for the Hotine_Oblique_Mercator) and "Center" (for the Obique_Mercator) to the projection names.

Two different methods are used to specify the central line for the oblique mercator: 1) a central point and an azimuth, east of north, describing the central line and 2) two points on the central line. The EPSG does not use the two point method, while ESRI separates the two cases by putting "Azimuth" and "Two_Point" in their projection names. Both cases use the point where the "latitude_of_center" parameter crosses the central line as the projection's central point. The central meridian is not a projection parameter, and is instead calculated as the intersection between the central line and the equator of the aposphere.

For the azimuth method, the central latitude cannot be +- 90.0 degrees and the central line cannot be at a maximum or minimum latitude at the central point. In the two point method, the latitude of the first and second points cannot be equal. Also, the latitude of the first point and central point cannot be +- 90.0 degrees. Furthermore, the latitude of the first point cannot be 0.0 and the latitude of the second point cannot be - 90.0 degrees. A change of 10^-7 radians can allow calculation at these special cases. Snyder's restriction of the central latitude being 0.0 has been removed, since the equaitons appear to work correctly in this case.

Azimuth values of 0.0 and +- 90.0 degrees are allowed (and used in Hungary and Switzerland), though these cases would usually use a Mercator or Transverse Mercator projection instead. Azimuth values > 90 degrees cause errors in the equations.

The oblique mercator is also called the "Rectified Skew Orthomorphic" (RSO). It appears is that the only difference from the oblique mercator is that the RSO allows the rotation from the (U,V) to (X,Y) coordinate system to be different from the azimuth. This separate parameter is called "rectified_grid_angle" (or "XY_Plane_Rotation" by ESRI) and is also included in the EPSG's parameters for the Oblique Mercator and Hotine Oblique Mercator. The rotation parameter is optional in all the non-two point projections and will be set to the azimuth if not specified.

Projection cases and aliases implemented by the ObliqueMercator are:

References:

Since:
2.1
Version:
$Id: ObliqueMercator.java 17672 2006-01-19 00:25:55Z desruisseaux $
Author:
Rueben Schulz
See Also:
Oblique Mercator projection on MathWorld, hotine_oblique_mercator on Remote Sensing, oblique_mercator on Remote Sensing, Serialized Form

Nested Class Summary
static class ObliqueMercator.Provider
          The MathTransformProvider for an ObliqueMercator projection.
static class ObliqueMercator.Provider_Hotine
          The MathTransformProvider for a Hotine ObliqueMercator projection.
static class ObliqueMercator.Provider_Hotine_TwoPoint
          The MathTransformProvider for a Hotine ObliqueMercator projection, specified with two points on the central line (instead of a central point and azimuth).
static class ObliqueMercator.Provider_TwoPoint
          The MathTransformProvider for a ObliqueMercator projection, specified with two points on the central line (instead of a central point and azimuth).
 
Nested classes inherited from class org.geotools.referencing.operation.projection.MapProjection
MapProjection.AbstractProvider
 
Field Summary
 
Fields inherited from class org.geotools.referencing.operation.projection.MapProjection
centralMeridian, excentricity, excentricitySquared, falseEasting, falseNorthing, globalScale, isSpherical, latitudeOfOrigin, scaleFactor, semiMajor, semiMinor
 
Method Summary
 boolean equals(java.lang.Object object)
          Compares the specified object with this map projection for equality.
 org.opengis.parameter.ParameterDescriptorGroup getParameterDescriptors()
          Returns the parameter descriptors for this map projection. This is used for a providing a default implementation of MapProjection.getParameterValues(), as well as arguments checking.
 org.opengis.parameter.ParameterValueGroup getParameterValues()
          Returns the parameter values for this map projection.
protected  double getToleranceForAssertions(double longitude, double latitude)
          Maximal error (in metres) tolerated for assertion, if enabled.
 int hashCode()
          Returns a hash value for this projection.
protected  java.awt.geom.Point2D inverseTransformNormalized(double x, double y, java.awt.geom.Point2D ptDst)
          Transforms the specified coordinate and stores the result in . This method returns longitude as x values in the range and latitude as y values in the range . It will be checked by the caller, so this method doesn't need to performs this check.

Input coordinates are also guarenteed to have the MapProjection.falseEasting and MapProjection.falseNorthing removed and be divided by MapProjection.globalScale before this method is invoked. After this method is invoked, the MapProjection.centralMeridian is added to the results in . This means that projections that implement this method are performed on an ellipse (or sphere) with a semiMajor axis of 1.0.

In PROJ.4, the same standardization, described above, is handled by . Therefore when porting projections from PROJ.4, the inverse transform equations can be used directly here with minimal change. In the equations of Snyder, MapProjection.falseEasting, MapProjection.falseNorthing and MapProjection.scaleFactor are usually not given. When implementing these equations here, you will not need to add the MapProjection.centralMeridian to the output longitude or remove the MapProjection.semiMajor ('a' or 'R').

protected  java.awt.geom.Point2D transformNormalized(double x, double y, java.awt.geom.Point2D ptDst)
          Transforms the specified coordinate and stores the result in . This method is guaranteed to be invoked with values of x in the range and values of y in the range .

Coordinates are also guaranteed to have the MapProjection.centralMeridian removed from x before this method is invoked. After this method is invoked, the results in are multiplied by MapProjection.globalScale, and the MapProjection.falseEasting and MapProjection.falseNorthing are added. This means that projections that implement this method are performed on an ellipse (or sphere) with a semiMajor axis of 1.0.

In PROJ.4, the same standardization, described above, is handled by . Therefore when porting projections from PROJ.4, the forward transform equations can be used directly here with minimal change. In the equations of Snyder, MapProjection.falseEasting, MapProjection.falseNorthing and MapProjection.scaleFactor are usually not given. When implementing these equations here, you will not need to remove the MapProjection.centralMeridian from x or apply the MapProjection.semiMajor ('a' or 'R').

 
Methods inherited from class org.geotools.referencing.operation.projection.MapProjection
getSourceDimensions, getTargetDimensions, inverse, transform, transform, transform
 
Methods inherited from class org.geotools.referencing.operation.transform.AbstractMathTransform
createTransformedShape, derivative, derivative, ensureNonNull, formatWKT, getDimSource, getDimTarget, isIdentity, needCopy, rollLongitude, transform
 
Methods inherited from class org.geotools.referencing.wkt.Formattable
toString, toWKT, toWKT, toWKT
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.opengis.referencing.operation.MathTransform2D
createTransformedShape, derivative
 
Methods inherited from interface org.opengis.referencing.operation.MathTransform
derivative, isIdentity, toWKT, transform
 

Method Detail

getParameterDescriptors

public org.opengis.parameter.ParameterDescriptorGroup getParameterDescriptors()
Returns the parameter descriptors for this map projection. This is used for a providing a default implementation of MapProjection.getParameterValues(), as well as arguments checking.

Specified by:
getParameterDescriptors in class MapProjection

getParameterValues

public org.opengis.parameter.ParameterValueGroup getParameterValues()
Returns the parameter values for this map projection.

Overrides:
getParameterValues in class MapProjection
Returns:
A copy of the parameter values for this map projection.

transformNormalized

protected java.awt.geom.Point2D transformNormalized(double x,
                                                    double y,
                                                    java.awt.geom.Point2D ptDst)
                                             throws ProjectionException
Transforms the specified coordinate and stores the result in . This method is guaranteed to be invoked with values of x in the range and values of y in the range .

Coordinates are also guaranteed to have the MapProjection.centralMeridian removed from x before this method is invoked. After this method is invoked, the results in are multiplied by MapProjection.globalScale, and the MapProjection.falseEasting and MapProjection.falseNorthing are added. This means that projections that implement this method are performed on an ellipse (or sphere) with a semiMajor axis of 1.0.

In PROJ.4, the same standardization, described above, is handled by . Therefore when porting projections from PROJ.4, the forward transform equations can be used directly here with minimal change. In the equations of Snyder, MapProjection.falseEasting, MapProjection.falseNorthing and MapProjection.scaleFactor are usually not given. When implementing these equations here, you will not need to remove the MapProjection.centralMeridian from x or apply the MapProjection.semiMajor ('a' or 'R').

Specified by:
transformNormalized in class MapProjection
Parameters:
x - The longitude of the coordinate, in radians.
y - The latitude of the coordinate, in radians.
ptDst - the specified coordinate point that stores the result of transforming , or . Ordinates will be in a dimensionless unit, as a linear distance on a unit sphere or ellipse.
Returns:
the coordinate point after transforming , and storing the result in .
Throws:
ProjectionException - if the point can't be transformed.

inverseTransformNormalized

protected java.awt.geom.Point2D inverseTransformNormalized(double x,
                                                           double y,
                                                           java.awt.geom.Point2D ptDst)
                                                    throws ProjectionException
Transforms the specified coordinate and stores the result in . This method returns longitude as x values in the range and latitude as y values in the range . It will be checked by the caller, so this method doesn't need to performs this check.

Input coordinates are also guarenteed to have the MapProjection.falseEasting and MapProjection.falseNorthing removed and be divided by MapProjection.globalScale before this method is invoked. After this method is invoked, the MapProjection.centralMeridian is added to the results in . This means that projections that implement this method are performed on an ellipse (or sphere) with a semiMajor axis of 1.0.

In PROJ.4, the same standardization, described above, is handled by . Therefore when porting projections from PROJ.4, the inverse transform equations can be used directly here with minimal change. In the equations of Snyder, MapProjection.falseEasting, MapProjection.falseNorthing and MapProjection.scaleFactor are usually not given. When implementing these equations here, you will not need to add the MapProjection.centralMeridian to the output longitude or remove the MapProjection.semiMajor ('a' or 'R').

Specified by:
inverseTransformNormalized in class MapProjection
Parameters:
x - The easting of the coordinate, linear distance on a unit sphere or ellipse.
y - The northing of the coordinate, linear distance on a unit sphere or ellipse.
ptDst - the specified coordinate point that stores the result of transforming , or . Ordinates will be in radians.
Returns:
the coordinate point after transforming , and storing the result in .
Throws:
ProjectionException - if the point can't be transformed.

getToleranceForAssertions

protected double getToleranceForAssertions(double longitude,
                                           double latitude)
Maximal error (in metres) tolerated for assertion, if enabled.

Overrides:
getToleranceForAssertions in class MapProjection
Parameters:
longitude - The longitude in degrees.
latitude - The latitude in degrees.
Returns:
The tolerance level for assertions, in meters.

hashCode

public int hashCode()
Returns a hash value for this projection.

Overrides:
hashCode in class MapProjection

equals

public boolean equals(java.lang.Object object)
Compares the specified object with this map projection for equality.

Overrides:
equals in class MapProjection


Copyright © GeoTools. All Rights Reserved.