com.bbn.openmap.dataAccess.mapTile
Interface MapTileCoordinateTransform

All Known Implementing Classes:
OSMMapTileCoordinateTransform, TMSMapTileCoordinateTransform

public interface MapTileCoordinateTransform

The TileCoordinateTransform is an object that knows how to translate lat/lon coordinates to UV tile coordinates for map tiles. Its an interface because there seem to be two accepted ways to divide up frames over the Earth. The Tile Map Service (TMS) tile system divide the Earth with the origin at the bottom left, OpenStreetMap has the origin at the top left.

Author:
dietrick

Field Summary
static int TILE_SIZE
           
static java.awt.geom.Point2D UVLR
           
static java.awt.geom.Point2D UVUL
           
 
Method Summary
 int[] getTileBoundsForProjection(java.awt.geom.Point2D upperLeft, java.awt.geom.Point2D lowerRight, int zoomLevel)
          Given a projection, provide the upper, lower, left and right tile coordinates that cover the projection area.
 MercatorUVGCT getTransform(int zoomLevel)
          The coordinate transformation object used for lat/lon uv conversions.
 boolean isYDirectionUp()
           
 java.awt.geom.Point2D latLonToTileUV(java.awt.geom.Point2D latlon, int zoom)
           
 java.awt.geom.Point2D latLonToTileUV(java.awt.geom.Point2D latlon, int zoom, java.awt.geom.Point2D ret)
           
 java.awt.geom.Point2D tileUVToLatLon(java.awt.geom.Point2D tileUV, int zoom)
           
 LatLonPoint tileUVToLatLon(java.awt.geom.Point2D tileUV, int zoom, LatLonPoint ret)
           
 

Field Detail

TILE_SIZE

static final int TILE_SIZE
See Also:
Constant Field Values

UVUL

static final java.awt.geom.Point2D UVUL

UVLR

static final java.awt.geom.Point2D UVLR
Method Detail

latLonToTileUV

java.awt.geom.Point2D latLonToTileUV(java.awt.geom.Point2D latlon,
                                     int zoom)

latLonToTileUV

java.awt.geom.Point2D latLonToTileUV(java.awt.geom.Point2D latlon,
                                     int zoom,
                                     java.awt.geom.Point2D ret)

tileUVToLatLon

java.awt.geom.Point2D tileUVToLatLon(java.awt.geom.Point2D tileUV,
                                     int zoom)
Parameters:
tileUV - a Point2D whose x,y coordinates represent the distance in number of tiles (each 256x256) from the origin (where the origin is 90lat,-180lon)
zoom - Tile Map Service (TMS) style zoom level (0-19 usually)
Returns:
a Point2D whose x coordinate is the longitude and y coordinate is the latitude

tileUVToLatLon

LatLonPoint tileUVToLatLon(java.awt.geom.Point2D tileUV,
                           int zoom,
                           LatLonPoint ret)

getTileBoundsForProjection

int[] getTileBoundsForProjection(java.awt.geom.Point2D upperLeft,
                                 java.awt.geom.Point2D lowerRight,
                                 int zoomLevel)
Given a projection, provide the upper, lower, left and right tile coordinates that cover the projection area.

Parameters:
upperLeft - lat/lon coordinate of upper left corner of bounding box.
lowerRight - lat/lon coordinate of lower right corner of bounding box.
zoomLevel - zoom level of desired tiles.
Returns:
int[], in top, left, bottom and right order.

isYDirectionUp

boolean isYDirectionUp()
Returns:
if y coordinates for tiles increase as pixel values increase.

getTransform

MercatorUVGCT getTransform(int zoomLevel)
The coordinate transformation object used for lat/lon uv conversions.

Returns:
Mercator UVGGT for a particular zoom level.


Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details