jwo.landserf.process.proj
Class ObliqueMercator

java.lang.Object
  extended byjwo.landserf.process.proj.ObliqueMercator
All Implemented Interfaces:
Transformable

public class ObliqueMercator
extends Object
implements Transformable

Class for representing Oblique Mercator projections. Includes forward and inverse transforms from/to lat,long. Uses transformation equations from Snyder (1987) Atlas of Map Projections summarised at this Hotine Oblique Mercator page.

Version:
2.2, 27th July, 2004.
Author:
Jo Wood.

Field Summary
static int FROM_LAT_LONG
          Indicates a transformation from lat/lng
static int TO_LAT_LONG
          Indicates a transformation to lat/lng
 
Constructor Summary
ObliqueMercator(Ellipsoid ellipsoid)
          Initialises the Oblique Mercator converter with the given ellipsoid and projection parameters.
 
Method Summary
 boolean doInterpolation()
          Indicates whether the transformation should use nearest neighbour (false) or some interpolator (true).
 String getDescription()
          Provides a general description of the transformation.
 Ellipsoid getEllipsoid()
          Reports the ellipsoid used in the transformation.
 Footprint invTransformCoords(Footprint fpIn)
          Performs an inverse Oblique Mercator to lat/long transform on the given location.
 Footprint latLongToObliqueMercator(float lng, float lat)
          Converts the given (lat,lng) coordinates into an oblique Mercator location.
static void main(String[] args)
           
 Footprint obliqueMercatorToLatLong(float easting, float northing)
          Converts the given Oblique Mercator coordinates into a a lat/long location.
 void setInterpolation(boolean doInterpolation)
          Sets whether the transformation should use nearest neighbour (false) or some interpolator (true).
 Footprint transformCoords(Footprint fpIn)
          Performs a forward lat/long to Oblique Mercator transform on the given location.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FROM_LAT_LONG

public static final int FROM_LAT_LONG
Indicates a transformation from lat/lng

See Also:
Constant Field Values

TO_LAT_LONG

public static final int TO_LAT_LONG
Indicates a transformation to lat/lng

See Also:
Constant Field Values
Constructor Detail

ObliqueMercator

public ObliqueMercator(Ellipsoid ellipsoid)
Initialises the Oblique Mercator converter with the given ellipsoid and projection parameters. The forward transformation will be from Lat/long to Oblique Merctor.

Parameters:
ellipsoid - to use in projection.
Method Detail

main

public static void main(String[] args)

transformCoords

public Footprint transformCoords(Footprint fpIn)
Performs a forward lat/long to Oblique Mercator transform on the given location.

Specified by:
transformCoords in interface Transformable
Parameters:
fpIn - Incoming footprint to transform.
Returns:
Transformed footprint.

invTransformCoords

public Footprint invTransformCoords(Footprint fpIn)
Performs an inverse Oblique Mercator to lat/long transform on the given location.

Specified by:
invTransformCoords in interface Transformable
Parameters:
fpIn - Incoming footprint to transform.
Returns:
Transformed footprint.

getDescription

public String getDescription()
Provides a general description of the transformation.

Specified by:
getDescription in interface Transformable
Returns:
Description of the transformation.

doInterpolation

public boolean doInterpolation()
Indicates whether the transformation should use nearest neighbour (false) or some interpolator (true).

Specified by:
doInterpolation in interface Transformable
Returns:
True if transformation should perform some local interpolation.

setInterpolation

public void setInterpolation(boolean doInterpolation)
Sets whether the transformation should use nearest neighbour (false) or some interpolator (true).

Parameters:
doInterpolation - True if transformation should perform some local interpolation.

latLongToObliqueMercator

public Footprint latLongToObliqueMercator(float lng,
                                          float lat)
Converts the given (lat,lng) coordinates into an oblique Mercator location. Lat/lng should be in decimal degrees with +ve North and +ve East.

Parameters:
lng - Longitude (+-180)
lat - Latitude (+-90)
Returns:
Oblique Merctator location.

obliqueMercatorToLatLong

public Footprint obliqueMercatorToLatLong(float easting,
                                          float northing)
Converts the given Oblique Mercator coordinates into a a lat/long location. Lat/lng will be in decimal degrees with +ve North and +ve East.

Parameters:
easting - Easting
northing - Northing
Returns:
Lat/long location.

getEllipsoid

public Ellipsoid getEllipsoid()
Reports the ellipsoid used in the transformation.

Returns:
Ellipsoid used in the Oblique Mercator transformation.


Copyright Jo Wood, 1996-2005, last modified, 11th March, 2005