public class ShpInputStream extends java.lang.Object implements ShapeConstants
Modifier and Type | Field and Description |
---|---|
protected DrawingAttributes |
drawingAttributes |
DBF_ATTRIBUTE, DBF_AUTOINCREMENT, DBF_BINARY, DBF_CHARACTER, DBF_DATE, DBF_DOUBLE, DBF_FLOAT, DBF_LOGICAL, DBF_LONG, DBF_MEMO, DBF_NUMERIC, DBF_OLE, DBF_TIMESTAMP, DBF_TYPE_AUTOINCREMENT, DBF_TYPE_BINARY, DBF_TYPE_CHARACTER, DBF_TYPE_DATE, DBF_TYPE_DOUBLE, DBF_TYPE_FLOAT, DBF_TYPE_LOGICAL, DBF_TYPE_LONG, DBF_TYPE_MEMO, DBF_TYPE_NUMERIC, DBF_TYPE_OLE, DBF_TYPE_TIMESTAMP, PARAM_DBF, PARAM_SHP, PARAM_SHX, SHAPE_BOUNDS_ATTRIBUTE, SHAPE_DBF_DASHPATTERN, SHAPE_DBF_DASHPHASE, SHAPE_DBF_DESCRIPTION, SHAPE_DBF_FILLCOLOR, SHAPE_DBF_INFO_ATTRIBUTE, SHAPE_DBF_LINECOLOR, SHAPE_DBF_LINEWIDTH, SHAPE_DBF_SELECTCOLOR, SHAPE_FILE_HEADER_LENGTH, SHAPE_FILE_RECORD_HEADER_LENGTH, SHAPE_INDEX_ATTRIBUTE, SHAPE_MAX_MEASURE_ATTRIBUTE, SHAPE_MAX_Z_ATTRIBUTE, SHAPE_MEASURE_ATTRIBUTE, SHAPE_MIN_MEASURE_ATTRIBUTE, SHAPE_MIN_Z_ATTRIBUTE, SHAPE_TYPE_ARC, SHAPE_TYPE_MULTIPATCH, SHAPE_TYPE_MULTIPOINT, SHAPE_TYPE_MULTIPOINTM, SHAPE_TYPE_MULTIPOINTZ, SHAPE_TYPE_NULL, SHAPE_TYPE_POINT, SHAPE_TYPE_POINTM, SHAPE_TYPE_POINTZ, SHAPE_TYPE_POLYGON, SHAPE_TYPE_POLYGONM, SHAPE_TYPE_POLYGONZ, SHAPE_TYPE_POLYLINE, SHAPE_TYPE_POLYLINEM, SHAPE_TYPE_POLYLINEZ, SHAPE_Z_ATTRIBUTE
Constructor and Description |
---|
ShpInputStream(java.io.InputStream is)
Constructor
|
Modifier and Type | Method and Description |
---|---|
DrawingAttributes |
getDrawingAttributes()
Get the DrawingAttributes used for drawing the graphics.
|
EsriGraphicList |
getGeometry()
Reads geometry from a .shp file.
|
EsriGraphicList |
getGeometry(EsriGraphicFactory factory)
Reads geometry from a .shp file.
|
EsriGraphicList |
getGeometry(int[][] indexData)
Deprecated.
use getGeometry() instead, indexData isn't used.
|
protected int[] |
getPartOffsets(OMGraphicList sublist)
Deprecated.
not used.
|
EsriGraphicList |
getPointGeometry(int[][] indexData)
Deprecated.
not used.
|
protected int |
getPointsPerShape(OMGraphicList sublist)
Deprecated.
not used.
|
EsriGraphicList |
getPolyGeometry(int[][] indexData,
int shapeType)
Deprecated.
not used.
|
int |
readHeader()
Deprecated.
not used.
|
void |
setDrawingAttributes(DrawingAttributes da)
Set the DrawingAttributes to use for drawing the graphics.
|
protected DrawingAttributes drawingAttributes
public ShpInputStream(java.io.InputStream is)
is
- An inputstream to chain with LittleEndianInputStreampublic void setDrawingAttributes(DrawingAttributes da)
public DrawingAttributes getDrawingAttributes()
public EsriGraphicList getGeometry(int[][] indexData) throws java.lang.Exception
indexData
- The index data retrieved from the .shx filejava.lang.Exception
public EsriGraphicList getGeometry() throws java.lang.Exception
java.lang.Exception
public EsriGraphicList getGeometry(EsriGraphicFactory factory) throws java.lang.Exception
factory
- an EsriGraphicFactory to be used to read from the internal
stream.java.lang.Exception
protected int[] getPartOffsets(OMGraphicList sublist)
public EsriGraphicList getPointGeometry(int[][] indexData) throws java.lang.Exception
indexData
- A list of offsets obtained by iterating through the
associated SHX filejava.lang.Exception
protected int getPointsPerShape(OMGraphicList sublist)
sublist
- A list that contains multiple partspublic EsriGraphicList getPolyGeometry(int[][] indexData, int shapeType) throws java.lang.Exception
shapeType
- the type of shape to readindexData
- A list of offsets obtained by iterating through the
associated SHX filejava.lang.Exception
public int readHeader() throws java.io.IOException
java.io.IOException
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details