public class ObliqueMercator extends AbstractProj implements ICentralMeridianProvider
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)This class has been derived from the implementation of the Geotools project; git 8cbf52d, org.geotools.referencing.operation.projection.ObliqueMercator at the time of migration.
Note that automatic calculation of bounds is very limited for this projection, since the central line can have any orientation.
References:
libproj4
is available at
libproj4 MiscellaneaPJ_omerc.c
, pj_tsfn.c
,
pj_fwd.c
, pj_inv.c
and lib_proj.h
Modifier and Type | Field and Description |
---|---|
private double |
ab
Convenience value equal to
a ×b . |
private double |
arb
Convenience value equal to
a / b . |
protected double |
azimuth
The azimuth of the central line passing throught the centre of the projection, in radians.
|
private double |
b
Constants used in the transformation.
|
private double |
bra
Convenience value equal to
b / a . |
protected double |
centralMeridian
Central longitude in radians.
|
private double |
cosgamma0
Sine and Cosine values for gamma0 (the angle between the meridian
and central line at the intersection between the central line and
the Earth equator on aposphere).
|
private double |
cosrot
Sine and Cosine values for the rotation between (U,V) and
(X,Y) coordinate systems
|
private static double |
EPSILON
Maximum difference allowed when comparing real numbers.
|
private static double |
EPSILON_LATITUDE
Maximum difference allowed when comparing latitudes.
|
private double |
g
Constants used in the transformation.
|
protected double |
rectifiedGridAngle
The rectified bearing of the central line, in radians.
|
private LatLon |
referencePoint
A reference point, which is known to be on the central line.
|
private double |
singamma0
Sine and Cosine values for gamma0 (the angle between the meridian
and central line at the intersection between the central line and
the Earth equator on aposphere).
|
private double |
sinrot
Sine and Cosine values for the rotation between (U,V) and
(X,Y) coordinate systems
|
private double |
uc
u value (in (U,V) coordinate system) of the central point.
|
private double |
vPoleN
v values when the input latitude is a pole.
|
private double |
vPoleS
v values when the input latitude is a pole.
|
Constructor and Description |
---|
ObliqueMercator() |
Modifier and Type | Method and Description |
---|---|
Bounds |
getAlgorithmBounds()
Return the bounds where this projection is applicable.
|
double |
getCentralMeridian()
Get the central meridian value as computed during initialization.
|
java.lang.String |
getName()
Replies a human readable name of this projection.
|
java.lang.String |
getProj4Id()
Replies the Proj.4 identifier.
|
void |
initialize(ProjParameters params)
Initialize the projection using the provided parameters.
|
double[] |
invproject(double x,
double y)
Convert east/north to lat/lon.
|
private static double |
normalizeLonRad(double a) |
double[] |
project(double y,
double x)
Convert lat/lon to east/north.
|
aasin, cphi2, invMlfn, isGeographic, mlfn, msfn, tsfn
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
lonIsLinearToEast
private static final double EPSILON
private static final double EPSILON_LATITUDE
protected double azimuth
protected double rectifiedGridAngle
private double b
private double g
private double vPoleN
private double vPoleS
private double singamma0
private double cosgamma0
private double sinrot
private double cosrot
private double uc
protected double centralMeridian
private LatLon referencePoint
public ObliqueMercator()
public java.lang.String getName()
Proj
public java.lang.String getProj4Id()
Proj
getProj4Id
in interface Proj
null
.public void initialize(ProjParameters params) throws ProjectionConfigurationException
Proj
initialize
in interface Proj
initialize
in class AbstractProj
params
- The projection parametersProjectionConfigurationException
- in case parameters are not suitableprivate static double normalizeLonRad(double a)
public double[] project(double y, double x)
Proj
public double[] invproject(double x, double y)
Proj
invproject
in interface Proj
x
- east value in meters, divided by the semi major axis of the ellipsoidy
- north value in meters, divided by the semi major axis of the ellipsoidpublic Bounds getAlgorithmBounds()
Proj
getAlgorithmBounds
in interface Proj
public double getCentralMeridian()
ICentralMeridianProvider
getCentralMeridian
in interface ICentralMeridianProvider