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

Polygonize: Write parquet compliant to fiboa with additional metadata #53 #57

Merged
merged 2 commits into from
Oct 31, 2024

Conversation

m-mohr
Copy link
Collaborator

@m-mohr m-mohr commented Oct 31, 2024

Closes #53 and #26

inference download/run:

  • Gets last timestamp from STAC Items, passes them through the TIFF files via TIFFTAG_DATETIME metadata.

inference polygonize:

  • Creates GeoParquet 1.1 files compliant to fiboa using fiboa CLI code.
  • Adds columns determination_datetime, determination_method, perimeter.
  • area was generally changed from m² to ha.
  • Other file formats are also "fiboa compliant" (with regards to the columns).

Drawback:

  • All other non-Parquet formats are also written in one chunk now, instead of writing them more memory efficient per window. Implementing two different ways of writing the files depending on the format would result in relatively complex code...

Example:
{E4EB1F27-12FC-4058-BD0E-52391069E1F5}

@m-mohr m-mohr requested review from cholmes and calebrob6 October 31, 2024 00:36
@m-mohr m-mohr linked an issue Oct 31, 2024 that may be closed by this pull request
Copy link
Member

@cholmes cholmes left a comment

Choose a reason for hiding this comment

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

Looks great! Works great! And man parquet (+brotli) output is so cool. It's like 9x smaller than gpkg / 7x smaller than fgb / 11x smaller than json. It was feeling weird that our vector output was 18 times larger than the raster inference output. With Fiboa/parquet it's pretty much the same (in my single test case with defaults + close interiors, I'm sure it varies)

I do think it could be good to give some nudge to people to use parquet/fiboa output. We could make the output file name not required and just use the input file name and change to parquet.

I was also wondering about fiboa json output - was there a reason you didn't do it?

We could put a warning or something when people pick non-fiboa outputs, to tell them that fiboa output is better for field boundaries.

Anyways, nothing more needed for this PR, it's a great step forward.

@m-mohr
Copy link
Collaborator Author

m-mohr commented Oct 31, 2024

I was also wondering about fiboa json output - was there a reason you didn't do it?

Honestly, I didn't think about it at 2am ;-)

Looking at it right now, I don't have an exported ready to use method in the fiboa CLI to export to JSON yet. Also, not sure about the replication of the determination fields before we add collection level metadata in fiboa 0.3. The JSON from GDAL should be mostly fiboa compliant anyway apart from the missing fiboa_* fields. Something we can add later though. Until then fiboa create-geojson is your friend :-)

I do think it could be good to give some nudge to people to use parquet/fiboa output. We could make the output file name not required and just use the input file name and change to parquet. [...]
We could put a warning or something when people pick non-fiboa outputs, to tell them that fiboa output is better for field boundaries.

Added :-)

@m-mohr m-mohr merged commit b767db7 into main Oct 31, 2024
1 check passed
@m-mohr m-mohr deleted the fiboa branch October 31, 2024 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Polygonize: Create fiboa compliant output include time information in the input raster format for inference
2 participants