ebgeo.maprequest
Class BritishGrid

java.lang.Object
  extended byebgeo.maprequest.BritishGrid

public class BritishGrid
extends Object

A class modelling the Britsh or OS grid system. This class provides methods for converting between the (standard) zone notation (which uses a 2 letter identifier) and the notation that uses the most significant digit of the Northing/Easting to identify the zone.


Constructor Summary
BritishGrid()
          Creates a new instance of BritishGrid
 
Method Summary
static String getZone(int x, int y)
          Get the 2 letter Zone identifier given the major x and y digits.
static String getZoneForCoOrdinates(double x, double y)
          Get the 2 letter Zone identifier given 6 digit x and y cooridnates.
static double stripMajorDigit(double coord)
          Return the component of the coordinate less than 100,000.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BritishGrid

public BritishGrid()
Creates a new instance of BritishGrid

Method Detail

getZone

public static String getZone(int x,
                             int y)
Get the 2 letter Zone identifier given the major x and y digits.


getZoneForCoOrdinates

public static String getZoneForCoOrdinates(double x,
                                           double y)
Get the 2 letter Zone identifier given 6 digit x and y cooridnates.


stripMajorDigit

public static double stripMajorDigit(double coord)
Return the component of the coordinate less than 100,000.