jwo.landserf.process.proj
Class FrenchNTF

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

public class FrenchNTF
extends Object
implements Transformable

Class for representing the French national coordinate system. This is a Lambert conformal conic projection divided into one of 4 zones, plus a modified zone II projection for national maps.

Version:
2.3, 24th August, 2008.
Author:
Jo Wood.

Field Summary
static int FROM_LAT_LONG
          Indicates a transformation from longitude/latitude.
static int TO_LAT_LONG
          Indicates a transformation to longitude/latitude.
 
Constructor Summary
FrenchNTF()
          Initialises the transformer assuming a forward transformation is from longitude/latitude to French National Grid coordinates using the national 'Lambert IIe'.
FrenchNTF(int direction)
          Initialises the transformer in the given direction assuming the national 'Lambert IIe' projection.
FrenchNTF(String zone)
          Initialises the transformer assuming a forward transformation is from longitude/latitude to French National Grid coordinates.
FrenchNTF(String zoneText, int direction)
          Initialises the transformer in the given direction.
 
Method Summary
 boolean doInterpolation()
          Indicates whether the transformation should use nearest neighbour (false) or some interpolator (true).
 Footprint frenchToLatLong(float easting, float northing)
          Converts the given French coordinates to longitude/latitude location assuming the zone defined in the constructor.
 String getDescription()
          Provides a general description of the transformation.
 Ellipsoid getEllipsoid()
          Reports the ellipsoid used in the transformation (Clarke 1880).
 char getZoneLetter()
          Reports the Lambert zone letter.
 int getZoneNumber()
          Reports the Lambert zone number used for the projection.
 Footprint invTransformCoords(Footprint fpIn)
          Performs an inverse French grid to lat/long transform on the given location.
 Footprint latLongToFrench(float lng, float lat)
          Converts the given longitude/latitude coordinates into Lambert conformal conic using the appropriate zone.
 void setInterpolation(boolean doInterpolation)
          Sets whether the transformation should use nearest neighbour (false) or some interpolator (true).
 void setZone(String zoneText)
          Sets the zone and projection parameters for subsequent transformations.
 Footprint transformCoords(Footprint fpIn)
          Performs a forward longitude/latitude to French grid 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 longitude/latitude.

See Also:
Constant Field Values

TO_LAT_LONG

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

See Also:
Constant Field Values
Constructor Detail

FrenchNTF

public FrenchNTF()
Initialises the transformer assuming a forward transformation is from longitude/latitude to French National Grid coordinates using the national 'Lambert IIe'. projection.


FrenchNTF

public FrenchNTF(String zone)
Initialises the transformer assuming a forward transformation is from longitude/latitude to French National Grid coordinates. This is equivalent to calling the constructor with FROM_LAT_LONG as the parameter.

Parameters:
zone - Lambert zone (one of "1", "2", "3", "4" or "2e")

FrenchNTF

public FrenchNTF(int direction)
Initialises the transformer in the given direction assuming the national 'Lambert IIe' projection.

Parameters:
direction - Indicates whether transforming to or from longitude/latitude.

FrenchNTF

public FrenchNTF(String zoneText,
                 int direction)
Initialises the transformer in the given direction.

Parameters:
zoneText - Lambert zone (one of '1', '2', '3', '4' or '2e').
direction - Indicates whether transforming to or from longitude/latitude.
Method Detail

latLongToFrench

public Footprint latLongToFrench(float lng,
                                 float lat)
Converts the given longitude/latitude coordinates into Lambert conformal conic using the appropriate zone. Longitude andlatitude should be in decimal degrees with positive North and positive East.

Parameters:
lng - Longitude (+-180.0).
lat - Latitude (+-90.0).
Returns:
French coordinates of the given longitude/latitude location.

frenchToLatLong

public Footprint frenchToLatLong(float easting,
                                 float northing)
Converts the given French coordinates to longitude/latitude location assuming the zone defined in the constructor.

Parameters:
easting - French easting.
northing - French northing.
Returns:
Longitude/latitude coordinates of the given location (decimal degrees).

transformCoords

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

getEllipsoid

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

Returns:
Ellipsoid used in the transformation.

setZone

public void setZone(String zoneText)
Sets the zone and projection parameters for subsequent transformations.

Parameters:
zoneText - Text describing zone. Should be one of '1', '2', '3', '4' or '2e'.

getZoneNumber

public int getZoneNumber()
Reports the Lambert zone number used for the projection. Numbers vary from 1 to 4 with 1-3 being north, central and southern sections of France, 4 being Corsica. Note the national 'etendu' zone is 2.

Returns:
Lambert zone number (latitudinal zone).

getZoneLetter

public char getZoneLetter()
Reports the Lambert zone letter. This is 'e' for the national 'etendu' projection or ' ' if not.

Returns:
Lambert zone letter (latitudinal zone).


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