BinaryWriter class
Create 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
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
estimateBytes(
Geometry geom) → int - Estimate how much bytes a geometry will need in WKB.
-
estimateCollection(
GeometryCollection geom) → int -
estimateGeometryArray(
List< Geometry> container) → int - Write an Array of "full" Geometries */
-
estimateLinearRing(
LinearRing geom) → int -
estimateLineString(
LineString geom) → int -
estimateMultiLineString(
MultiLineString geom) → int -
estimateMultiPoint(
MultiPoint geom) → int -
estimateMultiPolygon(
MultiPolygon geom) → int -
estimatePoint(
Coordinate c) → int -
estimatePointArray(
List< Coordinate> geom) → int - Write an Array of "slim" Points (without endianness and type, part of LinearRing and Linestring, but not MultiPoint!
-
estimatePolygon(
Polygon geom) → int -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
writeBinary(
Geometry geom) → List< int> -
writeBinaryWithEndian(
Geometry geom, int REP) → List< int> - Write a binary encoded geometry.
-
writeCollection(
GeometryCollection geom, ValueSetter dest) → void -
writeGeometry(
Geometry geom, ValueSetter dest) → void - Parse a geometry starting at offset. @param geom the geometry to write @param dest the value setting to be used for writing
-
writeGeometryArray(
List< Geometry> container, ValueSetter dest) → void - Write an Array of "full" Geometries */
-
writeHexed(
Geometry geom) → String -
writeHexedWithEndian(
Geometry geom, int REP) → String - Write a hex encoded geometry
-
writeLinearRing(
LinearRing geom, ValueSetter dest) → void -
writeLineString(
LineString geom, ValueSetter dest) → void -
writeMultiLineString(
MultiLineString geom, ValueSetter dest) → void -
writeMultiPoint(
MultiPoint geom, ValueSetter dest) → void -
writeMultiPolygon(
MultiPolygon geom, ValueSetter dest) → void -
writePoint(
Coordinate geom, ValueSetter dest) → void - Writes a "slim" Point (without endiannes, srid ant type, only the ordinates and measure. Used by writeGeometry as ell as writePointArray.
-
writePointArray(
List< Coordinate> geom, ValueSetter dest) → void - Write an Array of "slim" Points (without endianness, srid and type, part of LinearRing and Linestring, but not MultiPoint!
-
writePolygon(
Polygon geom, ValueSetter dest) → void
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
valueSetterForEndian(
ByteSetter bytes, int endian) → ValueSetter - Get the appropriate ValueGetter for my endianness