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

ProjectionExtension v2 (proj:epsg -> proj:code) #1287

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

Conversation

jsignell
Copy link
Member

@jsignell jsignell commented Dec 4, 2023

Related Issue(s):

Description:

The intention of this PR is to still support using epsg and just store it in proj:code.

Note

This PR removes epsg as a positional argument to ProjectionExtension.apply. It also removes all positional arguments to it should raise nice errors for that scenario.

Another option would be to allow positional arguments and automatically deduce whether they should be interpreted as epsg or code based on type. I suspect that using epsg as a positional argument in apply is rare, so I strongly prefer the approach in this PR.

TO DO:

PR Checklist:

  • pre-commit hooks pass locally
  • Tests pass (run scripts/test)
  • Documentation has been updated to reflect changes, if applicable
  • This PR maintains or improves overall codebase code coverage.
  • Changes are added to the CHANGELOG. See the docs for information about adding to the changelog.

@nick-j-roberts
Copy link

Just checking in on this, is there a date by which the change to support proj:code instead of proj:epsg is expected to take effect?

@gadomski
Copy link
Member

Just checking in on this, is there a date by which the change to support proj:code instead of proj:epsg is expected to take effect?

Not at this time ... always looking for folks to help out to help move things along!

@KeynesYouDigIt
Copy link
Contributor

KeynesYouDigIt commented Dec 31, 2024

@jsignell I noticed that to fix summaries, I am going to have to edit https://github.com/stac-utils/pystac/blob/main/pystac/static/fields-normalized.json - which is easy enough! but it's not formatted at all as a file, so I wanted to check: is it a build artifact of some other dict or somethinng? or is it just kinda new / should be edited directly if I need to make changes?

Also, whats the best way to run tests with changes to this file? override to a local path or push my local copy to the CDN somehow?

@gadomski
Copy link
Member

or is it just kinda new / should be edited directly if I need to make changes?

fields-normalized.json is pulled from https://www.npmjs.com/package/@radiantearth/stac-fields via this script.

@KeynesYouDigIt
Copy link
Contributor

KeynesYouDigIt commented Dec 31, 2024 via email

@gadomski
Copy link
Member

Right I saw that, and it does make sense, but if I need to change it, do I
just Change it like I would than any other file in the repo?

I don't quite understand the question. Any modifications to fields-normalized.json should probably be made via PR on https://github.com/stac-utils/stac-fields, unless it's a PySTAC-specific modification.

@KeynesYouDigIt
Copy link
Contributor

KeynesYouDigIt commented Jan 1, 2025 via email

@jsignell
Copy link
Member Author

jsignell commented Jan 2, 2025

Sorry I didn’t get to follow up - After I walked away from my computer, I was wondering if that was what you meant. That answers my question, I’ll probably start with a PR to that repo then! Thanks!

Hi @KeynesYouDigIt! Thanks for trying to pick this back up. I had opened a PR on stac-fields (stac-utils/stac-fields#27) back when I was working on this, and it looks like that morphed into stac-utils/stac-fields@ebd9c99 is there something more that you need? Or maybe it's just a matter of updating a dependency.

@KeynesYouDigIt
Copy link
Contributor

KeynesYouDigIt commented Jan 6, 2025

Hi @jsignell !

Or maybe it's just a matter of updating a dependency.

Whoops, yeah thats it.
duh

Shoulda seen that, thanks for the help! Will let you know how it goes, hoping to wrap it up soon.

@KeynesYouDigIt
Copy link
Contributor

KeynesYouDigIt commented Jan 11, 2025

@jsignell So I have commits on this branch that should cover the step

get summaries working properly
https://github.com/KeynesYouDigIt/pystac/tree/refs/heads/proj-v2
(CI workflow) https://github.com/KeynesYouDigIt/pystac/actions/runs/12727145368

Let me know if I should PR to your branch or directly to this one, I have no preference.

As far as the next step, I'm hunting around for exactly what this means...

remove local override of projection extension

Could you point me to where this is done and what this means? Does this refer to some of the URI constants in pystac/extensions/projection.py or something else? (still getting my head around the extensions stuff)

Also we might add some more unit tests, but what do you think?

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.

Support for projection v2.0.0 extension
4 participants