Package org.geotools.data.postgis
Class TWKBReader
- Object
-
- TWKBReader
-
public class TWKBReader extends Object
Reads Tiny Well-known Binary (TWKB)into a JTS geometry.This class is designed to support reuse of a single instance to read multiple geometries. This * class is not thread-safe; each thread should create its own instance.
- Author:
- James Hughes, Andrea Aime
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classTWKBReader.TWKBMetadata
-
Field Summary
Fields Modifier and Type Field Description protected CoordinateSequenceFactorycsFactory
-
Constructor Summary
Constructors Constructor Description TWKBReader(GeometryFactory geometryFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Geometryread(byte[] bytes)Geometryread(InStream is)protected CoordinateSequencereadCoordinateSequence(int numPts, TWKBReader.TWKBMetadata metadata)protected doublereadNextDouble(double scale)
-
-
-
Field Detail
-
csFactory
protected CoordinateSequenceFactory csFactory
-
-
Constructor Detail
-
TWKBReader
public TWKBReader(GeometryFactory geometryFactory)
-
-
Method Detail
-
read
public Geometry read(byte[] bytes) throws ParseException, IOException
- Throws:
ParseExceptionIOException
-
read
public Geometry read(InStream is) throws IOException, ParseException
- Throws:
IOExceptionParseException
-
readCoordinateSequence
protected CoordinateSequence readCoordinateSequence(int numPts, TWKBReader.TWKBMetadata metadata) throws IOException
- Throws:
IOException
-
readNextDouble
protected double readNextDouble(double scale) throws IOException- Throws:
IOException
-
-