I'm loving the ndjson-cli tools for working with newline-delimited GeoJSON files. But I can't seem to find a tool that converts a standard GeoJSON (whether minified or prettified) ond converts it to newline-delimited. Is there one?
Answer
I wrote a dedicated command-line tool on NPM to do this, now:
https://www.npmjs.com/package/geojson2ndjson
Usage
npm install -g geojson2ndjson
geojson2ndjson myfile.geojson | ...
Or read from standard input:
cat myfile.geojson | geojson2ndjson | ...
Examples
List the properties of every feature, without the geometries:
geojson2ndjson myfile.geojson | ndjson-map d.properties
No comments:
Post a Comment