read method

Geometry read(
  1. List<int> ins, {
  2. dynamic doSpatialite = false,
})

Reads a {@link Geometry} in binary WKB format from an {@link InStream}.

@param is the stream to read from @return the Geometry read @throws IOException if the underlying stream creates an error @throws ParseException if the WKB is ill-formed

Implementation

Geometry read(List<int> ins, {doSpatialite = false}) {
    var bytesList = ins;
    if (!(ins is Uint8List)) {
      bytesList = Uint8List.fromList(ins);
    }
    dis = ByteOrderDataInStream(bytesList);
    late Geometry g;
    if (!doSpatialite) {
      g = readGeometry();
    } else {
      g = readSpatialiteGeometry();
    }
    return g;
  }