Click or drag to resize
OSRef Class
doogal.co.uk Home



Class to represent an Ordnance Survey of Great Britain (OSGB) grid reference.

British National Grid

  • Projection: Transverse Mercator
  • Reference ellipsoid: Airy 1830
  • Units: metres
  • Origin: 49°N, 2°W
  • False co-ordinates of origin: 400000m east, -100000m north
  • EPSG: 27700

A full reference includes a two-character code identifying a particular 100,000m grid square. The table below shows how the two-character 100,000m grid squares are identified. The bottom left corner is at the false origin of the grid. Squares without values fall outside the boundaries of the British National Grid.

km0100200300400500600700
1200HLHMHNHOHPJLJM
1100HQHRHSHTHUJQJR
1000HVHWHXHYHZJVJW
900NANBNCNDNEOAOB
800NFNGNHNJNKOFOGOH
700NLNMNNNONPOLOMON
600NQNRNSNTNUOQOROS
500NWNXNYNZOVOWOX
400SBSCSDSETATBTC
300SGSHSJSKTFTGTH
200SMSNSOSPTLTMTN
100SQSRSSSTSUTQTRTS
0SVSWSXSYSZTVTW

Within each 100,000m square, the grid is further subdivided into 1000m squares. These 1km squares are shown on Ordnance Survey 1:25000 and 1:50000 mapping as the main grid. To reference a 1km square, give the easting and then the northing, e.g. TR2266. In this example, TR represents the 100,000m square, 22 represents the easting (in km) and 66 represents the northing (in km). This is commonly called a four-figure grid reference.

It is possible to extend the four-figure grid reference for more accuracy. For example, a six-figure grid reference would be accurate to 100m and an eight-figure grid reference would be accurate to 10m.

When providing local references, the 2 characters representing the 100,000m square are often omitted.

Inheritance Hierarchy

Namespace:  DotNetCoords
Assembly:  DotNetCoords (in DotNetCoords.dll) Version: 1.0.0.22 (1.0.0.22)
Syntax
public sealed class OSRef : CoordinateSystem

The OSRef type exposes the following members.

Constructors
  NameDescription
Public methodOSRef(String)
Take a string formatted as a 6, 8 or 10 figure OS grid reference (e.g. "TG514131") and create a new OSRef object that represents that grid reference. The first character must be H, N, S, O or T. The second character can be any uppercase character from A through Z excluding I.
Public methodOSRef(LatLng)
Convert this latitude and longitude into an OSGB (Ordnance Survey of Great Britain) grid reference.
Public methodOSRef(Double, Double)
Create a new Ordnance Survey grid reference using a given easting and northing. The easting and northing must be in metres and must be relative to the origin of the British National Grid.
Top
Properties
  NameDescription
Public propertyDatum
Gets the datum.
(Inherited from CoordinateSystem.)
Public propertyEasting
Gets the easting in metres relative to the origin of the British National Grid..
Public propertyNorthing
Gets the northing in metres relative to the origin of the British National Grid.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodToLatLng
Convert this OSGB grid reference to a latitude/longitude pair using the OSGB36 datum. Note that, the LatLng object may need to be converted to the WGS84 datum depending on the application.
(Overrides CoordinateSystemToLatLng.)
Public methodToSixFigureString
Return a string representation of this OSGB grid reference using the six-figure notation in the form XY123456.
Public methodToString
Return a string representation of this OSGB grid reference showing the easting and northing.
(Overrides ObjectToString.)
Public methodToTenFigureString
Return a string representation of this OSGB grid reference using the ten-figure notation in the form XY 12345 67890.
Top
See Also