Skip to content

Sentinel-2 L2A COG GeoTiff wrong spatial reference #491

Description

@konstntokas

When opening a spectral band from the item S2B_MSIL2A_20260415T021209_R060_T50HMK_20260415T053822, the spatial reference metadata appears to be incomplete.

Specifically, the dataset contains only the following spatial reference attribute:

GeoTransform : 399960.0 10.0 0.0 6500020.0 0.0 -10.0

The CRS (e.g., WKT, EPSG code, or equivalent projection information) is missing, making it impossible to determine the coordinate reference system from the dataset itself. This differs from other Sentinel-2 items that I have opened, which include complete spatial reference metadata.

The missing CRS information causes problems in downstream applications that rely on the dataset's georeferencing.

Here is a reproducible example:

import rioxarray
import pystac_client
import planetary_computer

catalog = pystac_client.Client.open(
    "https://planetarycomputer.microsoft.com/api/stac/v1",
    modifier=planetary_computer.sign_inplace,
)
area_of_interest = {
    "type": "Point",
    "coordinates": [116.9386, -32.4771],
}
items = list(catalog.search(
    collections=["sentinel-2-l2a"],
    intersects=area_of_interest,
    datetime='2026-04-15/2026-04-15',
).items())

item = items[0]
ds = rioxarray.open_rasterio(item.assets["B02"].href)
Image

As comparison, other items contain the full information of the the CRS following the CF convention.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions