Skip to content

Cloud-native Sentinel-2 tiling grid in GeoParquet format

License

Notifications You must be signed in to change notification settings

maawoo/sentinel-2-grid-geoparquet

 
 

Repository files navigation

Cloud-native geospatial Sentinel-2 grid

An update of scottyhq/mgrs to convert the Sentinel-2 grid from KML to the cloud-native file format GeoParquet. Two versions are available in this repository:

  • sentinel-2-grid.parquet - the full grid
  • sentinel-2-grid_LAND.parquet - only tiles that intersect with land areas based on the high resolution land mask by Natural Earth

Sentinel-2 grid

Access examples

The GeoParquet files can be accessed directly from this repository without having to download the files. Here are some examples to get you started:

GeoPandas

import geopandas as gpd

gdf = gpd.read_file("https://github.com/maawoo/sentinel-2-grid-geoparquet/raw/main/sentinel-2-grid.parquet", engine="pyogrio")

GDAL / OGR

Extract individual tile and save as GeoJSON

ogr2ogr -f "GeoJSON" 32TNT.geojson /vsicurl/https://github.com/maawoo/sentinel-2-grid-geoparquet/raw/main/sentinel-2-grid.parquet -sql "SELECT * FROM \"sentinel-2-grid\" WHERE tile = '32TNT'"

Print file info

ogrinfo -al -so /vsicurl/https://github.com/maawoo/sentinel-2-grid-geoparquet/raw/main/sentinel-2-grid.parquet

This should print the metadata of the file:

INFO: Open of `/vsicurl/https://github.com/maawoo/sentinel-2-grid-geoparquet/raw/main/sentinel-2-grid.parquet'
      using driver `Parquet' successful.

Layer name: sentinel-2-grid
Geometry: Polygon
Feature Count: 56686
Extent: (-180.000000, -83.835951) - (180.000000, 84.644279)
Layer SRS WKT:
GEOGCRS["WGS 84",
    ENSEMBLE["World Geodetic System 1984 ensemble",
        MEMBER["World Geodetic System 1984 (Transit)"],
        MEMBER["World Geodetic System 1984 (G730)"],
        MEMBER["World Geodetic System 1984 (G873)"],
        MEMBER["World Geodetic System 1984 (G1150)"],
        MEMBER["World Geodetic System 1984 (G1674)"],
        MEMBER["World Geodetic System 1984 (G1762)"],
        MEMBER["World Geodetic System 1984 (G2139)"],
        ELLIPSOID["WGS 84",6378137,298.257223563,
            LENGTHUNIT["metre",1]],
        ENSEMBLEACCURACY[2.0]],
    PRIMEM["Greenwich",0,
        ANGLEUNIT["degree",0.0174532925199433]],
    CS[ellipsoidal,2],
        AXIS["geodetic latitude (Lat)",north,
            ORDER[1],
            ANGLEUNIT["degree",0.0174532925199433]],
        AXIS["geodetic longitude (Lon)",east,
            ORDER[2],
            ANGLEUNIT["degree",0.0174532925199433]],
    USAGE[
        SCOPE["Horizontal component of 3D system."],
        AREA["World."],
        BBOX[-90,-180,90,180]],
    ID["EPSG",4326]]
Data axis to CRS axis mapping: 2,1
Geometry Column = geometry
tile: String (0.0)
epsg: Integer64 (0.0)
utm_wkt: String (0.0)
utm_bounds: String (0.0)

Is the Sentinel-2 grid a good solution for my use case?

I will not be able to answer this of course, and it depends on your specific use case. However, I wanted to leave this publication by Bauer-Marschallinger & Falkner (2023) here to advocate for alternative grid systems such as the Equi7 grid. With more and more Earth Observation data being available, we as a community need to move forward and innovate in the way we access and process this huge volume of data.

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 97.4%
  • Python 2.6%