public class TWKBWriter extends Object
Geometrys in TWKB (Tiny Well-known Binary) format.
The current TWKB specification is https://github.com/TWKB/Specification/blob/master/twkb.md.
| Constructor and Description |
|---|
TWKBWriter() |
| Modifier and Type | Method and Description |
|---|---|
TWKBWriter |
setEncodeM(boolean includeMDimension) |
TWKBWriter |
setEncodeZ(boolean includeZDimension) |
TWKBWriter |
setIncludeBbox(boolean includeBbox)
Whether the generated TWKB should include a Bounding Box for the geometry.
|
TWKBWriter |
setIncludeSize(boolean includeSize)
Whether the generated TWKB should include the size in bytes of the geometry.
|
TWKBWriter |
setMPrecision(int mprecision)
Number of base-10 decimal places stored for M dimension.
|
TWKBWriter |
setXYPrecision(int xyprecision)
Number of base-10 decimal places stored for X and Y dimensions.
|
TWKBWriter |
setZPrecision(int zprecision)
Number of base-10 decimal places stored for Z dimension.
|
byte[] |
write(org.locationtech.jts.geom.Geometry geom) |
void |
write(org.locationtech.jts.geom.Geometry geom,
DataOutput out) |
void |
write(org.locationtech.jts.geom.Geometry geom,
OutputStream out) |
public TWKBWriter setXYPrecision(int xyprecision)
A positive retaining information to the right of the decimal place, negative rounding up to the left of the decimal place).
Defaults to 7
public TWKBWriter setEncodeZ(boolean includeZDimension)
public TWKBWriter setEncodeM(boolean includeMDimension)
public TWKBWriter setZPrecision(int zprecision)
A positive retaining information to the right of the decimal place, negative rounding up to the left of the decimal place).
Defaults to 0
public TWKBWriter setMPrecision(int mprecision)
A positive retaining information to the right of the decimal place, negative rounding up to the left of the decimal place).
Defaults to 0
public TWKBWriter setIncludeSize(boolean includeSize)
public TWKBWriter setIncludeBbox(boolean includeBbox)
public byte[] write(org.locationtech.jts.geom.Geometry geom)
public void write(org.locationtech.jts.geom.Geometry geom,
OutputStream out)
throws IOException
IOExceptionpublic void write(org.locationtech.jts.geom.Geometry geom,
DataOutput out)
throws IOException
IOExceptionCopyright © 2022. All rights reserved.