public class ShpOutputStream
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
ShpOutputStream(java.io.OutputStream os)
Creates an outputstream to write to
|
Modifier and Type | Method and Description |
---|---|
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.
|
public static java.util.logging.Logger logger
public static final int ESRI_RECORD_HEADER_LENGTH
protected GeoCoordTransformation transform
public ShpOutputStream(java.io.OutputStream os)
os
- The output stream to write topublic GeoCoordTransformation getTransform()
public void setTransform(GeoCoordTransformation transform)
transform
- public int[][] writeGeometry(EsriGraphicList list) throws java.io.IOException
list
- The EsriGraphicList to writejava.io.IOException
protected int[][] createPointIndex(OMGraphicList list)
list
- The EsriGraphicList to writeprotected int[][] createPolyIndex(EsriGraphicList list)
list
- The list from which to create the respective arrayprotected int[] getRecordOffsets(int[] contentLengths)
contentLengths
- The array for which to get offsets fromprotected int[] getPartOffsets(OMGraphicList sublist)
sublist
- A list of shapesprotected int getPointsPerShape(OMGraphicList sublist)
sublist
- A list of shapesprotected 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 savejava.io.IOException
public int[][] writePointGeometry(EsriGraphicList list) throws java.io.IOException
list
- An EsriGraphicList of pointsjava.io.IOException
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details