Package org.locationtech.jts.io.twkb
Class TWKBWriter
java.lang.Object
org.locationtech.jts.io.twkb.TWKBWriter
Writes
Geometry
s in TWKB (Tiny Well-known Binary) format.
The current TWKB specification is https://github.com/TWKB/Specification/blob/master/twkb.md.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionsetEncodeM
(boolean includeMDimension) setEncodeZ
(boolean includeZDimension) setIncludeBbox
(boolean includeBbox) Whether the generated TWKB should include a Bounding Box for the geometry.setIncludeSize
(boolean includeSize) Whether the generated TWKB should include the size in bytes of the geometry.setMPrecision
(int mprecision) Number of base-10 decimal places stored for M dimension.setXYPrecision
(int xyprecision) Number of base-10 decimal places stored for X and Y dimensions.setZPrecision
(int zprecision) Number of base-10 decimal places stored for Z dimension.byte[]
void
write
(Geometry geom, DataOutput out) void
write
(Geometry geom, OutputStream out)
-
Constructor Details
-
TWKBWriter
public TWKBWriter()
-
-
Method Details
-
setXYPrecision
Number of base-10 decimal places stored for X and Y dimensions.A positive retaining information to the right of the decimal place, negative rounding up to the left of the decimal place).
Defaults to
7
-
setEncodeZ
-
setEncodeM
-
setZPrecision
Number of base-10 decimal places stored for Z dimension.A positive retaining information to the right of the decimal place, negative rounding up to the left of the decimal place).
Defaults to
0
-
setMPrecision
Number of base-10 decimal places stored for M dimension.A positive retaining information to the right of the decimal place, negative rounding up to the left of the decimal place).
Defaults to
0
-
setIncludeSize
Whether the generated TWKB should include the size in bytes of the geometry. -
setIncludeBbox
Whether the generated TWKB should include a Bounding Box for the geometry. -
write
-
write
- Throws:
IOException
-
write
- Throws:
IOException
-