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

Use the antimeridian package #426

Merged
merged 1 commit into from
May 16, 2023
Merged

Use the antimeridian package #426

merged 1 commit into from
May 16, 2023

Conversation

gadomski
Copy link
Member

@gadomski gadomski commented May 12, 2023

Related Issue(s):

Description:
We used to implement antimeridian fixes in this package, but we recently created https://github.com/gadomski/antimeridian. This package does more, is better tested, and has fewer dependencies (only shapely). This PR updates stactools to use that package.

The fix_item function is the most valuable -- the antimeridian package doesn't know anything about STAC, so stactools adds value by updating the item's geometry and bounding box after the fix. The rest of the functions are deprecated, as folks should use antimeridian instead.

All "normalization" functions are deprecated, as "normalization" (using longitudes > 180 or <-180 to create a single polygon that crosses the antimeridian) doesn't conform to the GeoJSON spec.

PR checklist:

  • Code is formatted (run scripts/format).
  • Code lints properly (run scripts/lint).
  • Tests pass (run scripts/test).
  • Documentation has been updated to reflect changes, if applicable.
  • Changes are added to the CHANGELOG.

@gadomski gadomski added this to the 0.5.0 milestone May 12, 2023
@gadomski gadomski self-assigned this May 12, 2023
@gadomski gadomski force-pushed the issues/421-antimeridian branch from a9b959f to fbdee70 Compare May 12, 2023 16:03
@gadomski gadomski force-pushed the issues/421-antimeridian branch from fbdee70 to 1dc285b Compare May 12, 2023 16:04
@gadomski gadomski marked this pull request as ready for review May 12, 2023 16:04
@gadomski gadomski requested a review from ircwaves May 12, 2023 16:04
Copy link
Member

@ircwaves ircwaves left a comment

Choose a reason for hiding this comment

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

Deprecations are warm and fuzzy.

tests/core/utils/test_antimeridian.py Show resolved Hide resolved
tests/core/utils/test_antimeridian.py Show resolved Hide resolved
src/stactools/core/utils/antimeridian.py Show resolved Hide resolved
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.

Use the antimeridian package
2 participants