|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bbn.openmap.dataAccess.mapTile.SimpleEmptyTileHandler
com.bbn.openmap.dataAccess.mapTile.ShpFileEmptyTileHandler
public class ShpFileEmptyTileHandler
Uses a Shape file to figure out if a tile is over water or over land, so the proper color is used for an empty tile. In addition to all of the properties listed in the SimpleEmptyTileHandler, there are other properties to set up the ShapeGeoIndex and the land drawing attribute properties.
emptyTileHandler=com.bbn.openmap.dataAccess.mapTile.ShpFileEmptyTileHandler land.fillColor=hex RGB color land.lineColor=hex RGB color shpFile=File, resource or URL to shape file for land representation. Tile locations will be tested against this file to determine if they are over land or sea. # From SimpleEmptyTileHandler superclass: # clear with black edges by default if not specified background.fillColor=hex RGB color background.lineColor=hex RGB color # if not specified for levels with no tiles at all, background will look blocky noCoverageZoom=zoom level when you don't want empty tiles, you want no coverage tiles # optional, will be clear otherwise noCoverage.fillColor=hex RGB color noCoverage.lineColor=hex RGB color noCoverage.fillPattern=path to resource, file or URL of pattern to use for tile fill.
| Field Summary | |
|---|---|
protected ShapeGeoIndex |
geoIndex
|
static java.lang.String |
LAND_ATTRIBUTES_PROPERTY
|
protected DrawingAttributes |
landAttributes
|
static java.lang.String |
SHP_FILE_PROPERTY
|
| Fields inherited from class com.bbn.openmap.dataAccess.mapTile.SimpleEmptyTileHandler |
|---|
BACKGROUND_PROPERTY, backgroundAtts, logger, NO_COVERAGE_ZOOM_PROPERTY, noCoverageAtts, noCoverageZoom, prefix, TILE_SIZE |
| Fields inherited from interface com.bbn.openmap.PropertyConsumer |
|---|
EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty |
| Constructor Summary | |
|---|---|
ShpFileEmptyTileHandler()
|
|
| Method Summary | |
|---|---|
ShapeGeoIndex |
getGeoIndex()
|
java.awt.image.BufferedImage |
getImageForEmptyTile(java.lang.String imagePath,
int x,
int y,
int zoomLevel,
MapTileCoordinateTransform mtcTransform,
Projection proj)
The main call from the MapTileFactory to return something for the given missing tile. |
DrawingAttributes |
getLandAttributes()
|
java.util.Properties |
getProperties(java.util.Properties props)
Method to fill in a Properties object, reflecting the current values of the PropertyConsumer. |
protected boolean |
isOverLand(double lat,
double lon)
If there is no geoIndex set, this returns false. |
void |
setGeoIndex(ShapeGeoIndex geoIndex)
|
void |
setGeoIndex(java.lang.String fileName)
Creates the Geo Index from a shape file. |
void |
setLandAttributes(DrawingAttributes landAttributes)
|
void |
setProperties(java.lang.String prefix,
java.util.Properties props)
Method to set the properties in the PropertyConsumer. |
| Methods inherited from class com.bbn.openmap.dataAccess.mapTile.SimpleEmptyTileHandler |
|---|
getBackgroundAtts, getNoCoverageAtts, getNoCoverageZoom, getPropertyInfo, getPropertyPrefix, setBackgroundAtts, setNoCoverageAtts, setNoCoverageZoom, setProperties, setPropertyPrefix |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String LAND_ATTRIBUTES_PROPERTY
public static final java.lang.String SHP_FILE_PROPERTY
protected ShapeGeoIndex geoIndex
protected DrawingAttributes landAttributes
| Constructor Detail |
|---|
public ShpFileEmptyTileHandler()
| Method Detail |
|---|
public java.awt.image.BufferedImage getImageForEmptyTile(java.lang.String imagePath,
int x,
int y,
int zoomLevel,
MapTileCoordinateTransform mtcTransform,
Projection proj)
EmptyTileHandler
getImageForEmptyTile in interface EmptyTileHandlergetImageForEmptyTile in class SimpleEmptyTileHandlerimagePath - the path of the missing tile that is going to be used as
cache lookup later.x - the uv x coordinate of the tile.y - the uv y coordinate of the tile.zoomLevel - the zoom level of the tile.mtcTransform - the transform that converts x,y coordinates to
lat/lon and describes the layout of the uv tile coordinates.proj - the map projection, in case that matters what should be
returned for the empty tile.
protected boolean isOverLand(double lat,
double lon)
lat - latitude, decimal degreeslon - longitude, decimal degrees
public void setGeoIndex(java.lang.String fileName)
fileName - file, resource or URL to shape file (.shp)
public void setProperties(java.lang.String prefix,
java.util.Properties props)
PropertyConsumer
setProperties in interface PropertyConsumersetProperties in class SimpleEmptyTileHandlerprefix - a String used by the PropertyConsumer to prepend
to each property value it wants to look up -
setList.getProperty(prefix.propertyKey). If the prefix
had already been set, then the prefix passed in should
replace that previous value.props - a Properties object that the PropertyConsumer
can use to retrieve expected properties it can use for
configuration.public java.util.Properties getProperties(java.util.Properties props)
PropertyConsumer
getProperties in interface PropertyConsumergetProperties in class SimpleEmptyTileHandlerprops - a Properties object to load the PropertyConsumer
properties into. If getList equals null, then a new
Properties object should be created.
public ShapeGeoIndex getGeoIndex()
public void setGeoIndex(ShapeGeoIndex geoIndex)
geoIndex - the geoIndex to setpublic DrawingAttributes getLandAttributes()
public void setLandAttributes(DrawingAttributes landAttributes)
landAttributes - the landAttributes to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||