Package ch.so.agi.filegdb.geometry
Class GeometryCodec
java.lang.Object
ch.so.agi.filegdb.geometry.GeometryCodec
Decodes Esri shape buffers as stored in file geodatabase geometry fields.
Ported from GDAL OpenFileGDB (filegdbtable.cpp,
FileGDBOGRGeometryConverterImpl::GetAsGeometry). The shape type constants match
ogrpgeogeometry.h, which is the header the GDAL driver compiles against. This codec
intentionally has no JTS or Hop dependency.
Curved segments are decoded without linearization. The fgdb table geometry type of a shape buffer is encoded in the upper bits of the leading varint.
-
Method Summary
Modifier and TypeMethodDescriptionstatic FileGdbGeometrydecode(byte[] buffer, GeometryFieldDefinition definition) static byte[]encode(FileGdbGeometry geometry, GeometryFieldDefinition definition) Encodes a geometry as an Esri shape buffer.
-
Method Details
-
decode
-
encode
Encodes a geometry as an Esri shape buffer.The Z and M flags of the geometry field definition decide the shape type and the presence of the Z and M arrays, mirroring GDAL's
EncodeGeometry().
-