Class WKBReader
java.lang.Object
org.apache.sedona.common.S2Geography.WKBReader
This code is a custom modified version of JTS WKBReader
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
WKBReader
public WKBReader()Default constructor uses a JTS Array-based sequence factory. -
WKBReader
public WKBReader(org.locationtech.jts.geom.GeometryFactory geometryFactory)
-
-
Method Details
-
hexToBytes
Converts a hexadecimal string to a byte array. The hexadecimal digit symbols are case-insensitive.- Parameters:
hex- a string containing hex digits- Returns:
- an array of bytes with the value of the hex string
-
read
Reads a singleGeographyin WKB format from a byte array.- Parameters:
bytes- the byte array to read from- Returns:
- the geometry read
- Throws:
org.locationtech.jts.io.ParseException- if the WKB is ill-formed
-
read
public Geography read(org.locationtech.jts.io.InStream is) throws IOException, org.locationtech.jts.io.ParseException Reads aGeographyin binary WKB format from anInStream.- Parameters:
is- the stream to read from- Returns:
- the Geometry read
- Throws:
IOException- if the underlying stream creates an errororg.locationtech.jts.io.ParseException- if the WKB is ill-formed
-