|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.tridas.spatial.SpatialUtils
public class SpatialUtils
Various static helper functions for working with coordinates
Field Summary | |
---|---|
static String |
WGS84
|
Constructor Summary | |
---|---|
SpatialUtils()
|
Method Summary | |
---|---|
static Point2D.Double |
BNGLetterReftoBNGNumberRef(String gridref)
Converts British National Grid reference with letter prefix to full numeric reference style. |
static String |
BNGNumRefToBNGLetRef(Double e,
Double n,
Integer digits)
Convert a British National Grid number reference to standard letter+number reference. |
static Projection |
getBritishNationalGrid()
Helper function for getting the JMapProjLib Projection for the British National Grid using PROJ4 specification |
static Double |
getDecimalCoords(Double degrees,
Double minutes,
Double seconds)
Convert DMS format coordinate into decimal degrees, where W and S are indicated by negative degrees. |
static Double |
getDecimalCoords(Integer degrees,
Integer minutes,
Integer seconds)
Convert DMS format coordinate into decimal degrees, where W and S are indicated by negative degrees. |
static Double |
getDecimalCoords(String sign,
Double degrees,
Double minutes,
Double seconds)
Convert DMS with NSEW sign into decimal coordinates |
static Double |
getDecimalCoords(String sign,
Integer degrees,
Integer minutes,
Integer seconds)
Convert DMS with NSEW sign into decimal coordinates |
static org.tridas.schema.TridasLocationGeometry |
getLocationGeometry(Double latitude,
Double longitude)
Create a TridasLocationGeometry from decimal latitude and longitudes |
static org.tridas.schema.TridasLocationGeometry |
getLocationGeometry(net.opengis.gml.schema.Pos pos)
Create a TridasLocationGeoemtry from a GML Pos. |
static org.tridas.schema.TridasLocation |
getLocationGeometryFromBNG(String bngStr)
Converts a SN****** style British National Grid coordinate into EPSG:4326 lat long coordinates. |
static Double |
parseLatLonFromHalfLatLongString(String str)
Attempt to convert a string to a decimal lat or lon value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static String WGS84
Constructor Detail |
---|
public SpatialUtils()
Method Detail |
---|
public static Double getDecimalCoords(Integer degrees, Integer minutes, Integer seconds) throws NumberFormatException
degrees
- minutes
- seconds
-
NumberFormatException
public static Double getDecimalCoords(Double degrees, Double minutes, Double seconds) throws NumberFormatException
degrees
- minutes
- seconds
-
NumberFormatException
public static Double getDecimalCoords(String sign, Integer degrees, Integer minutes, Integer seconds) throws NumberFormatException
sign
- degrees
- minutes
- seconds
-
NumberFormatException
public static Double getDecimalCoords(String sign, Double degrees, Double minutes, Double seconds) throws NumberFormatException
sign
- degrees
- minutes
- seconds
-
NumberFormatException
public static org.tridas.schema.TridasLocationGeometry getLocationGeometry(Double latitude, Double longitude)
latitude
- longitude
-
public static Projection getBritishNationalGrid()
public static org.tridas.schema.TridasLocation getLocationGeometryFromBNG(String bngStr)
bngStr
-
public static String BNGNumRefToBNGLetRef(Double e, Double n, Integer digits)
e
- - eastingn
- - nothingdigits
- - number of digits to use
public static Point2D.Double BNGLetterReftoBNGNumberRef(String gridref)
gridref
-
public static org.tridas.schema.TridasLocationGeometry getLocationGeometry(net.opengis.gml.schema.Pos pos)
pos
-
public static Double parseLatLonFromHalfLatLongString(String str) throws NumberFormatException
str
-
NumberFormatException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |