Parse (Geo|S2)JSON. Can handle millions of features. Implements the FeatureIterator interface
import { JSONReader } from 'gis-tools-ts';import { FileReader } from 'gis-tools-ts/file';const reader = new JSONReader(new FileReader('./data.geojson'));// read the featuresfor await (const feature of reader) { console.log(feature);} Copy
import { JSONReader } from 'gis-tools-ts';import { FileReader } from 'gis-tools-ts/file';const reader = new JSONReader(new FileReader('./data.geojson'));// read the featuresfor await (const feature of reader) { console.log(feature);}
the input to parse from
Optional
the number of bytes to read at a time from the reader. [Default: 65_536]
Generator to iterate over each (Geo|S2)JSON object in the reader.
JSON Reader
Description
Parse (Geo|S2)JSON. Can handle millions of features. Implements the FeatureIterator interface
Usage