Class TWKBWriter

    • Constructor Detail

      • TWKBWriter

        public TWKBWriter()
    • Method Detail

      • setXYPrecision

        public TWKBWriter setXYPrecision​(int xyprecision)
        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

        public TWKBWriter setEncodeZ​(boolean includeZDimension)
      • setEncodeM

        public TWKBWriter setEncodeM​(boolean includeMDimension)
      • setZPrecision

        public TWKBWriter setZPrecision​(int zprecision)
        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

        public TWKBWriter setMPrecision​(int mprecision)
        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

        public TWKBWriter setIncludeSize​(boolean includeSize)
        Whether the generated TWKB should include the size in bytes of the geometry.
      • setIncludeBbox

        public TWKBWriter setIncludeBbox​(boolean includeBbox)
        Whether the generated TWKB should include a Bounding Box for the geometry.
      • write

        public byte[] write​(Geometry geom)
      • write

        public void write​(Geometry geom,
                          java.io.OutputStream out)
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • write

        public void write​(Geometry geom,
                          java.io.DataOutput out)
                   throws java.io.IOException
        Throws:
        java.io.IOException