public class ZoomLevelMaker extends ZoomLevelInfo
#Needed for property file creation of TileMaker zoomMarker.class=com.bbn.openmap.image.ZoomLevelInfo #Optional, to limit tile areas created, in sets of 4, must be in lat,lon order. zoomMarker.bounds=lat lon lat lon zoomMarker.description=Tiles for zoom level 4 #Marker names for layers to be rendered, the property prefixes for the layers held by TileMaker zoomMarker.layers=lakes shape zoomMarker.name=ZoomLayerInfo 4 zoomMarker.zoomLevel=4 zoomMarker.range=0Note that the zoomMarker keyword should be stored in the TileMaker zoomLevels property list.
Modifier and Type | Field and Description |
---|---|
protected java.util.List<java.awt.geom.Rectangle2D> |
bounds |
static java.lang.String |
BOUNDS_PROPERTY |
protected java.lang.String |
description |
static java.lang.String |
DESCRIPTION_PROPERTY |
protected java.util.List<Layer> |
layerList |
protected java.util.List<java.lang.String> |
layers |
static java.lang.String |
LAYERS_PROPERTY |
protected java.lang.String |
name |
static java.lang.String |
NAME_PROPERTY |
protected int |
range
The range should be equal or smaller than the zoom level, describing how
many other zoom levels should be created from the tiles created for this
zoom level (scaling).
|
static int |
RANGE_NOT_SET |
static java.lang.String |
RANGE_PROPERTY |
static java.lang.String |
ZOOM_LEVEL_PROPERTY |
scale, zoomLevel
i18n, propertyPrefix
beanContextChildSupport, isolated
EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty
Constructor and Description |
---|
ZoomLevelMaker()
Need this to create it from properties
|
ZoomLevelMaker(java.lang.String name,
java.lang.String desc,
int zoomLevel)
Create a ZoomLevelInfo object that contains information about what map
tiles should be created for this zoom level.
|
Modifier and Type | Method and Description |
---|---|
void |
addBounds(java.awt.geom.Rectangle2D bounds)
Set world coordinate bounds for tiles to be created.
|
java.awt.geom.Rectangle2D |
createProperBounds(double x1,
double y1,
double x2,
double y2)
Create a bounding rectangle given the four coordinates, where the upper
left corner of the rectangle is the minimum x, y values and the width and
height are the difference between xs and ys.
|
java.util.List<java.awt.geom.Rectangle2D> |
getBounds()
Get bounds, defined as world coordinates (i.e.
|
java.lang.String |
getDescription()
Get the description of this zoom level.
|
java.util.List<Layer> |
getLayerList()
Get the List of Layer Objects, if it's been set.
|
java.util.List<java.lang.String> |
getLayers()
Get the current marker name (property prefix) for layers considered for
this zoom level.
|
java.lang.String |
getName() |
java.util.Properties |
getProperties(java.util.Properties props)
PropertyConsumer method, to fill in a Properties object, reflecting the
current values of the OMComponent.
|
java.util.Properties |
getPropertyInfo(java.util.Properties props)
Method to fill in a Properties object with values reflecting the
properties able to be set on this PropertyConsumer.
|
int |
getRange()
Get the range of this ZoomLevelMaker.
|
java.util.List<java.awt.geom.Rectangle2D> |
getUVBounds(MapTileCoordinateTransform mtct,
int zoomLevel)
Get the bounds as defined as UV tile limits.
|
byte[] |
makeTile(double uvx,
double uvy,
MapTileMaker mapTileMaker,
Proj proj) |
void |
setDescription(java.lang.String description)
Set the description for this zoom level.
|
void |
setLayerList(java.util.List<Layer> layerList)
Set a List of Layer objects.
|
void |
setLayers(java.util.List<java.lang.String> layers)
Set the marker names (property prefixes) for the layers that should be
considered for this zoom level.
|
void |
setName(java.lang.String name)
Set the name of this zoom level info.
|
void |
setProperties(java.lang.String prefix,
java.util.Properties props)
Sets the properties for the OMComponent.
|
void |
setRange(int range) |
void |
setZoomLevel(int zoomLevel) |
formatImageFilePath, formatParentDirectoryName, getEdgeTileCount, getScale, getUVBounds, getZoomLevel, setScale
getPropertyPrefix, setProperties, setPropertyPrefix
addPropertyChangeListener, addVetoableChangeListener, childrenAdded, childrenRemoved, findAndInit, findAndInit, findAndUndo, firePropertyChange, fireVetoableChange, getBeanContext, isIsolated, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext, setIsolated
public static final java.lang.String BOUNDS_PROPERTY
public static final java.lang.String NAME_PROPERTY
public static final java.lang.String DESCRIPTION_PROPERTY
public static final java.lang.String ZOOM_LEVEL_PROPERTY
public static final java.lang.String LAYERS_PROPERTY
public static final java.lang.String RANGE_PROPERTY
public static final int RANGE_NOT_SET
protected java.lang.String name
protected java.lang.String description
protected java.util.List<java.lang.String> layers
protected java.util.List<Layer> layerList
protected int range
protected java.util.List<java.awt.geom.Rectangle2D> bounds
public ZoomLevelMaker()
public ZoomLevelMaker(java.lang.String name, java.lang.String desc, int zoomLevel)
name
- desc
- zoomLevel
- public void setProperties(java.lang.String prefix, java.util.Properties props)
OMComponent
setProperties
in interface PropertyConsumer
setProperties
in class OMComponent
prefix
- the token to prefix the property namesprops
- the Properties
objectpublic java.util.Properties getProperties(java.util.Properties props)
OMComponent
getProperties
in interface PropertyConsumer
getProperties
in class OMComponent
props
- a Properties object to load the PropertyConsumer properties
into. If props equals null, then a new Properties object should be
created.public java.util.Properties getPropertyInfo(java.util.Properties props)
OMComponent
getPropertyInfo
in interface PropertyConsumer
getPropertyInfo
in class OMComponent
props
- a Properties object to load the PropertyConsumer properties
into. If getList equals null, then a new Properties object should
be created.public java.lang.String getName()
public void setName(java.lang.String name)
name
- public java.lang.String getDescription()
public void setDescription(java.lang.String description)
description
- public java.util.List<java.lang.String> getLayers()
public void setLayers(java.util.List<java.lang.String> layers)
layers
- public java.util.List<Layer> getLayerList()
public void setLayerList(java.util.List<Layer> layerList)
layerList
- public void setZoomLevel(int zoomLevel)
setZoomLevel
in class ZoomLevelInfo
zoomLevel
- the current zoom level.public java.util.List<java.awt.geom.Rectangle2D> getBounds()
public void addBounds(java.awt.geom.Rectangle2D bounds)
bounds
- No checks performed - x, y have to be the min, height and
width must not exceed boundary limits (lat +/- 85, lon +/- 180)
when added to x, y.public java.util.List<java.awt.geom.Rectangle2D> getUVBounds(MapTileCoordinateTransform mtct, int zoomLevel)
public java.awt.geom.Rectangle2D createProperBounds(double x1, double y1, double x2, double y2)
x1
- y1
- x2
- y2
- public int getRange()
public void setRange(int range)
public byte[] makeTile(double uvx, double uvy, MapTileMaker mapTileMaker, Proj proj)
uvx
- uvy
- mapTileMaker
- proj
- Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details