getLength method
Get the length of the given geometry Object in bytes not 16-bit words. This is easier to keep track of, since the ByteBuffer deals with bytes. Do not include the 8 bytes of record.
@param geometry The geometry to analyze. @return The number of bytes the shape will take up.
Implementation
@override
int getLength(dynamic geometry) {
int length;
if (shapeType == ShapeType.POINT) {
length = 20;
} else if (shapeType == ShapeType.POINTM) {
length = 28;
} else if (shapeType == ShapeType.POINTZ) {
length = 36;
} else {
throw StateError("Expected ShapeType of Point, got $shapeType");
}
return length;
}