|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bbn.openmap.dataAccess.shape.output.ShpOutputStream
public class ShpOutputStream
Writes data to a .shp file
Field Summary | |
---|---|
static int |
ESRI_RECORD_HEADER_LENGTH
|
static java.util.logging.Logger |
logger
|
protected GeoCoordTransformation |
transform
A GeoCoordTransform to use to convert Lat/Lon values in EsriGraphics to projected coordinates. |
Constructor Summary | |
---|---|
ShpOutputStream(java.io.OutputStream os)
Creates an outputstream to write to |
Method Summary | |
---|---|
protected int[][] |
createPointIndex(OMGraphicList list)
Calculates the content length for each record, in terms of words as defined by ESRI documentation. |
protected int[][] |
createPolyIndex(EsriGraphicList list)
Creates a two dimensional array holding a list of shape content lengths and shape content length offsets, as defined in Esri shape file documentation. |
protected int[] |
getPartOffsets(OMGraphicList sublist)
Creates an array whose elements specifies at what index a parts geometry begins |
protected int |
getPointsPerShape(OMGraphicList sublist)
Iterates through a list of shapes, summing the points per part to determine the number of points per shape |
protected int[] |
getRecordOffsets(int[] contentLengths)
Creates an array whose elements specify at what index a shapes geometry begins |
GeoCoordTransformation |
getTransform()
Get the transform being used on the coordinates of the EsriGraphics as they are written to the stream. |
void |
setTransform(GeoCoordTransformation transform)
Set the GeoCoordTransform for the stream, so that the EsriGraphics will have their coordinates transformed as they are written to the stream. |
protected void |
writeExtents(double[] extents)
|
int[][] |
writeGeometry(EsriGraphicList list)
Determine what type of list is given and write it out. |
int[][] |
writePointGeometry(EsriGraphicList list)
Writes point geometry to the class scope LittleEndianOutputStream. |
int[][] |
writePolyGeometry(EsriGraphicList list)
Writes polygon geometry to the class scope LittleEndianInputStream. |
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
public static final int ESRI_RECORD_HEADER_LENGTH
protected GeoCoordTransformation transform
Constructor Detail |
---|
public ShpOutputStream(java.io.OutputStream os)
os
- The output stream to write toMethod Detail |
---|
public GeoCoordTransformation getTransform()
public void setTransform(GeoCoordTransformation transform)
transform
- public int[][] writeGeometry(EsriGraphicList list) throws java.io.IOException
list
- The EsriGraphicList to write
java.io.IOException
protected int[][] createPointIndex(OMGraphicList list)
list
- The EsriGraphicList to write
protected int[][] createPolyIndex(EsriGraphicList list)
list
- The list from which to create the respective array
protected int[] getRecordOffsets(int[] contentLengths)
contentLengths
- The array for which to get offsets from
protected int[] getPartOffsets(OMGraphicList sublist)
sublist
- A list of shapes
protected int getPointsPerShape(OMGraphicList sublist)
sublist
- A list of shapes
protected void writeExtents(double[] extents) throws java.io.IOException
java.io.IOException
public int[][] writePolyGeometry(EsriGraphicList list) throws java.io.IOException
list
- The list of geometry objects to save
java.io.IOException
public int[][] writePointGeometry(EsriGraphicList list) throws java.io.IOException
list
- An EsriGraphicList of points
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |