|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ontimize.util.gis.extension.google.GoogleTileUtils
public class GoogleTileUtils
A utility class to assist in encoding and decoding google tile references For reasons of my own longitude is treated as being between -180 and +180 and internally latitude is treated as being from -1 to +1 and then converted to a mercator projection before return. All rectangles are sorted so the width and height are +ve
| Method Summary | |
|---|---|
static java.awt.image.BufferedImage |
getDebugTileFor(int x,
int y,
int zoom)
Returns a buffered image with the corner lat/lon,x,y and zoom level written on it. |
static java.awt.image.BufferedImage |
getDebugTileFor(java.lang.String keyholeString)
Returns a buffered image with the corner lat/lon,keyhole id and zoom level written on it. |
static java.awt.geom.Rectangle2D.Double |
getLatLong(int x,
int y,
int zoom)
returns a Rectangle2D with x = lon, y = lat, width=lonSpan, height=latSpan for an x,y,zoom as used by google. |
static java.awt.geom.Rectangle2D.Double |
getLatLong(java.lang.String keyholeStr)
returns a Rectangle2D with x = lon, y = lat, width=lonSpan, height=latSpan for a keyhole string. |
static java.lang.String |
getTileRef(double lon,
double lat,
int zoom)
returns a keyhole string for a longitude (x), latitude (y), and zoom |
static int |
getTileZoom(java.lang.String keyHoleString)
returns the Google zoom level for the keyhole string. |
static void |
main(java.lang.String[] args)
Tests |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.awt.image.BufferedImage getDebugTileFor(java.lang.String keyholeString)
keyholeString - the keyhole string to return the image for.
public static java.awt.image.BufferedImage getDebugTileFor(int x,
int y,
int zoom)
public static java.awt.geom.Rectangle2D.Double getLatLong(java.lang.String keyholeStr)
public static java.awt.geom.Rectangle2D.Double getLatLong(int x,
int y,
int zoom)
public static java.lang.String getTileRef(double lon,
double lat,
int zoom)
public static int getTileZoom(java.lang.String keyHoleString)
public static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||