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

feat: Bring back GDAL and cli create-item #568

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

alekzvik
Copy link
Contributor

@alekzvik alekzvik commented Dec 14, 2024

This is WIP, PR for visibility, and hopefully early feedback on questionable design choices.

Related to

#442

Description

I am bringing back GDAL because every geospatial library deserves GDAL as a dependency.

I am bringing back changes that were here before. Here is what is new:

  • stac-gdal is now a crate
  • stac-gdal::update_item can update your item's raster & proj extensions from the assets
  • stac-gdal::ProjectionCalculations implements GDAL-based bounds calculations in WGS84 for Projections
  • stac-gdal will try to use /vsicurl/ when reading your dataset
  • CLI has a command create-item to create an Item from a href to an Asset
  • stac::Bbox can be made from [f64;4] & [f64;6]
  • Asset now has a "silent" field extensions and has an implementation of Extensions trait

Questionable decisions:

  • Add silent extensions field to stac::Asset. The field is ignored by serde. It's not the greatest design, but saves a lot in ergonomics. Alternatively, I can try to implement the Extensions trait for Asset, but I am unsure about extensions_mut() and how to "mimic" it. As always, I'd appreciate any pointers here.
  • Do we need a GDAL feature for the CLI?

Not done yet:

  • CI
  • proper docs
  • Dependencies (I have not dug into gdal vs gdal-sys and which is better)
  • CHANGELOGs

Checklist

Delete any checklist items that do not apply (e.g. if your change is minor, it may not require documentation updates).

  • Unit tests
  • Documentation, including doctests
  • Git history is linear
  • Commit messages are descriptive
  • (optional) Git commit messages follow conventional commits
  • Code is formatted (cargo fmt)
  • cargo test
  • Changes are added to the CHANGELOG

@gadomski
Copy link
Member

Do we need a GDAL feature for the CLI?

I'd say yes, because many folks don't have GDAL on their system and I'd like our CLI to be usable generally.

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