open method

Future<void> open()

Implementation

Future<void> open() async {
  randomAccessEnabled = shxChannel != null && shxChannel is FileReaderRandom;
  if (!onlyRandomAccess) {
    try {
      shxReader = IndexFile(shxChannel!);
      await shxReader!.open();
    } catch (e, s) {
      ShpLogger().e(
          "Could not open the .shx file, continuing "
          "assuming the .shp file is not sparse",
          s);
      currentShape = UNKNOWN;
    }
  }
  geometryFactory ??= GeometryFactory.defaultPrecision();
  await init(strict, geometryFactory!);
}