org.gvsig.fmap.geom.operation.fromwkb
Class WKBParser2
java.lang.Object
org.gvsig.fmap.geom.operation.fromwkb.WKBParser2
public class WKBParser2
- extends Object
Parse binary representation of geometries. Currently, only text rep (hexed)
implementation is tested.
It should be easy to add char[] and CharSequence ByteGetter instances,
although the latter one is not compatible with older jdks.
I did not implement real unsigned 32-bit integers or emulate them with long,
as both java Arrays and Strings currently can have only 2^31-1 elements
(bytes), so we cannot even get or build Geometries with more than approx.
2^28 coordinates (8 bytes each).
- Author:
- markus.schaber@logi-track.com
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WKBParser2
public WKBParser2()
- Throws:
GeometryTypeNotValidException
GeometryTypeNotSupportedException
parse
public Geometry parse(byte[] value)
throws CreateGeometryException
- Parse a binary encoded geometry.
Is synchronized to protect offset counter. (Unfortunately, Java does not
have neither call by reference nor multiple return values.)
- Throws:
CreateGeometryException
parseTypeAndSRID
protected void parseTypeAndSRID(ByteBuffer data)
parseGeometry
protected Geometry parseGeometry(ByteBuffer data)
throws CreateGeometryException
- Parse a geometry starting at offset.
- Throws:
CreateGeometryException
Copyright © 2004-2012 gvSIG. All Rights Reserved.