org.gicentre.utils.spatial
Class OSGB

java.lang.Object
  extended by org.gicentre.utils.spatial.UTM
      extended by org.gicentre.utils.spatial.OSGB
All Implemented Interfaces:
MapProjection

public class OSGB
extends UTM

Class for representing the Ordnance Survey GB, National Grid coordinate system. This is a UTM transformation with a modified scale factor and transformed local origin. Can be used to convert between OSGB National Grid and longitude/latitude coordinate systems. See www.ordnancesurvey.co.uk/oswebsite/gps/information/coordinatesystemsinfo/guidecontents for details of the transformation.

Version:
3.3, 27th June, 2012.
Author:
Jo Wood, giCentre, City University London.

Field Summary
 
Fields inherited from class org.gicentre.utils.spatial.UTM
FROM_LAT_LONG, TO_LAT_LONG
 
Constructor Summary
OSGB()
          Initialises the transformer assuming a forward transformation is into OSGB coordinates.
OSGB(int direction)
          Initialises the transformer.
 
Method Summary
 java.lang.String getDescription()
          Provides a general description of the transformation.
 processing.core.PVector invTransformCoords(processing.core.PVector p)
          Performs an inverse OSGB to longitude/latitude transform of the given location.
 processing.core.PVector transformCoords(processing.core.PVector p)
          Performs a forward longitude/latitude to OSGB transformation of the given location.
 
Methods inherited from class org.gicentre.utils.spatial.UTM
doInterpolation, getEllipsoid, getZone, getZoneLetter, getZoneNumber, latLongToUTM, latLongToUTM, setInterpolation, setZone, setZone, UTMToLatLong, UTMToLatLong
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OSGB

public OSGB()
Initialises the transformer assuming a forward transformation is into OSGB coordinates. This is equivalent to calling the constructor with FROM_LAT_LONG as the parameter. Assumes that geographic data use the WGS84 ellipsoid. The transformer will convert data to/from the AIRY_1830 ellipsoid and perform a UTM transformation with a scale factor of 0.9996012717, geographic origin of 49N, 2W and local OSGB origin of E = 400 000, N = -100 000.


OSGB

public OSGB(int direction)
Initialises the transformer. Assumes that geographic data use the WGS84 ellipsoid. The transformer will convert data to/from the AIRY_1830 ellipsoid and perform a UTM transformation with a scale factor of 0.9996012717, geographic origin of 49N, 2W and local OSGB origin of E = 400 000, N = -100 000.

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

transformCoords

public processing.core.PVector transformCoords(processing.core.PVector p)
Performs a forward longitude/latitude to OSGB transformation of the given location.

Specified by:
transformCoords in interface MapProjection
Overrides:
transformCoords in class UTM
Parameters:
p - Point coordinates to transform
Returns:
Transformed point location.

invTransformCoords

public processing.core.PVector invTransformCoords(processing.core.PVector p)
Performs an inverse OSGB to longitude/latitude transform of the given location.

Specified by:
invTransformCoords in interface MapProjection
Overrides:
invTransformCoords in class UTM
Parameters:
p - Point coordinates to transform.
Returns:
Transformed point location.

getDescription

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

Specified by:
getDescription in interface MapProjection
Overrides:
getDescription in class UTM
Returns:
Description of the transformation.


giCentre Utilities V.3.3, API documentation generated 6th April, 2013