gis-tools-ts - v0.6.0
    Preparing search index...

    Function shapefileFromGzip

    • Read a Shapefile from a Gzip folder.

      Assumes the input is an arraybuffer that is pointing to a collection of zip shapefile data.

      import { shapefileFromGzip, LambertConformalConic, EPSG_9974 } from 'gis-tools-ts';

      const reader = await shapefileFromGzip(arrayBufferInput, [LambertConformalConic], { EPSG_9974 });

      for await (const feature of reader) {
      console.log(feature);
      }

      Parameters

      • input: ArrayBufferLike

        raw buffer of gzipped data (folder of shp, dbf, prj, and/or cpg)

      • Optionaldefs: typeof ProjectionBase[]

        optional array of ProjectionTransformDefinitions to insert

      • OptionalepsgCodes: Record<string, string>

        a record of EPSG codes to use for the transformer if needed

      Returns Promise<ShapeFileReader<Record<string, unknown>, Properties, Properties>>

      • a Shapefile