arup-group / genet

Manipulate MATSim networks via a Python API.
MIT License
43 stars 10 forks source link

The CLI's `generate-standard-outputs` command should support a choice of output formats #242

Open mfitz opened 2 weeks ago

mfitz commented 2 weeks ago

I recently needed to generate GeoJSON outputs from some MATSim inputs. I expected to be able to do this via the genet generate-standard-outputs CLI command, but that command can only generate parquet output. I had to resort to writing a small Python script that bypassed the CLI and used the API directly to call Network.generate_standard_outputs(), passing the filetype="geojson" parameter.

Although genet generate-standard-outputs ultimately calls the same generate_standard_outputs() method, it does not accept a file type parameter and so can only generate outputs in parquet. The CLI command should accept an optional filetype or format parameter with the same supported values (geojson, geoparquet and shp).