Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--clip option #33

Open
russbiggs opened this issue Sep 6, 2023 · 1 comment
Open

--clip option #33

russbiggs opened this issue Sep 6, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@russbiggs
Copy link
Member

russbiggs commented Sep 6, 2023

As a higher level feature atop the --bbox option an option to pass a GeoJSON polygon or multi-polygon could save users a number of steps to define a bounding box. The proposed flow would be as follows:

  • --clip takes a path to a geojson file on the user's system e.g. --clip ./abq_bounds.geojson
  • openaq-cli will open the file and parse the GeoJSON (validating that it is in fact a polygon or multipolygon)
  • the tool would calculate a bounding box
  • pass the bounding box to the API via the client

Additionally, after receiving the results the CLI could clip the result set to the input polygon. An optional --no-clip could also be included to bypass the final clipping, making geojson a shortcut to generating a bounding box only.

@russbiggs russbiggs added the enhancement New feature or request label Sep 6, 2023
@russbiggs
Copy link
Member Author

russbiggs commented Sep 19, 2023

I'm now leaning more to the option name --clip after reviewing a couple other CLIs with similar functionality this seems a bit more standard. It will also have the advantage of eventually allowing multiple file types, not just GeoJSON.

Instead of the --no-clip option i think we should instead overload the --bbox to allow GeoJSON polygon input.

@russbiggs russbiggs changed the title --geojson option --clip option Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant