OpenSpace.GridProjection

Enables transformation from WGS84 to British National Grid and from British National Grid to WGS84.

Example

var gridProjection = new OpenSpace.GridProjection();
var lonlat = new OpenLayers.LonLat(-0.15567, 54.4544);
var mapPoint = gridProjection.getMapPointFromLonLat(lonlat);
Summary
OpenSpace.GridProjectionEnables transformation from WGS84 to British National Grid and from British National Grid to WGS84.
Constructor
OpenSpace.GridProjectionCreate a new OpenSpace.GridProjection instance
Functions
getMapPointFromLonLatConvert an WGS84 point into a OSGB36 grid point
getLonLatFromMapPointConvert a OSGB36 grid point into a WGS84 lon lat point
os_arcInternal conversion method
geog2GridInternal conversion method
convert_89_36Convert an ETRS89 point into a OSGB36 point
E_N_to_LonLatConvert an ETRS89 point into a WGS84 point
initialLatInternal conversion method
marcInternal conversion method to Compute meridional arc.
convert_36_89Convert an OSGB36 point into an ETRS89 point
bilinearInternal interpolation method.
projectForwardGiven an object with x and y properties in EPSG:4326, modify the x,y properties on the object to be the OSGB EPSG:27700 projected coordinates.
projectInverseGiven an object with x and y properties in Spherical Mercator, modify the x,y properties on the object to be the unprojected coordinates.

Constructor

OpenSpace.GridProjection

Create a new OpenSpace.GridProjection instance

Parameters

Returns

An instance of OpenSpace.GridProjection

Functions

getMapPointFromLonLat

getMapPointFromLonLat: function(pt_LonLat)

Convert an WGS84 point into a OSGB36 grid point

Parameters

pt_LonLat{<OpenLayers.LonLat}> The point to convert

Returns

{OpenSpace.MapPoint} The point converted into OSGB36 British National Grid

getLonLatFromMapPoint

getLonLatFromMapPoint: function(pt_OSGB36)

Convert a OSGB36 grid point into a WGS84 lon lat point

Parameters

pt_OSGB36{OpenSpace.MapPoint} The point to convert

Returns

{<OpenLayers.LonLat>} The point converted into WGS84 Longitude Latitude

os_arc

os_arc: function(k3,
k4)

Internal conversion method

Parameters

k3{Float}
k4{Float}

Returns

{Float}

geog2Grid

geog2Grid: function(pt_LonLat)

Internal conversion method

Parameters

pt_LonLat{<OpenLayers.LonLat}> The point to convert

Returns

{<OpenLayers.LonLat>} The point converted

convert_89_36

convert_89_36: function(pt_ETRS89)

Convert an ETRS89 point into a OSGB36 point

Parameters

pt_ETRS89{<OpenLayers.LonLat}> The point to convert

Returns

{OpenSpace.MapPoint} The point converted into British National Grid

E_N_to_LonLat

E_N_to_LonLat: function(pt_ETRS89)

Convert an ETRS89 point into a WGS84 point

Parameters

pt_ETRS89{<OpenLayers.LonLat}> The point to convert

Returns

{<OpenLayers.LonLat>} The point converted into WGS84

initialLat

initialLat: function(North,
n0,
afo,
PHI0,
n,
bfo)

Internal conversion method

Parameters

Returns

{Float}

marc

marc: function(bf0,
n,
PHI0,
PHI)

Internal conversion method to Compute meridional arc.

Parameters

Returns

{Float}

convert_36_89

convert_36_89: function(pt_OSGB36)

Convert an OSGB36 point into an ETRS89 point

Parameters

pt_OSGB36{<OpenLayers.LonLat}> The point to convert

Returns

{<OpenLayers.LonLat>} The point converted into ETRS89

bilinear

bilinear: function(/* double[] */y,
/* double */ x1l,
/* double */ x1u,
/* double */ x2l,
/* double */ x2u,
/* double */ x1,
/* double */ x2)

Internal interpolation method.

Parameters

Returns

{Float}

projectForward

projectForward: function(point)

Given an object with x and y properties in EPSG:4326, modify the x,y properties on the object to be the OSGB EPSG:27700 projected coordinates.

Parameters

point{Object} An object with x and y properties.

Returns

{Object} The point, with the x and y properties transformed to OSGB

projectInverse

projectInverse: function(point)

Given an object with x and y properties in Spherical Mercator, modify the x,y properties on the object to be the unprojected coordinates.

Parameters

point{Object} An object with x and y properties.

Returns

{Object} The point, with the x and y properties transformed from spherical mercator to unprojected coordinates..

getMapPointFromLonLat: function(pt_LonLat)
Convert an WGS84 point into a OSGB36 grid point
getLonLatFromMapPoint: function(pt_OSGB36)
Convert a OSGB36 grid point into a WGS84 lon lat point
os_arc: function(k3,
k4)
Internal conversion method
geog2Grid: function(pt_LonLat)
Internal conversion method
convert_89_36: function(pt_ETRS89)
Convert an ETRS89 point into a OSGB36 point
E_N_to_LonLat: function(pt_ETRS89)
Convert an ETRS89 point into a WGS84 point
initialLat: function(North,
n0,
afo,
PHI0,
n,
bfo)
Internal conversion method
marc: function(bf0,
n,
PHI0,
PHI)
Internal conversion method to Compute meridional arc.
convert_36_89: function(pt_OSGB36)
Convert an OSGB36 point into an ETRS89 point
bilinear: function(/* double[] */y,
/* double */ x1l,
/* double */ x1u,
/* double */ x2l,
/* double */ x2u,
/* double */ x1,
/* double */ x2)
Internal interpolation method.
projectForward: function(point)
Given an object with x and y properties in EPSG:4326, modify the x,y properties on the object to be the OSGB EPSG:27700 projected coordinates.
projectInverse: function(point)
Given an object with x and y properties in Spherical Mercator, modify the x,y properties on the object to be the unprojected coordinates.
This class represents an eastings and northings pair of coordinates in British National Grid (BNG) format
Close