rdf4j-postgis
Version 0.1.0.0
|
https://github.com/mil-oss/GARSutils MIT License More...
Static Public Member Functions | |
static String | getCenterKMLCoords (String GARS) |
Convert a GARS string to KML STRING representation of the center coordinates. More... | |
static String | getCenterJSONCoords (String GARS) |
Convert a GARS string to JSON representation of the center coordinates. More... | |
static String | getCenterCoords (String GARS) |
Convert a GARS string to STRING representation of the center coordinates. More... | |
static double[] | getCenterCoordsArray (String GARS) |
Convert a GARS string to double array containing latitude and longitude. More... | |
static double[] | getCornerCoordsArray (String GARS) |
Convert a GARS string to double array containing latitude and longitude coordinates of the lower left and upper right corners of the GARS tile. More... | |
static String | getCornerJSONCoords (String GARS) |
Convert a GARS string to JSON representation of the corner coordinates. More... | |
static String | getKMLLine (String GARS, String kmlColor, double kmlWidth) |
Convert a GARS String to a KML Placemark fragment representing the GARS tile as a line. More... | |
static String | getKMLPolygon (String GARS, String kmlColor, String kmlFillColor, double kmlWidth) |
Convert a GARS String to a KML Placemark fragment representing the GARS tile as a filled polygon. More... | |
static String | getKMLPoint (String GARS, String lblColor, double lblSize) |
Convert a GARS String to a KML Placemark fragment depicting the GARS string as a label in the center of the GARS tile. More... | |
https://github.com/mil-oss/GARSutils MIT License
|
static |
Convert a GARS string to STRING representation of the center coordinates.
If the GARS string is invalid then the string 'error' is returned.
If the conversion was successful the center point of the GARS tile is returned in the format latitude,longitude. Latitude and longitude are in decimal degrees separated by a comma.
A typical result string looks like the following:
12.34567,123.45678
GARS | String |
References GARStoLL.getCenterCoordsArray().
Referenced by GARStoLL.getCenterJSONCoords().
|
static |
Convert a GARS string to double array containing latitude and longitude.
This code is a port of the NGA's geotrans cpp routines from the GEOTRANS 3.5 SDK: http://earth-info.nga.mil/GandG/geotrans/
If the GARS string is invalid then the returned array has a length of 1 and the first and only value will be -360
If the conversion was successful the center point of the GARS tile is returned as decimal degrees. The first value (index 0) holds latitude, the second value is longitude.
Check the length of the array for error checking, the length of a successful transformation will equal 2.
GARS | String |
Referenced by GARStoLL.getCenterCoords(), GARStoLL.getCenterKMLCoords(), and GARStoLL.getKMLPoint().
|
static |
Convert a GARS string to JSON representation of the center coordinates.
The JSON is will always return a status key with either "error" or "success".
If the conversion was successful then latitude and longitude keys are returned with decimal degrees values for the center point of the GARS tile.
A typical JSON string looks like the following:
{"status":"success","latitude":12.34567,"longitude":123.45678}
GARS | String |
References GARStoLL.getCenterCoords().
|
static |
Convert a GARS string to KML STRING representation of the center coordinates.
If the GARS string is invalid then an empty string is returned.
If the conversion was successful the center point of the GARS tile is returned in the format longitude,latitude. The coordinates are in decimal degrees separated by a comma.
Note: KML simply reverses the order of the coordinates and returns longitude first.
A typical result string looks like the following:
123.45678,12.34567
GARS | String |
References GARStoLL.getCenterCoordsArray().
|
static |
Convert a GARS string to double array containing latitude and longitude coordinates of the lower left and upper right corners of the GARS tile.
This code is a port of the NGA's geotrans cpp routines from the GEOTRANS 3.5 SDK: http://earth-info.nga.mil/GandG/geotrans/
If the GARS string is invalid then the returned array has a length of 1 and the first and only value will be -360
If the conversion was successful the corner points of the GARS tile is returned as decimal degrees. The first value (index 0) holds latitude, the second value is longitude of the lower left corner. The third and fourth values hold the latitude and longitude of the upper right corner.
Check the length of the array for error checking, the length of a successful transformation will equal 4.
GARS |
Referenced by GARStoLL.getCornerJSONCoords(), GARStoLL.getKMLLine(), and GARStoLL.getKMLPolygon().
|
static |
Convert a GARS string to JSON representation of the corner coordinates.
The JSON is will always return a status key with either "error" or "success".
If the conversion was successful then latitude and longitude keys are returned with decimal degrees values for the lower left and upper right corners of the GARS tile.
The corner coordinates are referenced by the keys "lowerleft" and "upperright" and are an object containing a "latitude" and "longitude" coordinate.
A typical JSON string looks like the following:
{
"status": "success",
"lowerleft": { "latitude":-33.4167, "longitude":-70.4167 },
"upperright": { "latitude":-33.3336, "longitude":-70.3333 }
}
GARS |
References GARStoLL.getCornerCoordsArray().
|
static |
Convert a GARS String to a KML Placemark fragment representing the GARS tile as a line.
If the GARS string is invalid then an empty string is returned.
kmlColor is a string in the format of aabbggrr, where aa=alpha (00 to ff); bb=blue (00 to ff); gg=green (00 to ff); rr=red (00 to ff)
Example: blue color with 50 percent opacity = 7fff0000
kmlWidth is an integer representing the line width.
GARS | |
kmlColor | the color of the line |
kmlWidth | the width of the line |
References GARStoLL.getCornerCoordsArray().
|
static |
Convert a GARS String to a KML Placemark fragment depicting the GARS string as a label in the center of the GARS tile.
KML colors are a string in the format of aabbggrr, where aa=alpha (00 to ff); bb=blue (00 to ff); gg=green (00 to ff); rr=red (00 to ff)
Example: blue color with 50 percent opacity = 7fff0000
GARS | |
lblColor | the color of the text |
lblSize | the size of the text (as a ratio to the normal size of 1.0) |
References GARStoLL.getCenterCoordsArray().
|
static |
Convert a GARS String to a KML Placemark fragment representing the GARS tile as a filled polygon.
If the GARS string is invalid then an empty string is returned.
KML colors are a string in the format of aabbggrr, where aa=alpha (00 to ff); bb=blue (00 to ff); gg=green (00 to ff); rr=red (00 to ff)
Example: blue color with 50 percent opacity = 7fff0000
kmlWidth is an integer representing the line width.
GARS | |
kmlColor | the color of the line |
kmlFillColor | the color of the polygon's fill |
kmlWidth | the width of the line |
References GARStoLL.getCornerCoordsArray().