|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectFormattable
AbstractMathTransform
MapProjection
ObliqueMercator
public class ObliqueMercator
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 "Oblique_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 equations 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:
Oblique_Mercator
(EPSG code 9815)"rectified_grid_angle"
parameter.Hotine_Oblique_Mercator_Azimuth_Center
(ESRI)Rectified_Skew_Orthomorphic_Center
(ESRI)"rectified_grid_angle"
parameter.Hotine_Oblique_Mercator
(EPSG code 9812)"rectified_grid_angle"
parameter.Hotine_Oblique_Mercator_Azimuth_Natural_Origin
(ESRI)Rectified_Skew_Orthomorphic_Natural_Origin
(ESRI)"rectified_grid_angle"
parameter.Hotine_Oblique_Mercator_Two_Point_Center
(ESRI)Hotine_Oblique_Mercator_Two_Point_Natural_Origin
(ESRI)References:
libproj4
is available at
libproj4 MiscellaneaPJ_omerc.c
, pj_tsfn.c
,
pj_fwd.c
, pj_inv.c
and lib_proj.h
modules/library/referencing (gt-referencing.jar)
Nested Class Summary | |
---|---|
static class |
ObliqueMercator.Provider
The math transform provider for an Oblique Mercator projection (EPSG code 9815). |
static class |
ObliqueMercator.Provider_TwoPoint
The math transform provider for a Oblique Mercator projection, specified with two points on the central line (instead of a central point and azimuth). |
Nested classes/interfaces inherited from class MapProjection |
---|
MapProjection.AbstractProvider |
Field Summary | |
---|---|
protected double |
azimuth
The azimuth of the central line passing throught the centre of the projection, in radians. |
protected double |
latitudeOfCentre
Latitude of the projection centre. |
protected double |
longitudeOfCentre
Longitude of the projection centre. |
protected double |
rectifiedGridAngle
The rectified bearing of the central line, in radians. |
Fields inherited from class MapProjection |
---|
centralMeridian, en0, en1, en2, en3, en4, excentricity, excentricitySquared, falseEasting, falseNorthing, globalScale, isSpherical, latitudeOfOrigin, LOGGER, scaleFactor, semiMajor, semiMinor |
Fields inherited from class Formattable |
---|
SINGLE_LINE |
Constructor Summary | |
---|---|
protected |
ObliqueMercator(ParameterValueGroup parameters)
Constructs a new map projection from the supplied parameters. |
Method Summary | |
---|---|
boolean |
equals(Object object)
Compares the specified object with this map projection for equality. |
ParameterDescriptorGroup |
getParameterDescriptors()
Returns the parameter descriptors for this map projection. |
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 Point2D |
inverseTransformNormalized(double x,
double y,
Point2D ptDst)
Transforms the specified coordinate and stores the result in ptDst . |
protected Point2D |
transformNormalized(double x,
double y,
Point2D ptDst)
Transforms the specified coordinate and stores the result in ptDst . |
Methods inherited from class MapProjection |
---|
getSourceDimensions, getTargetDimensions, inv_mlfn, inverse, mlfn, resetWarnings, transform, transform, transform |
Methods inherited from class AbstractMathTransform |
---|
createTransformedShape, derivative, derivative, ensureNonNull, formatWKT, getName, isIdentity, needCopy, rollLongitude, transform, transform, transform |
Methods inherited from class Formattable |
---|
cleanupThreadLocals, 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, isIdentity, toWKT, transform, transform, transform |
Field Detail |
---|
protected final double latitudeOfCentre
MapProjection.latitudeOfOrigin
, but the latitude of origin is the
Earth equator on aposphere for the oblique mercator.
protected final double longitudeOfCentre
MapProjection.centralMeridian
, which is the meridian where the
central line intersects the Earth equator on aposphere.
This parameter applies to the "azimuth" case only.
It is set to NaN
for the "two points" case.
protected final double azimuth
protected final double rectifiedGridAngle
"rectified_grid_angle"
parameter value is not set.
Constructor Detail |
---|
protected ObliqueMercator(ParameterValueGroup parameters) throws ParameterNotFoundException
parameters
- The parameter values in standard units.
ParameterNotFoundException
- if a mandatory parameter is missing.Method Detail |
---|
public ParameterDescriptorGroup getParameterDescriptors()
MapProjection.getParameterValues()
, as well as arguments checking.
getParameterDescriptors
in class MapProjection
null
.OperationMethod.getParameters()
public ParameterValueGroup getParameterValues()
getParameterValues
in class MapProjection
Operation.getParameterValues()
protected Point2D transformNormalized(double x, double y, Point2D ptDst) throws ProjectionException
ptDst
. This method is
usually (but not guaranteed) to be invoked with values of x in
the range [-PI..PI]
and values of y in the range [-PI/2..PI/2]
.
Values outside those ranges are accepted (sometime with a warning logged) on the assumption
that most implementations use those values only in trigonometric functions like
sin and cos.
Coordinates have the MapProjection.centralMeridian
removed from lambda before this
method is invoked. After this method is invoked, the results in ptDst
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 semi-major axis of 1.
In PROJ.4, the same standardization,
described above, is handled by pj_fwd.c
. 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 lambda or apply
the MapProjection.semiMajor
(a or R).
transformNormalized
in class MapProjection
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
ptSrc
, or null
. Ordinates will be in a
dimensionless unit, as a linear distance on a unit sphere or ellipse.
lambda
, phi
)
and storing the result in ptDst
.
ProjectionException
- if the point can't be transformed.protected Point2D inverseTransformNormalized(double x, double y, Point2D ptDst) throws ProjectionException
ptDst
. This method
returns longitude as x values in the range [-PI..PI]
and latitude as
y values in the range [-PI/2..PI/2]
. It will be checked by the caller,
so this method doesn't need to performs this check.
Input coordinates have the MapProjection.falseEasting
and MapProjection.falseNorthing
removed and are
divided by MapProjection.globalScale
before this method is invoked. After this method is invoked,
the MapProjection.centralMeridian
is added to the x
results in ptDst
. This means
that projections that implement this method are performed on an ellipse (or sphere) with a
semi-major axis of 1.
In PROJ.4, the same standardization,
described above, is handled by pj_inv.c
. 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).
inverseTransformNormalized
in class MapProjection
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
ptSrc
, or null
. Ordinates will be in radians.
x
, y
and storing the result in ptDst
.
ProjectionException
- if the point can't be transformed.protected double getToleranceForAssertions(double longitude, double latitude)
getToleranceForAssertions
in class MapProjection
longitude
- The longitude in decimal degrees.latitude
- The latitude in decimal degrees.
public int hashCode()
hashCode
in class MapProjection
public boolean equals(Object object)
equals
in class MapProjection
object
- The object to compare with this transform.
true
if the given object is a transform of the same class
and if, given identical source position, the
transformed
position would be the equals.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |