com.bbn.openmap.plugin.earthImage
Class EarthImagePlugIn
java.lang.Object
com.bbn.openmap.plugin.AbstractPlugIn
com.bbn.openmap.plugin.earthImage.EarthImagePlugIn
- All Implemented Interfaces:
- MapMouseListener, ImageServerConstants, WMTConstants, PlugIn, PropertyConsumer
public class EarthImagePlugIn
- extends AbstractPlugIn
- implements ImageServerConstants
This class takes an image of the earth, and creates a background image from
it that matches an OpenMap projection. It currently assumes that the
degrees/pixel ratios are constant in both directions, the coordinate system
origins in both directions are at the center of the picture, and that the
left an right edges of the images are at -180/180 degrees longitude, and that
the top and bottom of the edges are at 90/-90 degrees latitude. I think the
code will work for images that do not cover the entire earth in this manner,
as long as the degree/pixel ratios are the same, but the ImageTranslator
limits would have to be adjusted to fit the source image.
#For the plugin layer pluginlayer.class=com.bbn.openmap.plugin.PlugInLayer
pluginlayer.prettyName=Whatever
pluginlayer.plugin=com.bbn.openmap.plugin.earthImage.EarthImagePlugIn
pluginlayer.plugin.image=path to file, URL or resource.
Nested Class Summary |
class |
EarthImagePlugIn.ImageTranslator
The ImageTranslator is the object that takes the BufferedImage and creates
the OMRaster from it based on a Projection object. |
Fields inherited from interface com.bbn.openmap.image.ImageServerConstants |
AZIMUTH, LAT, LAYERMASK, LAYERS, LON, PAN, PROJTYPE, QUERY, RECENTER, SCALE, X, Y |
Fields inherited from interface com.bbn.openmap.image.WMTConstants |
BBOX, BGCOLOR, CAPABILITIES, CRS, EXCEPTIONS, FORMAT, GETCAPABILITIES, GETFEATUREINFO, GETLEGENDGRAPHIC, GETMAP, HEIGHT, IMAGEFORMAT_GEOTIFF, IMAGEFORMAT_GIF, IMAGEFORMAT_JPEG, IMAGEFORMAT_PNG, IMAGEFORMAT_PPM, IMAGEFORMAT_SVG, IMAGEFORMAT_TIFF, IMAGEFORMAT_WBMP, INFO_FORMAT, LAYER, MAP, QUERY_LAYERS, REQUEST, SERVICE, SRS, STYLE, STYLES, TRANSPARENT, VERSION, WIDTH, WMTVER |
Method Summary |
java.util.Properties |
getProperties(java.util.Properties props)
Method to fill in a Properties object, reflecting the current values of
the PropertyConsumer. |
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. |
OMGraphicList |
getRectangle(Projection p)
The getRectangle call is the main call into the PlugIn module. |
void |
setProperties(java.lang.String prefix,
java.util.Properties setList)
Method to set the properties in the PropertyConsumer. |
Methods inherited from class com.bbn.openmap.plugin.AbstractPlugIn |
dispose, doPrepare, getAddToBeanContext, getComponent, getGUI, getMapMouseListener, getMouseModeServiceList, getName, getPropertyPrefix, isRemovable, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mouseMoved, mousePressed, mouseReleased, removed, repaint, setAddToBeanContext, setComponent, setMapMouseListener, setName, setProperties, setPropertyPrefix, setRemovable |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
bi
protected java.awt.image.BufferedImage bi
it
protected EarthImagePlugIn.ImageTranslator it
ImageProperty
public static final java.lang.String ImageProperty
- See Also:
- Constant Field Values
imageString
protected java.lang.String imageString
EarthImagePlugIn
public EarthImagePlugIn()
EarthImagePlugIn
public EarthImagePlugIn(java.awt.Component comp)
getRectangle
public OMGraphicList getRectangle(Projection p)
- Description copied from class:
AbstractPlugIn
- The getRectangle call is the main call into the PlugIn module. The module
is expected to fill a graphics list with objects that are within the
screen parameters passed. It's assumed that the PlugIn will call
generate(projection) on the OMGraphics returned! If you don't call
generate on the OMGraphics, they will not be displayed on the map.
- Specified by:
getRectangle
in interface PlugIn
- Specified by:
getRectangle
in class AbstractPlugIn
- Parameters:
p
- projection of the screen, holding scale, center coords, height,
width.
- Returns:
- an OMGraphicList containing an OMRaster with the image to be
displayed.
- See Also:
Projection
,
OMGraphicList
setProperties
public void setProperties(java.lang.String prefix,
java.util.Properties setList)
- 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 AbstractPlugIn
- 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.setList
- 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 class:
AbstractPlugIn
- 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 AbstractPlugIn
- 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.
getPropertyInfo
public java.util.Properties getPropertyInfo(java.util.Properties props)
- Description copied from class:
AbstractPlugIn
- Method to fill in a Properties object with values reflecting the
properties able to be set on this PropertyConsumer. The key for each
property should be the raw property name (without a prefix) with a value
that is a String that describes what the property key represents, along
with any other information about the property that would be helpful
(range, default value, etc.).
- Specified by:
getPropertyInfo
in interface PropertyConsumer
- Overrides:
getPropertyInfo
in class AbstractPlugIn
- 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.
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details