Package uk.co.mccombe.mapping
Class TransverseMercator
java.lang.Object
uk.co.mccombe.mapping.CoordinateSystem
uk.co.mccombe.mapping.Projection
uk.co.mccombe.mapping.TransverseMercator
TransverseMercator is an abstract base class for coordinate systems derived from the Transverse Mercator Projection. Methods are provided for standard conversions between Lat/Lon and Easting/Northing
Concrete sub-classes derived from TransverseMercator need to provide values for the projection constants f0(), phi0(), n0(), e0() and lamda0() (see below).
-
Field Summary
FieldsFields inherited from class uk.co.mccombe.mapping.CoordinateSystem
locus, ref, sph
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Default constructor for TransverseMercatorprotected
TransverseMercator
(ENPair point, int z, Ellipsoid sphere, Datum datum, boolean hemisphere) Create an instance of TransverseMercator based on a specified ENPairTransverseMercator
(ENPair point, Ellipsoid sphere, Datum datum) Create an instance of TransverseMercator based on a specified ENPairTransverseMercator
(Position p, Ellipsoid e, Datum d) Create a new TransverseMercator instance for a location specified by Position, Ellipsoid and Datum -
Method Summary
Modifier and TypeMethodDescriptionabstract double
e0()
e0() defines the "false easting" distance of the projection.abstract double
f0()
The scale factor on the Central Meridian.double
Calculate the Grid Convergence for the current location.abstract double
lamda0()
lamda0() defines the longitude (in radians) of the true origin also known as the "Central Meridian".abstract double
n0()
n0() defines the "false northing" distance of the projection.abstract double
phi0()
phi0() defines the latitude of the true origin of the projection.double
Calculate the Point Scale Factor for the current Position.toEN()
Provide an ENPair containing Easting and Northing distances for this pointMethods inherited from class uk.co.mccombe.mapping.CoordinateSystem
defaultDatum, defaultEllipsoid, getDatum, getEllipsoid, getName, getPosition, getWGS84, parseDouble, toLatLong, toLatLongString, toString
-
Field Details
-
northernHemisphere
protected boolean northernHemisphere -
zone
protected int zone
-
-
Constructor Details
-
TransverseMercator
protected TransverseMercator()Default constructor for TransverseMercator -
TransverseMercator
Create a new TransverseMercator instance for a location specified by Position, Ellipsoid and Datum- Parameters:
p
- A Position object defining the locatione
- The Ellipsoid used as a referenced
- The Datum used
-
TransverseMercator
Create an instance of TransverseMercator based on a specified ENPair- Parameters:
point
- An ENPair containing the Easting and Northing distances of the pointsphere
- The Ellipsoid to usedatum
- The Datum to use with this instance
-
TransverseMercator
protected TransverseMercator(ENPair point, int z, Ellipsoid sphere, Datum datum, boolean hemisphere) Create an instance of TransverseMercator based on a specified ENPair- Parameters:
point
- An ENPair containing the Easting and Northing distances of the pointz
- UTM Zone numbersphere
- The Ellipsoid to usedatum
- The Datum to use with this instancehemisphere
- true if the point is in the Northern hemisphere
-
-
Method Details
-
toEN
Provide an ENPair containing Easting and Northing distances for this point- Specified by:
toEN
in classProjection
- Returns:
- an ENPair
-
gridConvergence
public double gridConvergence()Calculate the Grid Convergence for the current location. Grid Convergence is defined as the angle between Grid North and True North. The value is zero on the Central Meridian.- Specified by:
gridConvergence
in classProjection
- Returns:
- The value of Grid Convergence (radians)
-
pointScaleFactor
public double pointScaleFactor()Calculate the Point Scale Factor for the current Position. This is f0() on the central meridian.- Returns:
- The Point Scale Factor
-
f0
public abstract double f0()The scale factor on the Central Meridian. Generally, Transverse Mercator projections increasingly exagerate distances further from the central meridian. It is usual to reduce the scale factor at the central meridian to compensate for this effect and optimise the scale over the area of interest.- Returns:
- the value of the ScaleFactor at the central meridian.
-
phi0
public abstract double phi0()phi0() defines the latitude of the true origin of the projection. Note, however, that many Transverse Mercator projections employ a false origin. See n0() and e0() below.- Returns:
- The latitude of the true origin (radians)
-
n0
public abstract double n0()n0() defines the "false northing" distance of the projection. False origins are usually used with TM projections to ensure that easting and northing distances are always positive over the area of interest. n0() is used as an offset to the grid so that the "true origin" appears to have a northing value equal to n0().- Returns:
- The false northing distance (double)
-
e0
public abstract double e0()e0() defines the "false easting" distance of the projection. False origins are usually used with TM projections to ensure that easting and northing distances are always positive over the area of interest. e0() is used as an offset to the grid so that the "true origin" appears to have an easting value equal to e0().- Returns:
- The false easting distance (double)
-
lamda0
public abstract double lamda0()lamda0() defines the longitude (in radians) of the true origin also known as the "Central Meridian".- Returns:
- The central meridian (radians)
-