Package mil.nga.sf.wkt
Class GeometryWriter
- java.lang.Object
-
- mil.nga.sf.wkt.GeometryWriter
-
public class GeometryWriter extends Object
Well Known Text writer- Author:
- osbornb
-
-
Constructor Summary
Constructors Constructor Description GeometryWriter()
ConstructorGeometryWriter(Writer writer)
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Close the string writerstatic String
getName(Geometry geometry)
Get the well-known text writable geometry nameWriter
getWriter()
Get the writerString
toString()
void
write(Geometry geometry)
Write a geometry to well-known textstatic void
writeCircularString(Writer writer, CircularString circularString)
Write a Circular Stringvoid
writeCircularString(CircularString circularString)
Write a Circular Stringstatic void
writeCompoundCurve(Writer writer, CompoundCurve compoundCurve)
Write a Compound Curvevoid
writeCompoundCurve(CompoundCurve compoundCurve)
Write a Compound Curvestatic void
writeCurvePolygon(Writer writer, CurvePolygon<?> curvePolygon)
Write a Curve Polygonvoid
writeCurvePolygon(CurvePolygon<?> curvePolygon)
Write a Curve Polygonstatic void
writeGeometry(Writer writer, Geometry geometry)
Write a geometry to well-known textstatic String
writeGeometry(Geometry geometry)
Write a geometry to a well-known text stringstatic void
writeGeometryCollection(Writer writer, GeometryCollection<?> geometryCollection)
Write a Geometry Collectionvoid
writeGeometryCollection(GeometryCollection<?> geometryCollection)
Write a Geometry Collectionstatic void
writeLineString(Writer writer, LineString lineString)
Read a Line Stringvoid
writeLineString(LineString lineString)
Read a Line Stringvoid
writeM(Point point)
Write a Point M valuestatic void
writeMultiLineString(Writer writer, MultiLineString multiLineString)
Write a Multi Line Stringvoid
writeMultiLineString(MultiLineString multiLineString)
Write a Multi Line Stringstatic void
writeMultiPoint(Writer writer, MultiPoint multiPoint)
Write a Multi Pointvoid
writeMultiPoint(MultiPoint multiPoint)
Write a Multi Pointstatic void
writeMultiPolygon(Writer writer, MultiPolygon multiPolygon)
Write a Multi Polygonvoid
writeMultiPolygon(MultiPolygon multiPolygon)
Write a Multi Polygonstatic void
writePoint(Writer writer, Point point)
Write a Pointvoid
writePoint(Point point)
Write a Pointstatic void
writePointText(Writer writer, Point point)
Write a Pointvoid
writePointText(Point point)
Write a Pointstatic void
writePolygon(Writer writer, Polygon polygon)
Write a Polygonvoid
writePolygon(Polygon polygon)
Write a Polygonstatic void
writePolyhedralSurface(Writer writer, PolyhedralSurface polyhedralSurface)
Write a Polyhedral Surfacevoid
writePolyhedralSurface(PolyhedralSurface polyhedralSurface)
Write a Polyhedral Surfacestatic void
writeTIN(Writer writer, TIN tin)
Write a TINvoid
writeTIN(TIN tin)
Write a TINstatic void
writeTriangle(Writer writer, Triangle triangle)
Write a Trianglevoid
writeTriangle(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:
- 1.0.1
-
GeometryWriter
public GeometryWriter(Writer writer)
Constructor- Parameters:
writer
- writer- Since:
- 1.0.1
-
-
Method Detail
-
writeGeometry
public static String writeGeometry(Geometry geometry) throws IOException
Write a geometry to a well-known text string- Parameters:
geometry
- geometry- Returns:
- well-known text string
- Throws:
IOException
- upon failure to write
-
getWriter
public Writer getWriter()
Get the writer- Returns:
- writer
- Since:
- 1.0.1
-
close
public void close() throws IOException
Close the string writer- Throws:
IOException
- upon failure to close- Since:
- 1.0.1
-
write
public void write(Geometry geometry) throws IOException
Write a geometry to well-known text- Parameters:
geometry
- geometry- Throws:
IOException
- upon failure to write- Since:
- 1.0.1
-
getName
public static String getName(Geometry geometry)
Get the well-known text writable geometry name- Parameters:
geometry
- geometry- Returns:
- geometry name
-
writePointText
public void writePointText(Point point) throws IOException
Write a Point- Parameters:
point
- point- Throws:
IOException
- upon failure to read- Since:
- 1.0.1
-
writePoint
public void writePoint(Point point) throws IOException
Write a Point- Parameters:
point
- point- Throws:
IOException
- upon failure to read- Since:
- 1.0.1
-
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:
- 1.0.1
-
writeZ
public void writeZ(Point point) throws IOException
Write a Point Z value- Parameters:
point
- point- Throws:
IOException
- upon failure to write- Since:
- 1.0.1
-
writeM
public void writeM(Point point) throws IOException
Write a Point M value- Parameters:
point
- point- Throws:
IOException
- upon failure to write- Since:
- 1.0.1
-
writeLineString
public void writeLineString(LineString lineString) throws IOException
Read a Line String- Parameters:
lineString
- line string- Throws:
IOException
- upon failure to read- Since:
- 1.0.1
-
writePolygon
public void writePolygon(Polygon polygon) throws IOException
Write a Polygon- Parameters:
polygon
- Polygon- Throws:
IOException
- upon failure to write- Since:
- 1.0.1
-
writeMultiPoint
public void writeMultiPoint(MultiPoint multiPoint) throws IOException
Write a Multi Point- Parameters:
multiPoint
- multi point- Throws:
IOException
- upon failure to read- Since:
- 1.0.1
-
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:
- 1.0.1
-
writeMultiPolygon
public void writeMultiPolygon(MultiPolygon multiPolygon) throws IOException
Write a Multi Polygon- Parameters:
multiPolygon
- Multi Polygon- Throws:
IOException
- upon failure to write- Since:
- 1.0.1
-
writeGeometryCollection
public void writeGeometryCollection(GeometryCollection<?> geometryCollection) throws IOException
Write a Geometry Collection- Parameters:
geometryCollection
- Geometry Collection- Throws:
IOException
- upon failure to write- Since:
- 1.0.1
-
writeCircularString
public void writeCircularString(CircularString circularString) throws IOException
Write a Circular String- Parameters:
circularString
- Circular String- Throws:
IOException
- upon failure to write- Since:
- 1.0.1
-
writeCompoundCurve
public void writeCompoundCurve(CompoundCurve compoundCurve) throws IOException
Write a Compound Curve- Parameters:
compoundCurve
- Compound Curve- Throws:
IOException
- upon failure to write- Since:
- 1.0.1
-
writeCurvePolygon
public void writeCurvePolygon(CurvePolygon<?> curvePolygon) throws IOException
Write a Curve Polygon- Parameters:
curvePolygon
- Curve Polygon- Throws:
IOException
- upon failure to write- Since:
- 1.0.1
-
writePolyhedralSurface
public void writePolyhedralSurface(PolyhedralSurface polyhedralSurface) throws IOException
Write a Polyhedral Surface- Parameters:
polyhedralSurface
- Polyhedral Surface- Throws:
IOException
- upon failure to write- Since:
- 1.0.1
-
writeTIN
public void writeTIN(TIN tin) throws IOException
Write a TIN- Parameters:
tin
- TIN- Throws:
IOException
- upon failure to write- Since:
- 1.0.1
-
writeTriangle
public void writeTriangle(Triangle triangle) throws IOException
Write a Triangle- Parameters:
triangle
- Triangle- Throws:
IOException
- upon failure to write- Since:
- 1.0.1
-
writeGeometry
public static void writeGeometry(Writer writer, Geometry geometry) throws IOException
Write a geometry to well-known text- Parameters:
writer
- writergeometry
- geometry- Throws:
IOException
- upon failure to write
-
writePointText
public static void writePointText(Writer writer, Point point) throws IOException
Write a Point- Parameters:
writer
- writerpoint
- point- Throws:
IOException
- upon failure to read
-
writePoint
public static void writePoint(Writer writer, Point point) throws IOException
Write a Point- Parameters:
writer
- writerpoint
- point- Throws:
IOException
- upon failure to read
-
writeLineString
public static void writeLineString(Writer writer, LineString lineString) throws IOException
Read a Line String- Parameters:
writer
- writerlineString
- line string- Throws:
IOException
- upon failure to read
-
writePolygon
public static void writePolygon(Writer writer, Polygon polygon) throws IOException
Write a Polygon- Parameters:
writer
- writerpolygon
- Polygon- Throws:
IOException
- upon failure to write
-
writeMultiPoint
public static void writeMultiPoint(Writer writer, MultiPoint multiPoint) throws IOException
Write a Multi Point- Parameters:
writer
- writermultiPoint
- multi point- Throws:
IOException
- upon failure to read
-
writeMultiLineString
public static void writeMultiLineString(Writer writer, MultiLineString multiLineString) throws IOException
Write a Multi Line String- Parameters:
writer
- writermultiLineString
- Multi Line String- Throws:
IOException
- upon failure to write
-
writeMultiPolygon
public static void writeMultiPolygon(Writer writer, MultiPolygon multiPolygon) throws IOException
Write a Multi Polygon- Parameters:
writer
- writermultiPolygon
- Multi Polygon- Throws:
IOException
- upon failure to write
-
writeGeometryCollection
public static void writeGeometryCollection(Writer writer, GeometryCollection<?> geometryCollection) throws IOException
Write a Geometry Collection- Parameters:
writer
- writergeometryCollection
- Geometry Collection- Throws:
IOException
- upon failure to write
-
writeCircularString
public static void writeCircularString(Writer writer, CircularString circularString) throws IOException
Write a Circular String- Parameters:
writer
- writercircularString
- Circular String- Throws:
IOException
- upon failure to write
-
writeCompoundCurve
public static void writeCompoundCurve(Writer writer, CompoundCurve compoundCurve) throws IOException
Write a Compound Curve- Parameters:
writer
- writercompoundCurve
- Compound Curve- Throws:
IOException
- upon failure to write
-
writeCurvePolygon
public static void writeCurvePolygon(Writer writer, CurvePolygon<?> curvePolygon) throws IOException
Write a Curve Polygon- Parameters:
writer
- writercurvePolygon
- Curve Polygon- Throws:
IOException
- upon failure to write
-
writePolyhedralSurface
public static void writePolyhedralSurface(Writer writer, PolyhedralSurface polyhedralSurface) throws IOException
Write a Polyhedral Surface- Parameters:
writer
- writerpolyhedralSurface
- Polyhedral Surface- Throws:
IOException
- upon failure to write
-
writeTIN
public static void writeTIN(Writer writer, TIN tin) throws IOException
Write a TIN- Parameters:
writer
- writertin
- TIN- Throws:
IOException
- upon failure to write
-
writeTriangle
public static void writeTriangle(Writer writer, Triangle triangle) throws IOException
Write a Triangle- Parameters:
writer
- writertriangle
- Triangle- Throws:
IOException
- upon failure to write
-
-