Package mil.nga.sf.wkb
Class GeometryWriter
- java.lang.Object
-
- mil.nga.sf.wkb.GeometryWriter
-
public class GeometryWriter extends Object
Well Known Binary writer- Author:
- osbornb
-
-
Constructor Summary
Constructors Constructor Description GeometryWriter()
ConstructorGeometryWriter(ByteOrder byteOrder)
ConstructorGeometryWriter(ByteWriter writer)
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Close the byte writerbyte[]
getBytes()
Get the written bytesByteWriter
getByteWriter()
Get the byte writervoid
write(Geometry geometry)
Write a geometry to the byte writervoid
writeCircularString(CircularString circularString)
Write a Circular Stringstatic void
writeCircularString(ByteWriter writer, CircularString circularString)
Write a Circular Stringvoid
writeCompoundCurve(CompoundCurve compoundCurve)
Write a Compound Curvestatic void
writeCompoundCurve(ByteWriter writer, CompoundCurve compoundCurve)
Write a Compound Curvevoid
writeCurvePolygon(CurvePolygon<?> curvePolygon)
Write a Curve Polygonstatic void
writeCurvePolygon(ByteWriter writer, CurvePolygon<?> curvePolygon)
Write a Curve Polygonstatic byte[]
writeGeometry(Geometry geometry)
Write a geometry to a well-known bytesstatic byte[]
writeGeometry(Geometry geometry, ByteOrder byteOrder)
Write a geometry to a well-known bytesstatic void
writeGeometry(ByteWriter writer, Geometry geometry)
Write a geometry to the byte writervoid
writeGeometryCollection(GeometryCollection<?> geometryCollection)
Write a Geometry Collectionstatic void
writeGeometryCollection(ByteWriter writer, GeometryCollection<?> geometryCollection)
Write a Geometry Collectionvoid
writeLineString(LineString lineString)
Write a Line Stringstatic void
writeLineString(ByteWriter writer, LineString lineString)
Write a Line Stringvoid
writeM(Point point)
Write a Point M valuevoid
writeMultiLineString(MultiLineString multiLineString)
Write a Multi Line Stringstatic void
writeMultiLineString(ByteWriter writer, MultiLineString multiLineString)
Write a Multi Line Stringvoid
writeMultiPoint(MultiPoint multiPoint)
Write a Multi Pointstatic void
writeMultiPoint(ByteWriter writer, MultiPoint multiPoint)
Write a Multi Pointvoid
writeMultiPolygon(MultiPolygon multiPolygon)
Write a Multi Polygonstatic void
writeMultiPolygon(ByteWriter writer, MultiPolygon multiPolygon)
Write a Multi Polygonvoid
writePoint(Point point)
Write a Pointstatic void
writePoint(ByteWriter writer, Point point)
Write a Pointvoid
writePolygon(Polygon polygon)
Write a Polygonstatic void
writePolygon(ByteWriter writer, Polygon polygon)
Write a Polygonvoid
writePolyhedralSurface(PolyhedralSurface polyhedralSurface)
Write a Polyhedral Surfacestatic void
writePolyhedralSurface(ByteWriter writer, PolyhedralSurface polyhedralSurface)
Write a Polyhedral Surfacevoid
writeTIN(TIN tin)
Write a TINstatic void
writeTIN(ByteWriter writer, TIN tin)
Write a TINvoid
writeTriangle(Triangle triangle)
Write a Trianglestatic void
writeTriangle(ByteWriter writer, Triangle triangle)
Write a Trianglevoid
writeXY(Point point)
Write a Point X and Y valuevoid
writeZ(Point point)
Write a Point Z value
-
-
-
Constructor Detail
-
GeometryWriter
public GeometryWriter()
Constructor- Since:
- 2.0.4
-
GeometryWriter
public GeometryWriter(ByteOrder byteOrder)
Constructor- Parameters:
byteOrder
- byte order- Since:
- 2.0.4
-
GeometryWriter
public GeometryWriter(ByteWriter writer)
Constructor- Parameters:
writer
- byte writer- Since:
- 2.0.4
-
-
Method Detail
-
writeGeometry
public static byte[] writeGeometry(Geometry geometry) throws IOException
Write a geometry to a well-known bytes- Parameters:
geometry
- geometry- Returns:
- well-known bytes
- Throws:
IOException
- upon failure to write- Since:
- 2.0.3
-
writeGeometry
public static byte[] writeGeometry(Geometry geometry, ByteOrder byteOrder) throws IOException
Write a geometry to a well-known bytes- Parameters:
geometry
- geometrybyteOrder
- byte order- Returns:
- well-known bytes
- Throws:
IOException
- upon failure to write- Since:
- 2.0.3
-
getByteWriter
public ByteWriter getByteWriter()
Get the byte writer- Returns:
- byte writer
- Since:
- 2.0.4
-
getBytes
public byte[] getBytes()
Get the written bytes- Returns:
- written bytes
- Since:
- 2.0.4
-
close
public void close()
Close the byte writer- Since:
- 2.0.4
-
write
public void write(Geometry geometry) throws IOException
Write a geometry to the byte writer- Parameters:
geometry
- geometry- Throws:
IOException
- upon failure to write- Since:
- 2.0.4
-
writePoint
public void writePoint(Point point) throws IOException
Write a Point- Parameters:
point
- point- Throws:
IOException
- upon failure to write- Since:
- 2.0.4
-
writeXY
public void writeXY(Point point) throws IOException
Write a Point X and Y value- Parameters:
point
- point- Throws:
IOException
- upon failure to write- Since:
- 2.0.4
-
writeZ
public void writeZ(Point point) throws IOException
Write a Point Z value- Parameters:
point
- point- Throws:
IOException
- upon failure to write- Since:
- 2.0.4
-
writeM
public void writeM(Point point) throws IOException
Write a Point M value- Parameters:
point
- point- Throws:
IOException
- upon failure to write- Since:
- 2.0.4
-
writeLineString
public void writeLineString(LineString lineString) throws IOException
Write a Line String- Parameters:
lineString
- Line String- Throws:
IOException
- upon failure to write- Since:
- 2.0.4
-
writePolygon
public void writePolygon(Polygon polygon) throws IOException
Write a Polygon- Parameters:
polygon
- Polygon- Throws:
IOException
- upon failure to write- Since:
- 2.0.4
-
writeMultiPoint
public void writeMultiPoint(MultiPoint multiPoint) throws IOException
Write a Multi Point- Parameters:
multiPoint
- Multi Point- Throws:
IOException
- upon failure to write- Since:
- 2.0.4
-
writeMultiLineString
public void writeMultiLineString(MultiLineString multiLineString) throws IOException
Write a Multi Line String- Parameters:
multiLineString
- Multi Line String- Throws:
IOException
- upon failure to write- Since:
- 2.0.4
-
writeMultiPolygon
public void writeMultiPolygon(MultiPolygon multiPolygon) throws IOException
Write a Multi Polygon- Parameters:
multiPolygon
- Multi Polygon- Throws:
IOException
- upon failure to write- Since:
- 2.0.4
-
writeGeometryCollection
public void writeGeometryCollection(GeometryCollection<?> geometryCollection) throws IOException
Write a Geometry Collection- Parameters:
geometryCollection
- Geometry Collection- Throws:
IOException
- upon failure to write- Since:
- 2.0.4
-
writeCircularString
public void writeCircularString(CircularString circularString) throws IOException
Write a Circular String- Parameters:
circularString
- Circular String- Throws:
IOException
- upon failure to write- Since:
- 2.0.4
-
writeCompoundCurve
public void writeCompoundCurve(CompoundCurve compoundCurve) throws IOException
Write a Compound Curve- Parameters:
compoundCurve
- Compound Curve- Throws:
IOException
- upon failure to write- Since:
- 2.0.4
-
writeCurvePolygon
public void writeCurvePolygon(CurvePolygon<?> curvePolygon) throws IOException
Write a Curve Polygon- Parameters:
curvePolygon
- Curve Polygon- Throws:
IOException
- upon failure to write- Since:
- 2.0.4
-
writePolyhedralSurface
public void writePolyhedralSurface(PolyhedralSurface polyhedralSurface) throws IOException
Write a Polyhedral Surface- Parameters:
polyhedralSurface
- Polyhedral Surface- Throws:
IOException
- upon failure to write- Since:
- 2.0.4
-
writeTIN
public void writeTIN(TIN tin) throws IOException
Write a TIN- Parameters:
tin
- TIN- Throws:
IOException
- upon failure to write- Since:
- 2.0.4
-
writeTriangle
public void writeTriangle(Triangle triangle) throws IOException
Write a Triangle- Parameters:
triangle
- Triangle- Throws:
IOException
- upon failure to write- Since:
- 2.0.4
-
writeGeometry
public static void writeGeometry(ByteWriter writer, Geometry geometry) throws IOException
Write a geometry to the byte writer- Parameters:
writer
- byte writergeometry
- geometry- Throws:
IOException
- upon failure to write
-
writePoint
public static void writePoint(ByteWriter writer, Point point) throws IOException
Write a Point- Parameters:
writer
- byte writerpoint
- point- Throws:
IOException
- upon failure to write
-
writeLineString
public static void writeLineString(ByteWriter writer, LineString lineString) throws IOException
Write a Line String- Parameters:
writer
- byte writerlineString
- Line String- Throws:
IOException
- upon failure to write
-
writePolygon
public static void writePolygon(ByteWriter writer, Polygon polygon) throws IOException
Write a Polygon- Parameters:
writer
- byte writerpolygon
- Polygon- Throws:
IOException
- upon failure to write
-
writeMultiPoint
public static void writeMultiPoint(ByteWriter writer, MultiPoint multiPoint) throws IOException
Write a Multi Point- Parameters:
writer
- byte writermultiPoint
- Multi Point- Throws:
IOException
- upon failure to write
-
writeMultiLineString
public static void writeMultiLineString(ByteWriter writer, MultiLineString multiLineString) throws IOException
Write a Multi Line String- Parameters:
writer
- byte writermultiLineString
- Multi Line String- Throws:
IOException
- upon failure to write
-
writeMultiPolygon
public static void writeMultiPolygon(ByteWriter writer, MultiPolygon multiPolygon) throws IOException
Write a Multi Polygon- Parameters:
writer
- byte writermultiPolygon
- Multi Polygon- Throws:
IOException
- upon failure to write
-
writeGeometryCollection
public static void writeGeometryCollection(ByteWriter writer, GeometryCollection<?> geometryCollection) throws IOException
Write a Geometry Collection- Parameters:
writer
- byte writergeometryCollection
- Geometry Collection- Throws:
IOException
- upon failure to write
-
writeCircularString
public static void writeCircularString(ByteWriter writer, CircularString circularString) throws IOException
Write a Circular String- Parameters:
writer
- byte writercircularString
- Circular String- Throws:
IOException
- upon failure to write
-
writeCompoundCurve
public static void writeCompoundCurve(ByteWriter writer, CompoundCurve compoundCurve) throws IOException
Write a Compound Curve- Parameters:
writer
- byte writercompoundCurve
- Compound Curve- Throws:
IOException
- upon failure to write
-
writeCurvePolygon
public static void writeCurvePolygon(ByteWriter writer, CurvePolygon<?> curvePolygon) throws IOException
Write a Curve Polygon- Parameters:
writer
- byte writercurvePolygon
- Curve Polygon- Throws:
IOException
- upon failure to write
-
writePolyhedralSurface
public static void writePolyhedralSurface(ByteWriter writer, PolyhedralSurface polyhedralSurface) throws IOException
Write a Polyhedral Surface- Parameters:
writer
- byte writerpolyhedralSurface
- Polyhedral Surface- Throws:
IOException
- upon failure to write
-
writeTIN
public static void writeTIN(ByteWriter writer, TIN tin) throws IOException
Write a TIN- Parameters:
writer
- byte writertin
- TIN- Throws:
IOException
- upon failure to write
-
writeTriangle
public static void writeTriangle(ByteWriter writer, Triangle triangle) throws IOException
Write a Triangle- Parameters:
writer
- byte writertriangle
- Triangle- Throws:
IOException
- upon failure to write
-
-