georust / geozero

Zero-Copy reading and writing of geospatial data.
Apache License 2.0
336 stars 33 forks source link

Formatted geojson writer #44

Open michaelkirk opened 2 years ago

michaelkirk commented 2 years ago

I sometimes find myself wanting formatted geojson, like what is output by serde_json::to_string_pretty.

Currently, I reach for an external tool to solve this, which is fine, but I think it'd be nice if geozero could handle this.

I'm imagining something like:

geozero --csv-geometry-column=geometry my_input.csv --geojson-pretty-output my_output.geojson
pka commented 1 year ago

Currently writers are free in their output options. So the GeoJsonWriter can be extended with a pretty flag. For a common flag for text based outputs we would probably need an output trait.