Skip to content

Add fiboa improve command #79 #21 #114

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

Merged
merged 9 commits into from
Nov 15, 2024
Merged

Add fiboa improve command #79 #21 #114

merged 9 commits into from
Nov 15, 2024

Conversation

m-mohr
Copy link
Contributor

@m-mohr m-mohr commented Nov 13, 2024

Implements #21, #79 and #113

Needed to do various of these operations anyway for the fiboaGPT demo, so went ahead and directly wrote it as code. No tests yet.


Various "improvements" can be applied to a fiboa GeoParquet file.
The commands allows to

  • change the CRS (--crs)
  • change the GeoParquet version (-gp1) and compression (-pc)
  • add/fill missing perimeter/area values (-sz)
  • fix invalid geometries (-g)
  • rename columns (-r)

Example:

  • fiboa improve file.parquet -o file2.parquet -g -sz -r old=new -pc zstd

Check fiboa improve --help for more details.


This also implements a way to pass through custom schemas as we define them through MISSING_SCHEMAS in the converters. The schemas can then also be used for validation and will be passed through the merge/improve commands. This also results in less warnings writing the Parquet files etc.

Copy link
Collaborator

@ivorbosloper ivorbosloper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@m-mohr
Copy link
Contributor Author

m-mohr commented Nov 14, 2024

Todo: Depending on #119, make changes here and in converters accordingly. Maybe also add an option for explode_multipolygons.

@m-mohr m-mohr merged commit 498a41f into main Nov 15, 2024
2 checks passed
@m-mohr m-mohr deleted the improve-cmd branch November 15, 2024 14:01
@m-mohr m-mohr linked an issue Nov 15, 2024 that may be closed by this pull request
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
Status: Done
2 participants