kiwi-postgis  Version 0.1.0.0
TWKBUtils Class Reference
Collaboration diagram for TWKBUtils:

Static Public Member Functions

static int zigZagEncode (final int value)
 
static int zigZagDecode (final int value)
 

Static Public Attributes

static final byte POINT_TYPE = 1
 
static final byte LINESTRING_TYPE = 2
 
static final byte POLYGON_TYPE = 3
 
static final byte MULTIPOINT_TYPE = 4
 
static final byte MULTILINESTRING_TYPE = 5
 
static final byte MULTIPOLYGON_TYPE = 6
 
static final byte GEOMETRYCOLLECTION_TYPE = 7
 
static final byte EXTENDED_DIMENSIONS = 1 << 3
 
static final byte EMPTY_GEOMETRY = 1 << 4
 
static final byte MAX_COORD_PRECISION = 7
 
static final byte MIN_COORD_PRECISION = -8
 
static final byte MAX_EXTENDED_PRECISION = 3
 
static final byte MIN_EXTENDED_PRECISION = -4
 

Member Function Documentation

◆ zigZagDecode()

static int zigZagDecode ( final int  value)
static

Referenced by TWKBReader.ExtendedPrecisionReader.ExtendedPrecisionReader(), and TWKBReader.read().

33  {
34  final int temp = (((value << 31) >> 31) ^ value) >> 1;
35  return temp ^ (value & (1 << 31));
36  }

◆ zigZagEncode()

static int zigZagEncode ( final int  value)
static

Referenced by TWKBWriter.getTypeAndPrecisionByte(), and TWKBWriter.ExtendedPrecisionWriter.writeExtendedPrecision().

29  {
30  return (value << 1) ^ (value >> 31);
31  }

Member Data Documentation

◆ EMPTY_GEOMETRY

◆ EXTENDED_DIMENSIONS

final byte EXTENDED_DIMENSIONS = 1 << 3
static

◆ GEOMETRYCOLLECTION_TYPE

final byte GEOMETRYCOLLECTION_TYPE = 7
static

◆ LINESTRING_TYPE

final byte LINESTRING_TYPE = 2
static

◆ MAX_COORD_PRECISION

final byte MAX_COORD_PRECISION = 7
static

Referenced by TWKBWriter.TWKBWriter().

◆ MAX_EXTENDED_PRECISION

final byte MAX_EXTENDED_PRECISION = 3
static

◆ MIN_COORD_PRECISION

final byte MIN_COORD_PRECISION = -8
static

◆ MIN_EXTENDED_PRECISION

final byte MIN_EXTENDED_PRECISION = -4
static

◆ MULTILINESTRING_TYPE

final byte MULTILINESTRING_TYPE = 5
static

◆ MULTIPOINT_TYPE

final byte MULTIPOINT_TYPE = 4
static

◆ MULTIPOLYGON_TYPE

final byte MULTIPOLYGON_TYPE = 6
static

◆ POINT_TYPE

final byte POINT_TYPE = 1
static

◆ POLYGON_TYPE

final byte POLYGON_TYPE = 3
static