public static final class EWKBUtils.EWKBTarget extends GeometryUtils.Target
Constructor and Description |
---|
EWKBTarget(java.io.ByteArrayOutputStream output,
int dimensionSystem)
Creates a new EWKB output target.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addCoordinate(double x,
double y,
double z,
double m,
int index,
int total)
Invoked to add a coordinate to a geometry.
|
protected void |
init(int srid)
Initializes top-level target.
|
protected void |
startCollection(int type,
int numItems)
Invoked before writing of a collection.
|
protected GeometryUtils.Target |
startCollectionItem(int index,
int total)
Invoked before writing of a collection item.
|
protected void |
startLineString(int numPoints)
Invoked before writing a LINESTRING.
|
protected void |
startPoint()
Invoked before writing a POINT.
|
protected void |
startPolygon(int numInner,
int numPoints)
Invoked before writing a POLYGON.
|
protected void |
startPolygonInner(int numInner)
Invoked before writing an inner polygon in POLYGON.
|
dimensionSystem, endCollectionItem, endNonEmptyPolygon, endObject
public EWKBTarget(java.io.ByteArrayOutputStream output, int dimensionSystem)
output
- output streamdimensionSystem
- dimension system to useprotected void init(int srid)
GeometryUtils.Target
init
in class GeometryUtils.Target
srid
- SRIDprotected void startPoint()
GeometryUtils.Target
startPoint
in class GeometryUtils.Target
protected void startLineString(int numPoints)
GeometryUtils.Target
startLineString
in class GeometryUtils.Target
numPoints
- number of points in line stringprotected void startPolygon(int numInner, int numPoints)
GeometryUtils.Target
startPolygon
in class GeometryUtils.Target
numInner
- number of inner polygonsnumPoints
- number of points in outer polygonprotected void startPolygonInner(int numInner)
GeometryUtils.Target
startPolygonInner
in class GeometryUtils.Target
numInner
- number of points in inner polygonprotected void startCollection(int type, int numItems)
GeometryUtils.Target
startCollection
in class GeometryUtils.Target
type
- type of collection, one of
GeometryUtils.MULTI_POINT
,
GeometryUtils.MULTI_LINE_STRING
,
GeometryUtils.MULTI_POLYGON
,
GeometryUtils.GEOMETRY_COLLECTION
numItems
- number of items in this collectionprotected GeometryUtils.Target startCollectionItem(int index, int total)
GeometryUtils.Target
startCollectionItem
in class GeometryUtils.Target
index
- 0-based index of this item in the collectiontotal
- total number of items in the collectionprotected void addCoordinate(double x, double y, double z, double m, int index, int total)
GeometryUtils.Target
addCoordinate
in class GeometryUtils.Target
x
- X coordinatey
- Y coordinatez
- Z coordinate (NaN if not used)m
- M coordinate (NaN if not used)index
- 0-based index of coordinate in the current sequencetotal
- total number of coordinates in the current sequence