Skip to content

fix: keep type on flat item #736

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 2 commits into from
May 15, 2025
Merged

fix: keep type on flat item #736

merged 2 commits into from
May 15, 2025

Conversation

gadomski
Copy link
Member

@gadomski gadomski commented May 15, 2025

Though the spec recommends dropping it, I'd like to keep it for now:

  • There's already at least one other probably-identical string field in the file (stac_version) so if we're trying to optimize on size we could play with metadata more to cut more columns
  • Naïve geoparquet readers are more likely to be able to reconstruct valid STAC items if all the required fields are present ... without type, you really have to know what you're doing
  • In our case, when we search stac-geoparquet we don't assume that we're returning valid STAC items, because the fields extension can be used to strip away required fields. Because of that, a direct conversion from stac-geoparquet to JSON will not "rehydrate" the type field. We could add logic to search to do this "rehydration", but it seemed simpler and not super-high-consequence to just keep the column

cc @hrodmn

@gadomski gadomski enabled auto-merge (squash) May 15, 2025 12:27
@gadomski gadomski merged commit 46d6642 into main May 15, 2025
11 checks passed
@gadomski gadomski deleted the keep-type-on-flat-item branch May 15, 2025 12:41
@fwfichtner
Copy link

fwfichtner commented Jun 4, 2025

Thanks for adding this @gadomski. We recently changed from stac-geoparquet to create parquet to be used in stac-fastapi-geoparquet to rustac-py and with type missing the API is not valid anymore and cannot be searched.

@gadomski
Copy link
Member Author

gadomski commented Jun 4, 2025

FYSA a PR to fix over at stac-geoparquet is here: stac-utils/stac-geoparquet#105, though it's not merged yet.

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.

2 participants