Skip to content

Latest commit

 

History

History
58 lines (43 loc) · 1.91 KB

README.md

File metadata and controls

58 lines (43 loc) · 1.91 KB

osgb36-letter-conversion

Java Version Maven Version Build Status Coverage Status

A library to convert OSGB36 Eastings and Northings into grid letter representation. It is based on the information from this Wikipedia page.

Transforms OSBG36 coordinates:

Eastings   255940 metres.
Northings   98127 metres.   

To UK National Grid Reference:

SX59   (10Km)
SX5598  (1Km)

The precision can be configured down to 1 meter

How to get it

Maven users, add this to your POM:

<dependency>
    <groupId>ro.ghionoiu</groupId>
    <artifactId>osgb36-letter-conversion</artifactId>
    <version>0.1.3</version>
</dependency>

Usage

OsgbPointToReferenceConverter converter =
        new OsgbPointToReferenceConverter(Reference.BOX_10km);

int eastings = 255940;
int northings = 98127;
System.out.println(converter.toGridReference(eastings, northings));

//Will output: SX59

Need help ?

If you encounter any problems or you have a feature request please open an issue on this project's Github.

References