|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uk.me.jstott.jcoord.OSRef
public class OSRef
Class to represent an Ordnance Survey grid reference (c) 2006 Jonathan Stott Created on 11-02-2006
Constructor Summary | |
---|---|
OSRef(double easting,
double northing)
Create a new Ordnance Survey grid reference. |
|
OSRef(java.lang.String ref)
Take a string formatted as a six-figure OS grid reference (e.g. |
Method Summary | |
---|---|
double |
getEasting()
Get the easting. |
double |
getNorthing()
Get the northing. |
LatLng |
toLatLng()
Convert this OSGB grid reference to a latitude/longitude pair using the OSGB36 datum. |
java.lang.String |
toSixFigureString()
Return a String representation of this OSGB grid reference using the six-figure notation in the form XY123456 |
java.lang.String |
toString()
Return a String representation of this OSGB grid reference showing the easting and northing. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public OSRef(double easting, double northing)
easting
- the easting in metresnorthing
- the northing in metrespublic OSRef(java.lang.String ref) throws java.lang.IllegalArgumentException
ref
- a String representing a six-figure Ordnance Survey grid reference
in the form XY123456
java.lang.IllegalArgumentException
- if ref is not of the form XY123456Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toSixFigureString()
public LatLng toLatLng()
public double getEasting()
public double getNorthing()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |