ShpFileEmptyTileHandler (OpenMap API)
Date: 2016-12-09

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bbn.openmap.dataAccess.mapTile
Class ShpFileEmptyTileHandler

    java.lang.Object
      com.bbn.openmap.dataAccess.mapTile.SimpleEmptyTileHandler
          com.bbn.openmap.dataAccess.mapTile.ShpFileEmptyTileHandler

All Implemented Interfaces:
  EmptyTileHandler, PropertyConsumer

Direct Known Subclasses:
  WholeWorldTileHandler

    public class ShpFileEmptyTileHandler

extends SimpleEmptyTileHandler

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 a shape layer to render into empty tiles in an attempt to fill in empty tiles on the fly.

     emptyTileHandler=com.bbn.openmap.dataAccess.mapTile.ShpFileEmptyTileHandler
     shpFile=File, resource or URL to shape file for land representation.

     # Properties to set how the shp file contents are rendered.
     land.fillColor=hex RGB color
     land.lineColor=hex RGB color
     land.fillPattern=path to resource, file or URL of pattern to use for tile fill.

     # From SimpleEmptyTileHandler superclass, handling the 'water'
     # clear by default if not specified
     background.fillColor=hex RGB color
     background.lineColor=hex RGB color
     background.fillPattern=path to resource, file or URL of pattern to use for tile fill.

     # Zoom level to start using noCoverage attributes.  Is 0 by default if the shape file
     # is not specified.  If the shape file is specified and this isn't the zoom level
     # will be set to 20.
     noCoverageZoom=zoom level when you don't want empty tiles, you want no coverage tiles

     # How to render standard empty tiles, will be clear if not defined
     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.

Author:
  ddietrick

Field Summary
`static java.lang.String` | `LAND_ATTRIBUTES_PROPERTY`
`protected DrawingAttributes` | `landAttributes`
`protected ShapeLayer` | `shapeStuff`
`static java.lang.String` | `SHP_FILE_PROPERTY`

Fields inherited from class com.bbn.openmap.dataAccess.mapTile.SimpleEmptyTileHandler
`BACKGROUND_PROPERTY, backgroundAtts, backgroundTileImage, emptyTileImage, logger, NO_COVERAGE_PROPERTY, 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
`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.
`ShapeLayer` | `getShapeStuff()`
`void` | `setLandAttributes(DrawingAttributes landAttributes)`
`void` | `setProperties(java.lang.String prefix, java.util.Properties props)` Method to set the properties in the PropertyConsumer.
`void` | `setShapeStuff(ShapeLayer shapeStuff)`

Methods inherited from class com.bbn.openmap.dataAccess.mapTile.SimpleEmptyTileHandler
`createTileImageFromDrawingAttributes, 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

### LAND_ATTRIBUTES_PROPERTY

    public static final java.lang.String LAND_ATTRIBUTES_PROPERTY

See Also:
  Constant Field Values

### SHP_FILE_PROPERTY

    public static final java.lang.String SHP_FILE_PROPERTY

See Also:
  Constant Field Values

### shapeStuff

    protected ShapeLayer shapeStuff

### landAttributes

    protected DrawingAttributes landAttributes

Constructor Detail

### ShpFileEmptyTileHandler

    public ShpFileEmptyTileHandler()

Method Detail

### getImageForEmptyTile

    public java.awt.image.BufferedImage getImageForEmptyTile(java.lang.String imagePath,
                                                             int x,
                                                             int y,
                                                             int zoomLevel,
                                                             MapTileCoordinateTransform mtcTransform,
                                                             Projection proj)

  Description copied from interface: `EmptyTileHandler`
  The main call from the MapTileFactory to return something for the given missing tile.

  Specified by:
    `getImageForEmptyTile` in interface `EmptyTileHandler`
  Overrides:
    `getImageForEmptyTile` in class `SimpleEmptyTileHandler`
  Parameters:
    `imagePath` - 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.
  Returns:
    BufferedImage for image tile

### getShapeStuff

    public ShapeLayer getShapeStuff()

### setShapeStuff

    public void setShapeStuff(ShapeLayer shapeStuff)

### setProperties

    public void setProperties(java.lang.String prefix,
                              java.util.Properties props)

  Description copied from interface: `PropertyConsumer`
  Method to set the properties in the PropertyConsumer. The prefix is a string that should be prepended to each property key (in addition to a separating '.') in order for the PropertyConsumer to uniquely identify properties meant for it, in the midst of of Properties meant for several objects.

  Specified by:
    `setProperties` in interface `PropertyConsumer`
  Overrides:
    `setProperties` in class `SimpleEmptyTileHandler`
  Parameters:
    `prefix` - 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.

### getProperties

    public java.util.Properties getProperties(java.util.Properties props)

  Description copied from interface: `PropertyConsumer`
  Method to fill in a Properties object, reflecting the current values of the PropertyConsumer. If the PropertyConsumer has a prefix set, the property keys should have that prefix plus a separating '.' prepended to each property key it uses for configuration.

  Specified by:
    `getProperties` in interface `PropertyConsumer`
  Overrides:
    `getProperties` in class `SimpleEmptyTileHandler`
  Parameters:
    `props` - a Properties object to load the PropertyConsumer properties into. If getList equals null, then a new Properties object should be created.
  Returns:
    Properties object containing PropertyConsumer property values. If getList was not null, this should equal getList. Otherwise, it should be the Properties object created by the PropertyConsumer.

### getLandAttributes

    public DrawingAttributes getLandAttributes()

  Returns:
    the landAttributes

### setLandAttributes

    public void setLandAttributes(DrawingAttributes landAttributes)

  Parameters:
    `landAttributes` - the landAttributes to set

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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