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

Searching and the anti-meridian #71

Closed
rowanwins opened this issue Jun 15, 2022 · 6 comments
Closed

Searching and the anti-meridian #71

rowanwins opened this issue Jun 15, 2022 · 6 comments

Comments

@rowanwins
Copy link

rowanwins commented Jun 15, 2022

I've noticed some quirky behaviour when using a bbox search that sometimes the results include items which cross the anti-meridian.

For example this I was searching for items in the middle of Australia using a query like
https://planetarycomputer.microsoft.com/api/stac/v1/search?collections=landsat-8-c2-l2&bbox=129.885371,-29.068322,137.230638,-23.538097&ids=LC08_L2SR_072076_20211222_02_T2
Note I've included the item id in the above query just so it's obvious :)

The results include this item.
https://planetarycomputer.microsoft.com/api/stac/v1/collections/landsat-8-c2-l2/items/LC08_L2SR_072076_20211222_02_T2
The item has a geometry which travels from 179.2700366 to -178.1091546 and so it wraps around the world.

Ah the joys of dealing with the anti-meridian :)

Cheers
Rowan

@rowanwins
Copy link
Author

Looking further at that geometry one of the coordinates is placed at 117.919754, -24.1680886 which is on the west coast of Australia, but judging by the thumbnail and the rest of the coords it looks like it should be over the pacific, so that seems problematic as well, I can't quite work out how you'd adjust the coords using +/- 360 to generate a useful geometry... so maybe something has gone astray during the geometry processing?

@TomAugspurger
Copy link

@rowanwins I believe @pjhartzell fixed some antimeridian issues in stactools-packages/landsat#30. Those fixes are in the landsat-c2-l2 collection. We recommend you use that (it also includes imagery from Landsat-9).

Looking at the "preview" link from the item you shared and the equivalent landsat-c2-l2 item, we have:

Collection Link screenshot
landsat-8-c2-l2 https://planetarycomputer.microsoft.com/api/data/v1/item/map?collection=landsat-8-c2-l2&item=LC08_L2SR_072076_20211222_02_T2 image
landsat-c2-l2 https://planetarycomputer.microsoft.com/api/data/v1/item/map?collection=landsat-c2-l2&item=LC08_L2SR_072076_20211222_02_T2 image

@rowanwins
Copy link
Author

Thanks for the info @TomAugspurger , happy to close or leave open until the issue is more widely resolved across collections

@TomAugspurger
Copy link

We've deprecated the landsat-8-c2-l2 collection and aren't planning to update those existing items, so I'll close this. But let me know if you do spot similar issues with other collections.

@rowanwins
Copy link
Author

Just one final note that there is a STAC extension for flagging collections as deprecated so that might be worth looking into.

@TomAugspurger
Copy link

Yep, thanks. We're working out our versioning strategy right now.

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

No branches or pull requests

2 participants