Open kurtjoy opened 4 months ago
Should mention that the granule I gave as an example should be located here. (T01GBQ).
This appears to be the always-painful antimeridian issue. It seems that items which cross over antimeridian are split into multiple polygons and some of them wrap the wrong way around the globe. The effect of this is that these items show up in searches which are unrelated. For example, I am searching for data in Chile, but get this item: https://earth-search.aws.element84.com/v1/collections/sentinel-2-c1-l2a/items/S2A_T01LAJ_20211023T222802_L2A
The geometry of this item looks like this:
and zoomed in:
It is clear that the item is meant to straddle the antimeridian, but the lower part of the geometry wraps around the globe.
Other examples include:
Yeah. I'm having to do some wrangling post pystac and pre stackstac to check if an AOI is one of the multipolygons or the other. Seems to work fine, but still need to do some more logic if an AOI is across the Antimeridian (Fiji I'm looking at you!)
On Tue, 21 May 2024, 18:25 Jonathan Hodge, @.***> wrote:
This appears to be the always-painful antimeridian issue. It seems that items which cross over antimeridian are split into multiple polygons and some of them wrap the wrong way around the globe. The effect of this is that these items show up in searches which are unrelated. For example, I am searching for data in Chile, but get this item: https://earth-search.aws.element84.com/v1/collections/sentinel-2-c1-l2a/items/S2A_T01LAJ_20211023T222802_L2A
The geometry of this item looks like this: image.png (view on web) https://github.com/Element84/earth-search/assets/3302774/371eb72f-2154-4d60-9170-67a7e3d6cedc
and zoomed in: image.png (view on web) https://github.com/Element84/earth-search/assets/3302774/9bd18b0f-0af2-4baa-8eb9-2b05fbda8b05
It is clear that the item is meant to straddle the antimeridian, but the lower part of the geometry wraps around the globe.
Other examples include:
- https://earth-search.aws.element84.com/v1/collections/sentinel-2-c1-l2a/items/S2B_T01LAJ_20211117T222754_L2A
https://earth-search.aws.element84.com/v1/collections/sentinel-2-c1-l2a/items/S2B_T01LAJ_20211028T222758_L2A
— Reply to this email directly, view it on GitHub https://github.com/Element84/earth-search/issues/39#issuecomment-2121841800, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJSTQSMJ56G2DDVLMFUBDMLZDLSHLAVCNFSM6AAAAABGOMXPBWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRRHA2DCOBQGA . You are receiving this because you authored the thread.Message ID: @.***>
@kurtjoy if you use shapely, then the is_valid property will return False for these entries, so that can help to identify the problematic ones.
@kurtjoy if you use shapely, then the is_valid property will return False for these entries, so that can help to identify the problematic ones.
Unfortunately that isn't the case for ones I've seen in south-east Australia. I've been removing any items where the geometry is a multipolygon for my use case, but I'm concerned that I'm going to be missing valid data in other AoIs
Found a few granules with weird metadata. if I do a request like:
https://earth-search.aws.element84.com/v1/collections/sentinel-2-c1-l2a/items?limit=12&datetime=2019-12-31T11:00:00.000Z/2020-01-14T11:00:00.000Z&bbox=173.4850878306321,-41.32156050393732,173.53181118851415,-41.30147765654245
It returns a number of tiles in the T01 UTM zone that are not in the UTM 60/59/58 Id expect for New Zealand. When I looked at the metadata for one of these anomalous granules.
https://earth-search.aws.element84.com/v1/collections/sentinel-2-c1-l2a/items/S2A_T01GBQ_20200123T220614_L2A
It shows that the projection is 32701 with a centroid of -65, -0.0058, and basically defines an area from NZ down to -90 lat and 360 of long
Cheers
Kurt