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

misc enhancements: CRS, path separators #45

Merged
merged 16 commits into from
Oct 28, 2024

Conversation

davemfish
Copy link
Collaborator

@davemfish davemfish commented Oct 28, 2024

  • Convert all path separators to /. Fixes Sanitize path separators to /? #35
  • Change the CRS section to use the ESPG code instead of the WKT string. Fixes Allow multiple ways to define a CRS #34
  • make attributes of SpatialSchema and BoundingBox immutable.
  • Allow unicode characters in yaml -- some of our pint string representations from invest are unicode
  • Add Profile to top-level exports
  • Some edits to docstrings & API docs

@@ -27,6 +29,46 @@
DT_FMT = '%Y-%m-%d %H:%M:%S'


# TODO: In the future we can remove these exception managers in favor of the
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I also would have used the ones we have in pygeoprocessing directly, but I needed to enable the osr.UseExceptions() specifically.

Copy link
Member

Choose a reason for hiding this comment

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

Neat! I wasn't aware that we would need to do this for OSR specifically.

@@ -530,7 +540,7 @@ def test_describe_remote_datasource(self):
"""Test describe on a file at a public url."""
import geometamaker

filepath = 'https://storage.googleapis.com/natcap-data-cache/global/aster-v3-1s/aster-v3-1s.tif'
filepath = 'https://storage.googleapis.com/releases.naturalcapitalproject.org/invest/3.14.2/data/CoastalBlueCarbon.zip'
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is a smaller dataset; the test runs much faster. And maybe it's even more permanent too.

@davemfish davemfish marked this pull request as ready for review October 28, 2024 21:06
@davemfish davemfish requested a review from phargogh October 28, 2024 21:06
@davemfish davemfish self-assigned this Oct 28, 2024
Copy link
Member

@phargogh phargogh 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 to me! Thanks @davemfish !

@phargogh phargogh merged commit 413cef3 into natcap:main Oct 28, 2024
10 checks passed
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.

Sanitize path separators to /? Allow multiple ways to define a CRS
2 participants