|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bbn.openmap.dataAccess.shape.EsriGraphicFactory
public class EsriGraphicFactory
EsriGraphicFactory creates OMGraphics/EsriGraphics from a shape file.
Nested Class Summary | |
---|---|
static class |
EsriGraphicFactory.Header
|
static class |
EsriGraphicFactory.ReadByteTracker
|
Field Summary | |
---|---|
protected GeoCoordTransformation |
dataTransformation
|
protected int |
lineType
|
static java.util.logging.Logger |
logger
|
protected java.lang.Class<?> |
precision
|
protected static boolean |
verbose
|
Constructor Summary | |
---|---|
EsriGraphicFactory()
Will create shapes with straight line types (faster for rendering) and no data transformation). |
|
EsriGraphicFactory(int lineType,
GeoCoordTransformation dataTransformation)
Create a factory |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.util.logging.Logger logger
protected int lineType
protected GeoCoordTransformation dataTransformation
protected java.lang.Class<?> precision
protected static boolean verbose
Constructor Detail |
---|
public EsriGraphicFactory()
public EsriGraphicFactory(int lineType, GeoCoordTransformation dataTransformation)
lineType
- the line type to use for polysdataTransformation
- the transformation to use on data to convert it
to lat/lon decimal degrees.Method Detail |
---|
public OMGraphicList getEsriGraphics(BinaryFile shp, DrawingAttributes drawingAttributes, java.lang.Object pointRepresentation, Projection mapProj, OMGraphicList list) throws java.io.IOException, FormatException
shp
- BinaryFile from shp file.drawingAttributes
- DrawingAttribute dictating rendering.pointRepresentation
- what to use for point object rendering.mapProj
- current map projection, if not null will be used to
position OMGraphics.list
- The OMGraphicList to add OMGraphics to, returned. OK if null.
java.io.IOException
FormatException
public OMGraphicList getEsriGraphics(LittleEndianInputStream iStream, DrawingAttributes drawingAttributes, java.lang.Object pointRepresentation, Projection mapProj, OMGraphicList list) throws java.io.IOException, FormatException
iStream
- stream created from shp filedrawingAttributes
- DrawingAttributes for renderingpointRepresentation
- representation of point object renderingmapProj
- current map projectionlist
- list to add OMGraphics to, OK if null.
java.io.IOException
FormatException
protected void projGraphicAndAdd(OMGraphic eg, OMGraphicList list, Projection mapProj)
public OMGraphic makeEsriGraphicFromRecord(int byteOffset, BinaryFile shp, DrawingAttributes drawingAttributes, java.lang.Object pointRepresentation, EsriGraphicFactory.ReadByteTracker byteTracker) throws java.io.IOException, FormatException
java.io.IOException
FormatException
public OMGraphic makeEsriGraphicFromRecord(int byteOffset, LittleEndianInputStream iStream, DrawingAttributes drawingAttributes, java.lang.Object pointRepresentation, EsriGraphicFactory.ReadByteTracker byteTracker) throws java.io.IOException, FormatException
java.io.IOException
FormatException
protected OMGraphic makeEsriGraphic(BinaryFile shpFile, DrawingAttributes drawingAttributes, java.lang.Object pointRepresentation, EsriGraphicFactory.ReadByteTracker byteTracker) throws java.io.IOException, FormatException
shpFile
- BinaryFile positioned for this recorddrawingAttributes
- rendering attributes for OMGraphicpointRepresentation
- object to use for representing point databyteTracker
- keeps track of how many bytes were used for this
record.
java.io.IOException
- if something goes wrong reading the file
FormatException
protected OMGraphic makeEsriGraphic(LittleEndianInputStream iStream, DrawingAttributes drawingAttributes, java.lang.Object pointRepresentation, EsriGraphicFactory.ReadByteTracker byteTracker) throws java.io.IOException, FormatException
iStream
- stream to read from, positioned at next recorddrawingAttributes
- rendering attributespointRepresentation
- point rendering representationbyteTracker
- keeps track of how many bytes are used for this
record.
java.io.IOException
FormatException
protected EsriGraphic createPointGraphic(double x, double y, java.lang.Object representation, DrawingAttributes drawingAttributes)
protected EsriGraphic createPointGraphic(BinaryFile shpFile, java.lang.Object representation, DrawingAttributes drawingAttributes, EsriGraphicFactory.ReadByteTracker byteTracker) throws java.io.IOException, FormatException
shpFile
- with the file pointer right after the shape record shape
type bytes. It's assumed that the shape type has been read to
determine that the shapeType for this record is a Point record.representation
- The object to use for representing the Point. If
the object is an ImageIcon, that image is used for a scaling icon
at this point. If it's a String, and OMText will be created for
that Point (center-justified). If it's null, the drawing
attributes values will be used for an OMPoint.drawingAttributes
- the attributes for the OMGraphic.byteTracker
-
java.io.IOException
FormatException
protected EsriGraphic createPointGraphic(LittleEndianInputStream iStream, java.lang.Object representation, DrawingAttributes drawingAttributes, EsriGraphicFactory.ReadByteTracker byteTracker) throws java.io.IOException, FormatException
java.io.IOException
FormatException
protected EsriGraphic createMultiPointGraphic(BinaryFile shpFile, java.lang.Object representation, DrawingAttributes drawingAttributes, EsriGraphicFactory.ReadByteTracker byteTracker) throws java.io.IOException, FormatException
java.io.IOException
FormatException
protected EsriGraphic createMultiPointGraphic(LittleEndianInputStream iStream, java.lang.Object representation, DrawingAttributes drawingAttributes, EsriGraphicFactory.ReadByteTracker byteTracker) throws java.io.IOException, FormatException
java.io.IOException
FormatException
protected EsriGraphic createPointZGraphic(BinaryFile shpFile, java.lang.Object representation, DrawingAttributes drawingAttributes, EsriGraphicFactory.ReadByteTracker byteTracker) throws java.io.IOException, FormatException
java.io.IOException
FormatException
protected EsriGraphic createPointZGraphic(LittleEndianInputStream iStream, java.lang.Object representation, DrawingAttributes drawingAttributes, EsriGraphicFactory.ReadByteTracker byteTracker) throws java.io.IOException, FormatException
java.io.IOException
FormatException
protected EsriGraphic createMultiPointZGraphic(BinaryFile shpFile, java.lang.Object representation, DrawingAttributes drawingAttributes, EsriGraphicFactory.ReadByteTracker byteTracker) throws java.io.IOException, FormatException
java.io.IOException
FormatException
protected EsriGraphic createMultiPointZGraphic(LittleEndianInputStream iStream, java.lang.Object representation, DrawingAttributes drawingAttributes, EsriGraphicFactory.ReadByteTracker byteTracker) throws java.io.IOException, FormatException
java.io.IOException
FormatException
protected EsriGraphic createPointMGraphic(BinaryFile shpFile, java.lang.Object representation, DrawingAttributes drawingAttributes, EsriGraphicFactory.ReadByteTracker byteTracker) throws java.io.IOException, FormatException
java.io.IOException
FormatException
protected EsriGraphic createPointMGraphic(LittleEndianInputStream iStream, java.lang.Object representation, DrawingAttributes drawingAttributes, EsriGraphicFactory.ReadByteTracker byteTracker) throws java.io.IOException, FormatException
java.io.IOException
FormatException
protected EsriGraphic createMultiPointMGraphic(BinaryFile shpFile, java.lang.Object representation, DrawingAttributes drawingAttributes, EsriGraphicFactory.ReadByteTracker byteTracker) throws java.io.IOException, FormatException
java.io.IOException
FormatException
protected EsriGraphic createMultiPointMGraphic(LittleEndianInputStream iStream, java.lang.Object representation, DrawingAttributes drawingAttributes, EsriGraphicFactory.ReadByteTracker byteTracker) throws java.io.IOException, FormatException
java.io.IOException
FormatException
protected EsriGraphic createPolygonGraphic(BinaryFile shpFile, DrawingAttributes drawingAttributes, EsriGraphicFactory.ReadByteTracker byteTracker) throws java.io.IOException, FormatException
java.io.IOException
FormatException
protected EsriGraphic createPolygonGraphic(LittleEndianInputStream iStream, DrawingAttributes drawingAttributes, EsriGraphicFactory.ReadByteTracker byteTracker) throws java.io.IOException, FormatException
java.io.IOException
FormatException
protected EsriGraphic createPolylineGraphic(BinaryFile shpFile, DrawingAttributes drawingAttributes, EsriGraphicFactory.ReadByteTracker byteTracker) throws java.io.IOException, FormatException
java.io.IOException
FormatException
protected EsriGraphic createPolylineGraphic(LittleEndianInputStream iStream, DrawingAttributes drawingAttributes, EsriGraphicFactory.ReadByteTracker byteTracker) throws java.io.IOException, FormatException
java.io.IOException
FormatException
protected EsriGraphic createPolyGraphic(BinaryFile shpFile, int shapeType, DrawingAttributes drawingAttributes, EsriGraphicFactory.ReadByteTracker byteTracker) throws java.io.IOException, FormatException
java.io.IOException
FormatException
protected EsriGraphic createPolyGraphic(LittleEndianInputStream iStream, int shapeType, DrawingAttributes drawingAttributes, EsriGraphicFactory.ReadByteTracker byteTracker) throws java.io.IOException, FormatException
java.io.IOException
FormatException
protected EsriGraphic createPolygonZGraphic(BinaryFile shpFile, DrawingAttributes drawingAttributes, EsriGraphicFactory.ReadByteTracker byteTracker) throws java.io.IOException, FormatException
java.io.IOException
FormatException
protected EsriGraphic createPolygonZGraphic(LittleEndianInputStream iStream, DrawingAttributes drawingAttributes, EsriGraphicFactory.ReadByteTracker byteTracker) throws java.io.IOException, FormatException
java.io.IOException
FormatException
protected EsriGraphic createPolylineZGraphic(BinaryFile shpFile, DrawingAttributes drawingAttributes, EsriGraphicFactory.ReadByteTracker byteTracker) throws java.io.IOException, FormatException
java.io.IOException
FormatException
protected EsriGraphic createPolylineZGraphic(LittleEndianInputStream iStream, DrawingAttributes drawingAttributes, EsriGraphicFactory.ReadByteTracker byteTracker) throws java.io.IOException, FormatException
java.io.IOException
FormatException
protected EsriGraphic createPolyZGraphic(BinaryFile shpFile, int shapeType, DrawingAttributes drawingAttributes, EsriGraphicFactory.ReadByteTracker byteTracker) throws java.io.IOException, FormatException
java.io.IOException
FormatException
protected EsriGraphic createPolyZGraphic(LittleEndianInputStream iStream, int shapeType, DrawingAttributes drawingAttributes, EsriGraphicFactory.ReadByteTracker byteTracker) throws java.io.IOException, FormatException
java.io.IOException
FormatException
protected EsriGraphic createPolygonMGraphic(BinaryFile shpFile, DrawingAttributes drawingAttributes, EsriGraphicFactory.ReadByteTracker byteTracker) throws java.io.IOException, FormatException
java.io.IOException
FormatException
protected EsriGraphic createPolygonMGraphic(LittleEndianInputStream iStream, DrawingAttributes drawingAttributes, EsriGraphicFactory.ReadByteTracker byteTracker) throws java.io.IOException, FormatException
java.io.IOException
FormatException
protected EsriGraphic createPolylineMGraphic(BinaryFile shpFile, DrawingAttributes drawingAttributes, EsriGraphicFactory.ReadByteTracker byteTracker) throws java.io.IOException, FormatException
java.io.IOException
FormatException
protected EsriGraphic createPolylineMGraphic(LittleEndianInputStream iStream, DrawingAttributes drawingAttributes, EsriGraphicFactory.ReadByteTracker byteTracker) throws java.io.IOException, FormatException
java.io.IOException
FormatException
protected EsriGraphic createPolyMGraphic(BinaryFile shpFile, int shapeType, DrawingAttributes drawingAttributes, EsriGraphicFactory.ReadByteTracker byteTracker) throws java.io.IOException, FormatException
java.io.IOException
FormatException
protected EsriGraphic createPolyMGraphic(LittleEndianInputStream iStream, int shapeType, DrawingAttributes drawingAttributes, EsriGraphicFactory.ReadByteTracker byteTracker) throws java.io.IOException, FormatException
java.io.IOException
FormatException
protected EsriGraphic getPolys(BinaryFile shpFile, int numParts, int numPoints, int shapeType, DrawingAttributes drawingAttributes, EsriGraphicFactory.ReadByteTracker byteTracker) throws java.io.IOException, FormatException
java.io.IOException
FormatException
protected java.lang.String getCoordString(double[] coords)
protected EsriGraphic getPolys(LittleEndianInputStream iStream, int numParts, int numPoints, int shapeType, DrawingAttributes drawingAttributes, EsriGraphicFactory.ReadByteTracker byteTracker) throws java.io.IOException, FormatException
java.io.IOException
FormatException
protected float[] getFloatCoords(BinaryFile shpFile, int length, boolean isPolygon, GeoCoordTransformation dataTrans, EsriGraphicFactory.ReadByteTracker bitTracker) throws java.io.IOException, FormatException
java.io.IOException
FormatException
protected float[] getFloatCoords(LittleEndianInputStream iStream, int length, boolean isPolygon, GeoCoordTransformation dataTrans, EsriGraphicFactory.ReadByteTracker bitTracker) throws java.io.IOException, FormatException
java.io.IOException
FormatException
protected double[] getCoords(BinaryFile shpFile, int length, boolean isPolygon, GeoCoordTransformation dataTrans, EsriGraphicFactory.ReadByteTracker bitTracker) throws java.io.IOException, FormatException
java.io.IOException
FormatException
protected double[] getCoords(LittleEndianInputStream iStream, int length, boolean isPolygon, GeoCoordTransformation dataTrans, EsriGraphicFactory.ReadByteTracker bitTracker) throws java.io.IOException, FormatException
java.io.IOException
FormatException
public static boolean isPolygon(int shapeType)
public static EsriGraphic createEsriPoly(int shapeType, double[] coords, int lineType, DrawingAttributes da)
public static EsriGraphicList createEsriGraphicList(int shapeType)
public GeoCoordTransformation getDataCoordTransformation()
public void setDataCoordTransformation(GeoCoordTransformation dataTrans)
public int getLineType()
public void setLineType(int lineType)
public java.lang.Class<?> getPrecision()
public void setPrecision(java.lang.Class<?> precision)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |