|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bbn.openmap.layer.shape.SpatialIndexHandler
public class SpatialIndexHandler
The SpatialIndexHandler keeps track of all the stuff dealing with a particular shape file - file names, colors, etc. You can ask it to create OMGraphics based on a bounding box, and make adjustments to it through its GUI. This is the object to use if you just want to deal with the contents of a shape file but not display them.
Field Summary | |
---|---|
protected boolean |
buffered
|
protected OMGraphicList |
bufferedList
Master list for buffering. |
static java.lang.String |
BufferedProperty
|
protected GeoCoordTransformation |
coordTranslator
|
protected DrawingAttributes |
drawingAttributes
|
protected boolean |
enabled
|
static java.lang.String |
EnabledProperty
|
protected I18n |
i18n
|
protected java.lang.String |
imageURLString
|
protected java.lang.String |
prettyName
|
protected java.lang.String |
propertyPrefix
|
protected java.lang.String |
shapeFileName
|
protected SpatialIndex |
spatialIndex
|
Fields inherited from interface com.bbn.openmap.PropertyConsumer |
---|
EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty |
Constructor Summary | |
---|---|
SpatialIndexHandler()
|
|
SpatialIndexHandler(java.lang.String prefix,
java.util.Properties props)
|
Method Summary | |
---|---|
protected void |
checkSpatialIndexEntries(double xmin,
double ymin,
double xmax,
double ymax,
OMGraphicList retList,
Projection proj)
Checks the buffered list of OMGraphics from the shp file and figures out of they intersect the provided bounds. |
boolean |
close(boolean done)
|
static SpatialIndex |
create(java.lang.String prefix,
java.util.Properties props)
|
boolean |
getBuffered()
|
GeoCoordTransformation |
getCoordTranslator()
|
DrawingAttributes |
getDrawingAttributes()
|
boolean |
getEnabled()
|
OMGraphicList |
getGraphics(double xmin,
double ymin,
double xmax,
double ymax)
Create the OMGraphics out of the records that fall inside the bounding box. |
OMGraphicList |
getGraphics(double xmin,
double ymin,
double xmax,
double ymax,
OMGraphicList list)
Given a bounding box, create OMGraphics from the ESRI records in the shape file. |
OMGraphicList |
getGraphics(double xmin,
double ymin,
double xmax,
double ymax,
OMGraphicList list,
Projection proj)
Given a bounding box, create OMGraphics from the ESRI records in the shape file. |
javax.swing.JComponent |
getGUI()
Get the GUI that controls the attributes of the handler. |
java.lang.String |
getImageURLString()
|
java.lang.String |
getPrettyName()
|
java.util.Properties |
getProperties(java.util.Properties props)
Property Consumer method. |
java.util.Properties |
getPropertyInfo(java.util.Properties props)
Property Consumer method. |
java.lang.String |
getPropertyPrefix()
Property Consumer method. |
java.lang.String |
getShapeFileName()
|
SpatialIndex |
getSpatialIndex()
|
protected OMGraphicList |
getWholePlanet()
Get the graphics for the entire planet. |
protected OMGraphicList |
getWholePlanet(GeoCoordTransformation dataTransform)
Get the graphics for the entire planet. |
void |
setBuffered(boolean set)
|
void |
setCoordTranslator(GeoCoordTransformation coordTranslator)
|
void |
setDrawingAttributes(DrawingAttributes set)
|
void |
setEnabled(boolean set)
|
void |
setImageURLString(java.lang.String imageURLString)
|
void |
setPrettyName(java.lang.String set)
|
void |
setProperties(java.util.Properties props)
Property Consumer method. |
void |
setProperties(java.lang.String prefix,
java.util.Properties props)
Property Consumer method. |
void |
setPropertyPrefix(java.lang.String prefix)
Property Consumer method. |
void |
setShapeFileName(java.lang.String shapeFileName)
|
void |
setSpatialIndex(SpatialIndex spatialIndex)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected SpatialIndex spatialIndex
protected java.lang.String shapeFileName
protected java.lang.String imageURLString
protected GeoCoordTransformation coordTranslator
protected java.lang.String prettyName
protected DrawingAttributes drawingAttributes
protected boolean enabled
protected boolean buffered
protected java.lang.String propertyPrefix
public static final java.lang.String EnabledProperty
public static final java.lang.String BufferedProperty
protected I18n i18n
protected OMGraphicList bufferedList
Constructor Detail |
---|
public SpatialIndexHandler()
public SpatialIndexHandler(java.lang.String prefix, java.util.Properties props)
Method Detail |
---|
public static SpatialIndex create(java.lang.String prefix, java.util.Properties props)
public java.lang.String toString()
toString
in class java.lang.Object
public javax.swing.JComponent getGUI()
public void setPropertyPrefix(java.lang.String prefix)
setPropertyPrefix
in interface PropertyConsumer
prefix
- the prefix String.public java.lang.String getPropertyPrefix()
getPropertyPrefix
in interface PropertyConsumer
public void setProperties(java.util.Properties props)
setProperties
in interface PropertyConsumer
props
- a properties object that the PropertyConsumer
can use to retrieve expected properties it can use for
configuration.public void setProperties(java.lang.String prefix, java.util.Properties props)
setProperties
in interface PropertyConsumer
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.public java.util.Properties getProperties(java.util.Properties props)
getProperties
in interface PropertyConsumer
props
- a Properties object to load the PropertyConsumer
properties into. If getList equals null, then a new
Properties object should be created.
public java.util.Properties getPropertyInfo(java.util.Properties props)
getPropertyInfo
in interface PropertyConsumer
props
- a Properties object to load the PropertyConsumer
properties into. If getList equals null, then a new
Properties object should be created.
public GeoCoordTransformation getCoordTranslator()
public void setCoordTranslator(GeoCoordTransformation coordTranslator)
public OMGraphicList getGraphics(double xmin, double ymin, double xmax, double ymax) throws java.io.IOException, FormatException
xmin
- double for the min horizontal limit of the bounding box.ymin
- double for the min vertical limit of the bounding box.xmax
- double for the max horizontal limit of the bounding box.ymax
- double for the max vertical limit of the bounding box.
java.io.IOException
FormatException
public OMGraphicList getGraphics(double xmin, double ymin, double xmax, double ymax, OMGraphicList list) throws java.io.IOException, FormatException
xmin
- double for the min horizontal limit of the bounding box.ymin
- double for the min vertical limit of the bounding box.xmax
- double for the max horizontal limit of the bounding box.ymax
- double for the max vertical limit of the bounding box.list
- OMGraphic list to add the new OMGraphics too. If null, a new
OMGraphicList will be created.
java.io.IOException
FormatException
public OMGraphicList getGraphics(double xmin, double ymin, double xmax, double ymax, OMGraphicList list, Projection proj) throws java.io.IOException, FormatException
xmin
- double for the min horizontal limit of the bounding box.ymin
- double for the min vertical limit of the bounding box.xmax
- double for the max horizontal limit of the bounding box.ymax
- double for the max vertical limit of the bounding box.list
- OMGraphic list to add the new OMGraphics too. If null, a new
OMGraphicList will be created.proj
- the projection to use to generate the OMGraphics.
java.io.IOException
FormatException
protected void checkSpatialIndexEntries(double xmin, double ymin, double xmax, double ymax, OMGraphicList retList, Projection proj) throws java.io.IOException, FormatException
xmin
- minimum longitude, decimal degrees.ymin
- minimum latitude, decimal degrees.xmax
- maximum longitude, decimal degrees.ymax
- maximum latitude, decimal degrees.retList
- the list that passing OMGraphics will be added to.proj
- the current map projection.
java.io.IOException
FormatException
protected OMGraphicList getWholePlanet() throws java.io.IOException, FormatException
java.io.IOException
FormatException
protected OMGraphicList getWholePlanet(GeoCoordTransformation dataTransform) throws java.io.IOException, FormatException
java.io.IOException
FormatException
public void setPrettyName(java.lang.String set)
public java.lang.String getPrettyName()
public void setBuffered(boolean set)
public boolean getBuffered()
public void setDrawingAttributes(DrawingAttributes set)
public DrawingAttributes getDrawingAttributes()
public SpatialIndex getSpatialIndex()
public void setSpatialIndex(SpatialIndex spatialIndex)
public java.lang.String getShapeFileName()
public void setShapeFileName(java.lang.String shapeFileName)
public java.lang.String getImageURLString()
public void setImageURLString(java.lang.String imageURLString)
public void setEnabled(boolean set)
public boolean getEnabled()
public boolean close(boolean done)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |