Given a path to where all the shapefile relevant files exist, build a Shapefile
Assumes the input is pointing to a shapefile or name without the extension. The algorithm will find the rest of the paths if they exist. May also be a gzipped folder.
import { LambertConformalConic, EPSG_9974 } from 'gis-tools-ts';import { shapefileFromPath } from 'gis-tools-ts/mmap';const reader = await shapefileFromPath('path/to/files', [LambertConformalConic], { EPSG_9974 });for await (const feature of reader) { console.log(feature);} Copy
import { LambertConformalConic, EPSG_9974 } from 'gis-tools-ts';import { shapefileFromPath } from 'gis-tools-ts/mmap';const reader = await shapefileFromPath('path/to/files', [LambertConformalConic], { EPSG_9974 });for await (const feature of reader) { console.log(feature);}
the path to the .shp file or name without the extension
Build a Shapefile from an input path
Description
Given a path to where all the shapefile relevant files exist, build a Shapefile
Assumes the input is pointing to a shapefile or name without the extension. The algorithm will find the rest of the paths if they exist. May also be a gzipped folder.
Usage