|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uk.me.jstott.jcoord.CoordinateSystem uk.me.jstott.jcoord.IrishRef
public class IrishRef
This class is part of the Jcoord package. Visit the Jcoord website for more information.
Class to represent an Irish National Grid reference.
Irish National Grid
(c) 2006 Jonathan Stott
Created on 11-02-2006
Field Summary | |
---|---|
static double |
FALSE_ORIGIN_EASTING
|
static double |
FALSE_ORIGIN_LATITUDE
|
static double |
FALSE_ORIGIN_LONGITUDE
|
static double |
FALSE_ORIGIN_NORTHING
|
static double |
SCALE_FACTOR
|
Constructor Summary | |
---|---|
IrishRef(double easting,
double northing)
Create a new Ordnance Survey grid reference using a given easting and northing. |
|
IrishRef(LatLng ll)
Create an IrishRef object from the given latitude and longitude. |
|
IrishRef(java.lang.String ref)
Take a string formatted as a six-figure OS grid reference (e.g. |
Method Summary | |
---|---|
double |
getEasting()
Get the easting in metres relative the origin of the British National Grid. |
double |
getNorthing()
Get the northing in metres relative to the origin of the British National Grid. |
void |
setEasting(double easting)
Set the easting for this OSRef. |
void |
setNorthing(double northing)
Set the northing for this OSRef |
LatLng |
toLatLng()
Convert this Irish grid reference to a latitude/longitude pair using the Ireland 1965 datum. |
java.lang.String |
toSixFigureString()
Return a String representation of this Irish grid reference using the six-figure notation in the form X123456 |
java.lang.String |
toString()
Return a String representation of this Irish grid reference showing the easting and northing in metres. |
Methods inherited from class uk.me.jstott.jcoord.CoordinateSystem |
---|
getDatum, setDatum |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final double SCALE_FACTOR
public static final double FALSE_ORIGIN_LATITUDE
public static final double FALSE_ORIGIN_LONGITUDE
public static final double FALSE_ORIGIN_EASTING
public static final double FALSE_ORIGIN_NORTHING
Constructor Detail |
---|
public IrishRef(double easting, double northing) throws java.lang.IllegalArgumentException
easting
- the easting in metres. Must be greater than or equal to 0.0 and
less than 800000.0.northing
- the northing in metres. Must be greater than or equal to 0.0 and
less than 1400000.0.
java.lang.IllegalArgumentException
- if either the easting or the northing are invalid.public IrishRef(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 XY123456public IrishRef(LatLng ll)
Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toSixFigureString()
public LatLng toLatLng()
toLatLng
in class CoordinateSystem
public double getEasting()
public double getNorthing()
public void setEasting(double easting) throws java.lang.IllegalArgumentException
easting
- the easting in metres. Must be greater than or equal to 0.0 and
less than 400000.0.
java.lang.IllegalArgumentException
- if the easting is invalid.public void setNorthing(double northing) throws java.lang.IllegalArgumentException
northing
- the northing in metres. Must be greater than or equal to 0.0 and
less than or equal to 500000.0.
java.lang.IllegalArgumentException
- if either the northing is invalid.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |