jwo.landserf.process.proj
Class Swiss

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

public class Swiss
extends Object
implements Transformable

Class for representing the Swiss coordinate system. This is an oblique Mercator projection with a 90 degree azimuth, centre at the the old observatory at Bern and scale factor of 1.0.

Version:
2.3, 13th May, 2006.
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
Swiss()
          Initialises the transformer assuming a forward transformation is from longitude/latitude to Swiss coordinates.
Swiss(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).
 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 Swiss grid to longitude/latitude transform on the given location.
 Footprint latLongToSwiss(float lng, float lat)
          Converts the given longitude/latitude coordinates into Swiss grid.
 void setInterpolation(boolean doInterpolation)
          Sets whether the transformation should use nearest neighbour (false) or some interpolator (true).
 Footprint swissToLatLong(float easting, float northing)
          Converts the given Swiss coordinates to longitude/latitude location.
 Footprint transformCoords(Footprint fpIn)
          Performs a forward longitude/latitude to Swiss 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

Swiss

public Swiss()
Initialises the transformer assuming a forward transformation is from longitude/latitude to Swiss coordinates. This is equivalent to calling the constructor with FROM_LAT_LONG as the parameter.


Swiss

public Swiss(int direction)
Initialises the transformer in the given direction.

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

latLongToSwiss

public Footprint latLongToSwiss(float lng,
                                float lat)
Converts the given longitude/latitude coordinates into Swiss grid. Longitude/latitude should be in decimal degrees with positive North and negative East.

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

swissToLatLong

public Footprint swissToLatLong(float easting,
                                float northing)
Converts the given Swiss coordinates to longitude/latitude location.

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

transformCoords

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

Returns:
Ellipsoid used in the transformation.


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