jwo.landserf.process.proj
Class AlbersEqualAreaConic

java.lang.Object
  extended by jwo.landserf.process.proj.AlbersEqualAreaConic
All Implemented Interfaces:
Transformable

public class AlbersEqualAreaConic
extends Object
implements Transformable

Class for representing Albers Equal Area Conic projections. Includes forward and inverse transforms from/to lat,long. Uses transformation equations from Snyder (1987) Atlas of Map Projections. Some code adapted from C program by T. Mittan, Feb, 1992 - see http://geography.usgs.gov/ftp/software/current_software/gctpc2/alberfor.c.

Version:
2.3, 11th February 2009.
Author:
Jo Wood and T. Mittan.

Field Summary
static int FROM_LAT_LONG
          Indicates a transformation from latitude/longitude
static int TO_LAT_LONG
          Indicates a transformation to latitude/longitude
 
Constructor Summary
AlbersEqualAreaConic(Ellipsoid ellipsoid, double lat1, double lat2)
          Initialises the Albers converter with the given ellipsoid and standard parallels.
AlbersEqualAreaConic(Ellipsoid ellipsoid, double lat1, double lat2, double lon0, double lat0, double falseEast, double falseNorth, int direction)
          Initialises the Albers converter with the given ellipsoid and transformation direction.
 
Method Summary
 Footprint AlbersToLatLong(float easting, float northing)
          Converts the given coordinates that use the Albers equal area conic projection into a (longitude,latitude) location.
 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 transformation (Albers to latitude/longitude) on the given location.
 Footprint latLongToAlbers(float lng, float lat)
          Converts the given (lng, lat) coordinates into a location referenced using the Albers equal area conic projection.
 void setInterpolation(boolean doInterpolation)
          Sets whether the transformation should use nearest neighbour (false) or some interpolator (true).
 Footprint transformCoords(Footprint fpIn)
          Performs a forward transformation (latitude/longitude to Albers) 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 latitude/longitude

See Also:
Constant Field Values

TO_LAT_LONG

public static final int TO_LAT_LONG
Indicates a transformation to latitude/longitude

See Also:
Constant Field Values
Constructor Detail

AlbersEqualAreaConic

public AlbersEqualAreaConic(Ellipsoid ellipsoid,
                            double lat1,
                            double lat2)
Initialises the Albers converter with the given ellipsoid and standard parallels. Defaults to a projection centred at lng/lat of (0,0). The forward transformation will be from Lat/long to Albers equal area conic.

Parameters:
ellipsoid - to use in projection.
lat1 - First standard parallel in degrees (north of equator positive).
lat2 - Second standard parallel in degrees (north of equator positive).

AlbersEqualAreaConic

public AlbersEqualAreaConic(Ellipsoid ellipsoid,
                            double lat1,
                            double lat2,
                            double lon0,
                            double lat0,
                            double falseEast,
                            double falseNorth,
                            int direction)
Initialises the Albers converter with the given ellipsoid and transformation direction.

Parameters:
ellipsoid - to use in projection.
lat1 - First standard parallel in degrees (north of equator positive).
lat2 - Second standard parallel in degrees (north of equator positive).
lon0 - Centre longitude in degrees (east of Greenwich positive).
lat0 - Centre latitude in degrees (north of equator positive).
falseEast - False easting (offset in metres).
falseNorth - False northing (offset in metres).
direction - Direction of transformation. Can be either FROM_LAT_LONG or TO_LAT_LONG.
Method Detail

transformCoords

public Footprint transformCoords(Footprint fpIn)
Performs a forward transformation (latitude/longitude to Albers) 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 transformation (Albers to latitude/longitude) 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.

latLongToAlbers

public Footprint latLongToAlbers(float lng,
                                 float lat)
Converts the given (lng, lat) coordinates into a location referenced using the Albers equal area conic projection. Latitude/longitude coordinates should be in decimal degrees with positive North and positive East.

Parameters:
lng - Longitude (+-180 degrees)
lat - Latitude (+-90 degrees)
Returns:
Location (units in metres) using Albers coordinate system.

AlbersToLatLong

public Footprint AlbersToLatLong(float easting,
                                 float northing)
Converts the given coordinates that use the Albers equal area conic projection into a (longitude,latitude) location. Longitude and latitude will be in decimal degrees with positive North and positive East.

Parameters:
easting - Albers x coordinate (metres from local origin).
northing - Albers y coordinate (metres from local origin).
Returns:
location in geographical coordinates (longitude/latitude decimal degrees).

getEllipsoid

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

Returns:
Ellipsoid used in the UTM transformation.


Copyright Jo Wood, 1996-2009, last modified, 17th April, 2009