geojson-network-node-snap
Snap line ends to nearest network node
npm install geojson-network-node-snap --save
const snapNearby = ;const fs = promises; ; { // load and parse GeoJSON LineString dataset const geo_raw = await fs; const geo = JSON; // max km distance to look for a node to snap to const km = 005; // perform operation const newGeo = ; // save new geojson to file await fs;
See blog post Cleaning a GeoJSON Network for more information.