Skip to content

Broken STAC footprints in Esri 10m Land Use/Land Cover (9-class) v2 over antimeridian causing issues with other loads #454

@caitlinadams

Description

@caitlinadams

We are building a tutorial that uses pystac-client to query data from the ESRI LULC product, and then uses odc-stac to load it. Our area of interest is one of the Galapagos Islands, and we're running into an issue where our STAC query returns irrelevant supercells, because the geometry of those supercells has been incorrectly specified as multipolygons.

Specifically, supercells that span the antimeridian have been converted to incorrect multi-polygons, meaning that some part of the geometry overlaps our area of interest, despite being geographically nowhere near it.

You can see an example from a query I ran in the STAC Browser, and I have included some code below to help reproduce. In the image below, a spatial query on the Galapagos returns three super cells, where I would have expected one.

  • 15M-2022 (expected, correct footprint)
  • 01M-2022(not expected, malformed multipolygon footprint)
  • 60M-2022(not expected, malformed multipolygon footprint)
Image

Code to reproduce

AOI file as geojson provided below

import geopandas as gpd
import planetary_computer
from pystac_client import Client

aoi = gpd.read_file("aoi.geojson")
aoi_geometry = aoi.iloc[0].geometry

start_date = "2017-01-01"
end_date = "2023-01-01"
date_range = (start_date, end_date)

catalog_url = "https://planetarycomputer.microsoft.com/api/stac/v1/"
desired_collections = ["io-lulc-annual-v02"]
desired_assets = ["data"]

# Connect to the catalog
stac_client = Client.open(
    url=catalog_url, 
    modifier=planetary_computer.sign_inplace,
)

# Search for items matching the query
items = stac_client.search(
    collections=desired_collections,
    intersects=aoi_geometry,
    datetime=date_range,
).item_collection()

# Review ids and properties from query
item_properties = [(it.id, it.properties['proj:code'], it.geometry['type']) for it in items]
print(item_properties)

This returns:
Image

Area of interest geoJSON:

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "coordinates": [
          [
            [
              -91.58987956529757,
              -0.5334850082123666
            ],
            [
              -91.58987956529757,
              -1.0602980954159733
            ],
            [
              -90.77656229893003,
              -1.0602980954159733
            ],
            [
              -90.77656229893003,
              -0.5334850082123666
            ],
            [
              -91.58987956529757,
              -0.5334850082123666
            ]
          ]
        ],
        "type": "Polygon"
      }
    }
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions