/** * Parse a geometry starting at offset. * @param data ValueGetter for the data to be parsed * @return The resulting Geometry */ protected Geometry parseGeometry(ValueGetter data) { return parseGeometry(data, 0, false); }
/** Parse an Array of "full" Geometries */ private void parseGeometryArray(ValueGetter data, Geometry[] container, int srid) { for (int i = 0; i < container.length; i++) { container[i] = parseGeometry(data, srid, true); } }
/** * Parse a hex encoded geometry * @param value String containing the hex data to be parsed * @return the resulting parsed geometry */ public Geometry parse(String value) { StringByteGetter bytes = new ByteGetter.StringByteGetter(value); return parseGeometry(valueGetterForEndian(bytes)); }
/** * Parse a binary encoded geometry. * @param value byte array containing the binary encoded geometru * @return the resulting parsed geometry */ public Geometry parse(byte[] value) { BinaryByteGetter bytes = new ByteGetter.BinaryByteGetter(value); return parseGeometry(valueGetterForEndian(bytes)); }