├── .github ├── codecov.yml └── workflows │ ├── ci.yml │ └── deploy_mkdocs.yml ├── .gitignore ├── .pre-commit-config.yaml ├── AUTHORS.txt ├── CHANGES.md ├── CONTRIBUTING.md ├── LICENSE.txt ├── README.md ├── docs ├── mkdocs.yml └── src │ ├── API │ ├── cbers.md │ ├── landsat-c2.md │ ├── modis.md │ └── sentinel.md │ ├── contributing.md │ ├── index.md │ ├── release-notes.md │ └── usage │ ├── cbers.md │ ├── landsat-c2.md │ ├── modis.md │ ├── overview.md │ └── sentinel.md ├── pyproject.toml ├── rio_tiler_pds ├── __init__.py ├── cbers │ ├── __init__.py │ ├── aws │ │ ├── __init__.py │ │ └── cbers4.py │ └── utils.py ├── copernicus │ ├── __init__.py │ └── aws │ │ ├── __init__.py │ │ └── dem.py ├── errors.py ├── landsat │ ├── __init__.py │ ├── aws │ │ ├── __init__.py │ │ └── landsat_collection2.py │ └── utils.py ├── modis │ ├── __init__.py │ ├── aws │ │ ├── __init__.py │ │ ├── modis_astraea.py │ │ └── modis_pds.py │ ├── modland_grid.py │ └── utils.py ├── sentinel │ ├── __init__.py │ ├── aws │ │ ├── __init__.py │ │ ├── sentinel1.py │ │ └── sentinel2.py │ └── utils.py └── utils.py └── tests ├── __init__.py ├── fixtures ├── astraea-opendata │ └── MYD13A1.006 │ │ └── 30 │ │ └── 10 │ │ └── 2020153 │ │ ├── MYD13A1.A2020153.h30v10.006.2020170024036_BR_B06.TIF │ │ ├── MYD13A1.A2020153.h30v10.006.2020170024036_CDOY_B11.TIF │ │ ├── MYD13A1.A2020153.h30v10.006.2020170024036_EVI_B02.TIF │ │ ├── MYD13A1.A2020153.h30v10.006.2020170024036_MIRR_B07.TIF │ │ ├── MYD13A1.A2020153.h30v10.006.2020170024036_NDVI_B01.TIF │ │ ├── MYD13A1.A2020153.h30v10.006.2020170024036_NIRR_B05.TIF │ │ ├── MYD13A1.A2020153.h30v10.006.2020170024036_PR_B12.TIF │ │ ├── MYD13A1.A2020153.h30v10.006.2020170024036_RAA_B10.TIF │ │ ├── MYD13A1.A2020153.h30v10.006.2020170024036_RR_B04.TIF │ │ ├── MYD13A1.A2020153.h30v10.006.2020170024036_SZA_B09.TIF │ │ ├── MYD13A1.A2020153.h30v10.006.2020170024036_VIQ_B03.TIF │ │ └── MYD13A1.A2020153.h30v10.006.2020170024036_VZA_B08.TIF ├── cbers-pds │ ├── CBERS4 │ │ ├── AWFI │ │ │ └── 146 │ │ │ │ └── 129 │ │ │ │ └── CBERS_4_AWFI_20170420_146_129_L2 │ │ │ │ ├── CBERS_4_AWFI_20170420_146_129_L2_BAND13.tif │ │ │ │ ├── CBERS_4_AWFI_20170420_146_129_L2_BAND13.tif.ovr │ │ │ │ ├── CBERS_4_AWFI_20170420_146_129_L2_BAND14.tif │ │ │ │ ├── CBERS_4_AWFI_20170420_146_129_L2_BAND14.tif.ovr │ │ │ │ ├── CBERS_4_AWFI_20170420_146_129_L2_BAND15.tif │ │ │ │ ├── CBERS_4_AWFI_20170420_146_129_L2_BAND15.tif.ovr │ │ │ │ ├── CBERS_4_AWFI_20170420_146_129_L2_BAND16.tif │ │ │ │ └── CBERS_4_AWFI_20170420_146_129_L2_BAND16.tif.ovr │ │ ├── MUX │ │ │ └── 057 │ │ │ │ └── 094 │ │ │ │ └── CBERS_4_MUX_20171121_057_094_L2 │ │ │ │ ├── CBERS_4_MUX_20171121_057_094_L2_BAND5.tif │ │ │ │ ├── CBERS_4_MUX_20171121_057_094_L2_BAND5.tif.ovr │ │ │ │ ├── CBERS_4_MUX_20171121_057_094_L2_BAND6.tif │ │ │ │ ├── CBERS_4_MUX_20171121_057_094_L2_BAND6.tif.ovr │ │ │ │ ├── CBERS_4_MUX_20171121_057_094_L2_BAND7.tif │ │ │ │ ├── CBERS_4_MUX_20171121_057_094_L2_BAND7.tif.ovr │ │ │ │ ├── CBERS_4_MUX_20171121_057_094_L2_BAND8.tif │ │ │ │ └── CBERS_4_MUX_20171121_057_094_L2_BAND8.tif.ovr │ │ ├── PAN10M │ │ │ └── 161 │ │ │ │ └── 109 │ │ │ │ └── CBERS_4_PAN10M_20170427_161_109_L4 │ │ │ │ ├── CBERS_4_PAN10M_20170427_161_109_L4_BAND2.tif │ │ │ │ ├── CBERS_4_PAN10M_20170427_161_109_L4_BAND2.tif.ovr │ │ │ │ ├── CBERS_4_PAN10M_20170427_161_109_L4_BAND3.tif │ │ │ │ ├── CBERS_4_PAN10M_20170427_161_109_L4_BAND3.tif.ovr │ │ │ │ ├── CBERS_4_PAN10M_20170427_161_109_L4_BAND4.tif │ │ │ │ └── CBERS_4_PAN10M_20170427_161_109_L4_BAND4.tif.ovr │ │ └── PAN5M │ │ │ └── 153 │ │ │ └── 114 │ │ │ └── CBERS_4_PAN5M_20170425_153_114_L4 │ │ │ ├── CBERS_4_PAN5M_20170425_153_114_L4_BAND1.tif │ │ │ └── CBERS_4_PAN5M_20170425_153_114_L4_BAND1.tif.ovr │ └── CBERS4A │ │ ├── MUX │ │ └── 201 │ │ │ └── 137 │ │ │ └── CBERS_4A_MUX_20200808_201_137_L4 │ │ │ ├── CBERS_4A_MUX_20200808_201_137_L4_BAND5.tif │ │ │ ├── CBERS_4A_MUX_20200808_201_137_L4_BAND6.tif │ │ │ ├── CBERS_4A_MUX_20200808_201_137_L4_BAND7.tif │ │ │ └── CBERS_4A_MUX_20200808_201_137_L4_BAND8.tif │ │ ├── WFI │ │ └── 221 │ │ │ └── 156 │ │ │ └── CBERS_4A_WFI_20200801_221_156_L4 │ │ │ ├── CBERS_4A_WFI_20200801_221_156_L4_BAND13.tif │ │ │ ├── CBERS_4A_WFI_20200801_221_156_L4_BAND14.tif │ │ │ ├── CBERS_4A_WFI_20200801_221_156_L4_BAND15.tif │ │ │ └── CBERS_4A_WFI_20200801_221_156_L4_BAND16.tif │ │ └── WPM │ │ └── 209 │ │ └── 139 │ │ └── CBERS_4A_WPM_20200730_209_139_L4 │ │ ├── CBERS_4A_WPM_20200730_209_139_L4_BAND0.tif │ │ ├── CBERS_4A_WPM_20200730_209_139_L4_BAND1.tif │ │ ├── CBERS_4A_WPM_20200730_209_139_L4_BAND2.tif │ │ ├── CBERS_4A_WPM_20200730_209_139_L4_BAND3.tif │ │ └── CBERS_4A_WPM_20200730_209_139_L4_BAND4.tif ├── copernicus-dem-30m │ └── Copernicus_DSM_COG_10_N00_00_E006_00_DEM │ │ └── Copernicus_DSM_COG_10_N00_00_E006_00_DEM.tif ├── copernicus-dem-90m │ └── Copernicus_DSM_COG_30_S90_00_W164_00_DEM │ │ └── Copernicus_DSM_COG_30_S90_00_W164_00_DEM.tif ├── landsat-pds │ └── c1 │ │ └── L8 │ │ └── 016 │ │ └── 037 │ │ └── LC08_L1TP_016037_20170813_20170814_01_RT │ │ ├── LC08_L1TP_016037_20170813_20170814_01_RT_B1.TIF │ │ ├── LC08_L1TP_016037_20170813_20170814_01_RT_B1.TIF.ovr │ │ ├── LC08_L1TP_016037_20170813_20170814_01_RT_B10.TIF │ │ ├── LC08_L1TP_016037_20170813_20170814_01_RT_B10.TIF.ovr │ │ ├── LC08_L1TP_016037_20170813_20170814_01_RT_B11.TIF │ │ ├── LC08_L1TP_016037_20170813_20170814_01_RT_B11.TIF.ovr │ │ ├── LC08_L1TP_016037_20170813_20170814_01_RT_B2.TIF │ │ ├── LC08_L1TP_016037_20170813_20170814_01_RT_B2.TIF.ovr │ │ ├── LC08_L1TP_016037_20170813_20170814_01_RT_B3.TIF │ │ ├── LC08_L1TP_016037_20170813_20170814_01_RT_B3.TIF.ovr │ │ ├── LC08_L1TP_016037_20170813_20170814_01_RT_B4.TIF │ │ ├── LC08_L1TP_016037_20170813_20170814_01_RT_B4.TIF.ovr │ │ ├── LC08_L1TP_016037_20170813_20170814_01_RT_B5.TIF │ │ ├── LC08_L1TP_016037_20170813_20170814_01_RT_B5.TIF.ovr │ │ ├── LC08_L1TP_016037_20170813_20170814_01_RT_B6.TIF │ │ ├── LC08_L1TP_016037_20170813_20170814_01_RT_B6.TIF.ovr │ │ ├── LC08_L1TP_016037_20170813_20170814_01_RT_B7.TIF │ │ ├── LC08_L1TP_016037_20170813_20170814_01_RT_B7.TIF.ovr │ │ ├── LC08_L1TP_016037_20170813_20170814_01_RT_B8.TIF │ │ ├── LC08_L1TP_016037_20170813_20170814_01_RT_B8.TIF.ovr │ │ ├── LC08_L1TP_016037_20170813_20170814_01_RT_B9.TIF │ │ ├── LC08_L1TP_016037_20170813_20170814_01_RT_B9.TIF.ovr │ │ ├── LC08_L1TP_016037_20170813_20170814_01_RT_BQA.TIF │ │ ├── LC08_L1TP_016037_20170813_20170814_01_RT_BQA.TIF.ovr │ │ └── LC08_L1TP_016037_20170813_20170814_01_RT_MTL.txt ├── modis-pds │ └── MCD43A4.006 │ │ └── 21 │ │ └── 11 │ │ └── 2017006 │ │ ├── MCD43A4.A2017006.h21v11.006.2017018074804_B01.TIF │ │ ├── MCD43A4.A2017006.h21v11.006.2017018074804_B01qa.TIF │ │ ├── MCD43A4.A2017006.h21v11.006.2017018074804_B02.TIF │ │ ├── MCD43A4.A2017006.h21v11.006.2017018074804_B02qa.TIF │ │ ├── MCD43A4.A2017006.h21v11.006.2017018074804_B03.TIF │ │ ├── MCD43A4.A2017006.h21v11.006.2017018074804_B03qa.TIF │ │ ├── MCD43A4.A2017006.h21v11.006.2017018074804_B04.TIF │ │ ├── MCD43A4.A2017006.h21v11.006.2017018074804_B04qa.TIF │ │ ├── MCD43A4.A2017006.h21v11.006.2017018074804_B05.TIF │ │ ├── MCD43A4.A2017006.h21v11.006.2017018074804_B05qa.TIF │ │ ├── MCD43A4.A2017006.h21v11.006.2017018074804_B06.TIF │ │ ├── MCD43A4.A2017006.h21v11.006.2017018074804_B06qa.TIF │ │ ├── MCD43A4.A2017006.h21v11.006.2017018074804_B07.TIF │ │ └── MCD43A4.A2017006.h21v11.006.2017018074804_B07qa.TIF ├── sentinel-cogs │ └── sentinel-s2-l2a-cogs │ │ ├── 29 │ │ └── R │ │ │ └── KH │ │ │ └── 2020 │ │ │ └── 2 │ │ │ └── S2A_29RKH_20200219_0_L2A │ │ │ ├── AOT.tif │ │ │ ├── B01.tif │ │ │ ├── B02.tif │ │ │ ├── B03.tif │ │ │ ├── B04.tif │ │ │ ├── B05.tif │ │ │ ├── B06.tif │ │ │ ├── B07.tif │ │ │ ├── B08.tif │ │ │ ├── B09.tif │ │ │ ├── B11.tif │ │ │ ├── B12.tif │ │ │ ├── B8A.tif │ │ │ ├── L2A_PVI.tif │ │ │ ├── S2A_29RKH_20200219_0_L2A.json │ │ │ ├── SCL.tif │ │ │ ├── TCI.tif │ │ │ └── WVP.tif │ │ └── 31 │ │ └── N │ │ └── BJ │ │ └── 2019 │ │ └── 5 │ │ └── S2A_31NBJ_20190524_0_L2A │ │ └── S2A_31NBJ_20190524_0_L2A.json ├── sentinel-s1-l1c │ └── GRD │ │ ├── 2018 │ │ └── 7 │ │ │ └── 16 │ │ │ └── IW │ │ │ └── DV │ │ │ └── S1A_IW_GRDH_1SDV_20180716T004042_20180716T004107_022812_02792A_FD5B │ │ │ ├── measurement │ │ │ ├── iw-vh.tiff │ │ │ └── iw-vv.tiff │ │ │ └── productInfo.json │ │ └── 2023 │ │ ├── 7 │ │ └── 26 │ │ │ └── IW │ │ │ └── DV │ │ │ └── S1A_IW_GRDH_1SDV_20230726T183302_20230726T183327_049598_05F6CA_31E7 │ │ │ └── productInfo.json │ │ └── 8 │ │ └── 9 │ │ └── S1 │ │ └── DV │ │ └── S1A_S1_GRDH_1SDV_20230809T020729_20230809T020754_049792_05FCE6_1175 │ │ ├── measurement │ │ └── s1-vh.tiff │ │ └── productInfo.json ├── sentinel-s2-l1c │ └── tiles │ │ └── 19 │ │ └── U │ │ └── DP │ │ └── 2017 │ │ └── 7 │ │ └── 29 │ │ └── 0 │ │ ├── B01.jp2 │ │ ├── B02.jp2 │ │ ├── B03.jp2 │ │ ├── B04.jp2 │ │ ├── B05.jp2 │ │ ├── B06.jp2 │ │ ├── B07.jp2 │ │ ├── B08.jp2 │ │ ├── B09.jp2 │ │ ├── B10.jp2 │ │ ├── B11.jp2 │ │ ├── B12.jp2 │ │ ├── B8A.jp2 │ │ ├── preview.jp2 │ │ ├── preview.jpg │ │ ├── preview │ │ ├── B01.jp2 │ │ ├── B02.jp2 │ │ ├── B03.jp2 │ │ ├── B04.jp2 │ │ ├── B05.jp2 │ │ ├── B06.jp2 │ │ ├── B07.jp2 │ │ ├── B08.jp2 │ │ ├── B09.jp2 │ │ ├── B10.jp2 │ │ ├── B11.jp2 │ │ ├── B12.jp2 │ │ └── B8A.jp2 │ │ └── tileInfo.json ├── sentinel-s2-l2a │ └── tiles │ │ └── 19 │ │ └── U │ │ └── DP │ │ └── 2017 │ │ └── 7 │ │ └── 29 │ │ └── 0 │ │ ├── R10m │ │ ├── AOT.jp2 │ │ ├── B02.jp2 │ │ ├── B03.jp2 │ │ ├── B04.jp2 │ │ ├── B08.jp2 │ │ ├── TCI.jp2 │ │ └── WVP.jp2 │ │ ├── R20m │ │ ├── AOT.jp2 │ │ ├── B02.jp2 │ │ ├── B03.jp2 │ │ ├── B04.jp2 │ │ ├── B05.jp2 │ │ ├── B06.jp2 │ │ ├── B07.jp2 │ │ ├── B08.jp2 │ │ ├── B11.jp2 │ │ ├── B12.jp2 │ │ ├── B8A.jp2 │ │ ├── SCL.jp2 │ │ ├── TCI.jp2 │ │ └── WVP.jp2 │ │ ├── R60m │ │ ├── AOT.jp2 │ │ ├── B01.jp2 │ │ ├── B02.jp2 │ │ ├── B03.jp2 │ │ ├── B04.jp2 │ │ ├── B05.jp2 │ │ ├── B06.jp2 │ │ ├── B07.jp2 │ │ ├── B08.jp2 │ │ ├── B09.jp2 │ │ ├── B11.jp2 │ │ ├── B12.jp2 │ │ ├── B8A.jp2 │ │ ├── SCL.jp2 │ │ ├── TCI.jp2 │ │ └── WVP.jp2 │ │ └── tileInfo.json └── usgs-landsat │ ├── README.md │ └── collection02 │ └── level-2 │ └── standard │ └── oli-tirs │ └── 2020 │ └── 001 │ └── 062 │ └── LC08_L2SP_001062_20201031_20201106_02_T2 │ ├── LC08_L2SP_001062_20201031_20201106_02_T2_ANG.txt │ ├── LC08_L2SP_001062_20201031_20201106_02_T2_MTL.json │ ├── LC08_L2SP_001062_20201031_20201106_02_T2_MTL.txt │ ├── LC08_L2SP_001062_20201031_20201106_02_T2_MTL.xml │ ├── LC08_L2SP_001062_20201031_20201106_02_T2_QA_PIXEL.TIF │ ├── LC08_L2SP_001062_20201031_20201106_02_T2_QA_RADSAT.TIF │ ├── LC08_L2SP_001062_20201031_20201106_02_T2_SR_B1.TIF │ ├── LC08_L2SP_001062_20201031_20201106_02_T2_SR_B2.TIF │ ├── LC08_L2SP_001062_20201031_20201106_02_T2_SR_B3.TIF │ ├── LC08_L2SP_001062_20201031_20201106_02_T2_SR_B4.TIF │ ├── LC08_L2SP_001062_20201031_20201106_02_T2_SR_B5.TIF │ ├── LC08_L2SP_001062_20201031_20201106_02_T2_SR_B6.TIF │ ├── LC08_L2SP_001062_20201031_20201106_02_T2_SR_B7.TIF │ ├── LC08_L2SP_001062_20201031_20201106_02_T2_SR_QA_AEROSOL.TIF │ ├── LC08_L2SP_001062_20201031_20201106_02_T2_SR_stac.json │ ├── LC08_L2SP_001062_20201031_20201106_02_T2_ST_ATRAN.TIF │ ├── LC08_L2SP_001062_20201031_20201106_02_T2_ST_B10.TIF │ ├── LC08_L2SP_001062_20201031_20201106_02_T2_ST_CDIST.TIF │ ├── LC08_L2SP_001062_20201031_20201106_02_T2_ST_DRAD.TIF │ ├── LC08_L2SP_001062_20201031_20201106_02_T2_ST_EMIS.TIF │ ├── LC08_L2SP_001062_20201031_20201106_02_T2_ST_EMSD.TIF │ ├── LC08_L2SP_001062_20201031_20201106_02_T2_ST_QA.TIF │ ├── LC08_L2SP_001062_20201031_20201106_02_T2_ST_TRAD.TIF │ ├── LC08_L2SP_001062_20201031_20201106_02_T2_ST_URAD.TIF │ ├── LC08_L2SP_001062_20201031_20201106_02_T2_ST_stac.json │ ├── LC08_L2SP_001062_20201031_20201106_02_T2_thumb_large.jpeg │ └── LC08_L2SP_001062_20201031_20201106_02_T2_thumb_small.jpeg ├── test_cbers.py ├── test_copernicus_dem.py ├── test_landsat.py ├── test_modis.py ├── test_modis_astraea.py ├── test_sentinel1.py └── test_sentinel2.py /.github/codecov.yml: -------------------------------------------------------------------------------- 1 | comment: off 2 | 3 | coverage: 4 | status: 5 | project: 6 | default: 7 | target: auto 8 | threshold: 5 9 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | # On every pull request, but only on push to main 4 | on: 5 | push: 6 | branches: 7 | - main 8 | tags: 9 | - '*' 10 | pull_request: 11 | env: 12 | LATEST_PY_VERSION: '3.13' 13 | 14 | jobs: 15 | tests: 16 | runs-on: ubuntu-latest 17 | strategy: 18 | matrix: 19 | python-version: 20 | - '3.8' 21 | - '3.9' 22 | - '3.10' 23 | - '3.11' 24 | - '3.12' 25 | - '3.13' 26 | 27 | steps: 28 | - uses: actions/checkout@v4 29 | - name: Set up Python ${{ matrix.python-version }} 30 | uses: actions/setup-python@v5 31 | with: 32 | python-version: ${{ matrix.python-version }} 33 | 34 | - name: Install dependencies 35 | run: | 36 | python -m pip install --upgrade pip 37 | python -m pip install .["test"] 38 | 39 | - name: Run pre-commit 40 | if: ${{ matrix.python-version == env.LATEST_PY_VERSION }} 41 | run: | 42 | python -m pip install pre-commit 43 | pre-commit run --all-files 44 | 45 | - name: Run tests 46 | run: python -m pytest --cov rio_tiler_pds --cov-report xml --cov-report term-missing 47 | 48 | - name: Upload Results 49 | if: ${{ matrix.python-version == env.LATEST_PY_VERSION }} 50 | uses: codecov/codecov-action@v1 51 | with: 52 | file: ./coverage.xml 53 | flags: unittests 54 | name: ${{ matrix.python-version }} 55 | fail_ci_if_error: false 56 | 57 | publish: 58 | needs: [tests] 59 | runs-on: ubuntu-latest 60 | if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release' 61 | steps: 62 | - uses: actions/checkout@v4 63 | - name: Set up Python 64 | uses: actions/setup-python@v5 65 | with: 66 | python-version: ${{ env.LATEST_PY_VERSION }} 67 | 68 | - name: Install dependencies 69 | run: | 70 | python -m pip install --upgrade pip 71 | python -m pip install flit 72 | python -m pip install . 73 | 74 | - name: Set tag version 75 | id: tag 76 | run: | 77 | echo "version=${GITHUB_REF#refs/*/}" 78 | echo "version=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT 79 | 80 | - name: Set module version 81 | id: module 82 | run: | 83 | echo version=$(python -c'import rio_tiler_pds; print(rio_tiler_pds.__version__)') >> $GITHUB_OUTPUT 84 | 85 | - name: Build and publish 86 | if: ${{ steps.tag.outputs.version }} == ${{ steps.module.outputs.version}} 87 | env: 88 | FLIT_USERNAME: ${{ secrets.PYPI_USERNAME }} 89 | FLIT_PASSWORD: ${{ secrets.PYPI_PASSWORD }} 90 | run: flit publish 91 | -------------------------------------------------------------------------------- /.github/workflows/deploy_mkdocs.yml: -------------------------------------------------------------------------------- 1 | name: Publish docs via GitHub Pages 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | paths: 8 | # Only rebuild website when docs have changed 9 | - 'README.md' 10 | - 'CHANGES.md' 11 | - 'CONTRIBUTING.md' 12 | - 'docs/**' 13 | 14 | jobs: 15 | build: 16 | name: Deploy docs 17 | runs-on: ubuntu-latest 18 | steps: 19 | - name: Checkout main 20 | uses: actions/checkout@v3 21 | 22 | - name: Set up Python 3.8 23 | uses: actions/setup-python@v4 24 | with: 25 | python-version: 3.8 26 | 27 | - name: Install dependencies 28 | run: | 29 | python -m pip install --upgrade pip 30 | python -m pip install -e .["docs"] 31 | 32 | - name: Deploy docs 33 | run: mkdocs gh-deploy --force -f docs/mkdocs.yml 34 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | env/ 12 | build/ 13 | develop-eggs/ 14 | dist/ 15 | downloads/ 16 | eggs/ 17 | .eggs/ 18 | lib/ 19 | lib64/ 20 | parts/ 21 | sdist/ 22 | var/ 23 | wheels/ 24 | *.egg-info/ 25 | .installed.cfg 26 | *.egg 27 | 28 | # PyInstaller 29 | # Usually these files are written by a python script from a template 30 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 31 | *.manifest 32 | *.spec 33 | 34 | # Installer logs 35 | pip-log.txt 36 | pip-delete-this-directory.txt 37 | 38 | # Unit test / coverage reports 39 | htmlcov/ 40 | .tox/ 41 | .coverage 42 | .coverage.* 43 | .cache 44 | nosetests.xml 45 | coverage.xml 46 | *.cover 47 | .hypothesis/ 48 | 49 | # Translations 50 | *.mo 51 | *.pot 52 | 53 | # Django stuff: 54 | *.log 55 | local_settings.py 56 | 57 | # Flask stuff: 58 | instance/ 59 | .webassets-cache 60 | 61 | # Scrapy stuff: 62 | .scrapy 63 | 64 | # Sphinx documentation 65 | docs/_build/ 66 | 67 | # PyBuilder 68 | target/ 69 | 70 | # Jupyter Notebook 71 | .ipynb_checkpoints 72 | 73 | # pyenv 74 | .python-version 75 | 76 | # celery beat schedule file 77 | celerybeat-schedule 78 | 79 | # SageMath parsed files 80 | *.sage.py 81 | 82 | # dotenv 83 | .env 84 | 85 | # virtualenv 86 | .venv 87 | venv/ 88 | ENV/ 89 | 90 | # Spyder project settings 91 | .spyderproject 92 | .spyproject 93 | 94 | # Rope project settings 95 | .ropeproject 96 | 97 | # Pycharm project settings 98 | .idea 99 | 100 | # mkdocs documentation 101 | /site 102 | 103 | # mypy 104 | .mypy_cache/ 105 | 106 | 107 | .pytest_cache 108 | 109 | .benchmarks/ 110 | tests/benchmarks/data/* 111 | tests/fixtures/mask* 112 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | repos: 2 | - repo: https://github.com/abravalheri/validate-pyproject 3 | rev: v0.12.1 4 | hooks: 5 | - id: validate-pyproject 6 | 7 | - repo: https://github.com/PyCQA/isort 8 | rev: 5.13.2 9 | hooks: 10 | - id: isort 11 | language_version: python 12 | 13 | - repo: https://github.com/astral-sh/ruff-pre-commit 14 | rev: v0.8.4 15 | hooks: 16 | - id: ruff 17 | args: ["--fix"] 18 | - id: ruff-format 19 | 20 | - repo: https://github.com/pre-commit/mirrors-mypy 21 | rev: v1.11.2 22 | hooks: 23 | - id: mypy 24 | language_version: python 25 | # No reason to run if only tests have changed. They intentionally break typing. 26 | exclude: tests/.* 27 | additional_dependencies: 28 | - types-attrs 29 | - types-cachetools 30 | -------------------------------------------------------------------------------- /AUTHORS.txt: -------------------------------------------------------------------------------- 1 | Authors 2 | ------- 3 | 4 | * Vincent Sarago 5 | * Sean Gillies 6 | 7 | See also https://github.com/cogeotiff/rio-tiler-pds/graphs/contributors. 8 | -------------------------------------------------------------------------------- /CHANGES.md: -------------------------------------------------------------------------------- 1 | # Release Notes 2 | 3 | ## 0.11.1 (2025-01-28) 4 | 5 | * add support for Sentinel 2C 6 | 7 | ## 0.11.0 (2024-12-20) 8 | 9 | * update rio-tiler requirement to `>=7.0,<8.0` 10 | * replace `geographic bounds` with dataset bounds in `Reader.info()` method's response **breaking change** 11 | * remove `minzoom` and `maxzoom` properties in `Info` model **breaking change** 12 | * add python 3.12 and 3.13 support 13 | 14 | ## 0.10.1 (2023-08-21) 15 | 16 | * calculate scene bounds from multipolygons for Sentinel-1 17 | * allow `Stripmap` beam mode for sentinel-1 dataset 18 | 19 | ## 0.10.0 (2023-07-25) 20 | 21 | * update rio-tiler requirement to `>=5.0,<7.0` 22 | 23 | ## 0.9.0 (2023-07-13) 24 | 25 | * update rio-tiler requirement to `>=5.0,<6.0` 26 | * add `rio_tiler_pds.copernicus.aws.Dem30Reader` and `rio_tiler_pds.copernicus.aws.Dem90Reader` **mosaic** readers 27 | * add `boto3` in dependencies 28 | 29 | ## 0.8.0 (2023-04-11) 30 | 31 | * remove Landsat 8 Collection 1 32 | * remove python 3.7 and add python 3.10/3.11 support 33 | * switch to ruff 34 | * fix issue with latest STAC Items for Sentinel-2-l2a-cogs (author @dvd3v, https://github.com/cogeotiff/rio-tiler-pds/pull/64) 35 | * update rio-tiler requirement to `>=4.0,<5.0` 36 | 37 | ## 0.7.0 (2022-06-08) 38 | 39 | * enable `bucket` and `prefix_pattern` as input (@author @f-skold, https://github.com/cogeotiff/rio-tiler-pds/pull/61) 40 | * switch to `pyproject.toml` 41 | 42 | ## 0.6.0 (2021-11-29) 43 | 44 | * update rio-tiler requirement to `>=3.0.0` 45 | 46 | **breaking changes** 47 | 48 | * remove python 3.6 support 49 | * `sceneid` -> `input` in Reader attributes 50 | * remove `.stats()` and `.metadata()` methods 51 | * `bands` is now optional for `.info()` and `.statistics` 52 | * remove useless `band_expression` option 53 | 54 | ## 0.5.4 (2021-10-08) 55 | 56 | * `bands` should be stored as `tuple` in sentinel-1 reader 57 | 58 | ## 0.5.3 (2021-10-08) 59 | 60 | * Fix invalid sceneid parser for Sentinel-1 61 | 62 | ## 0.5.2 (2021-10-06) 63 | 64 | * Fix available `bands` for Sentinel-1 based on Polarisation type (https://github.com/cogeotiff/rio-tiler-pds/pull/59) 65 | 66 | ## 0.5.1 (2021-06-25) 67 | 68 | * fix landsat `sceneid_parser` for Collection 2 Albers dataset (https://github.com/cogeotiff/rio-tiler-pds/pull/56) 69 | * allow `standard` and `albers` collections for Landsat Collection 2 reader (https://github.com/cogeotiff/rio-tiler-pds/pull/58) 70 | 71 | ## 0.5.0 (2021-02-02) 72 | 73 | * add AWS's Landsat Collection 2 support (author @kylebarron, https://github.com/cogeotiff/rio-tiler-pds/pull/42) 74 | * add sentinel-2 product ID parsing (ref: https://github.com/cogeotiff/rio-tiler-pds/pull/33). 75 | * fix issue where the sequence number of a sentinel scene id can be two digit (ref: https://github.com/cogeotiff/rio-tiler-pds/pull/35) 76 | * fix issue where `utm` is only one sigle digit (ref: https://github.com/cogeotiff/rio-tiler-pds/pull/34) 77 | * add top level export (https://github.com/cogeotiff/rio-tiler-pds/issues/45) 78 | * removes `get_object` from top level export 79 | * add deprecation warning in L8Reader (https://github.com/cogeotiff/rio-tiler-pds/issues/40) 80 | 81 | ## 0.4.1 (2020-11-24) 82 | 83 | * update for rio-tiler 2.0.0rc3 84 | 85 | ## 0.4.0 (2020-11-09) 86 | 87 | * update for rio-tiler==2.0.0rc 88 | * internal refactor of the Landsat8 reader 89 | * add `sentinel.aws.sentinel2.S2JP2Reader` and `aws.sentinel2.S2COGReader` proxies to readers. 90 | 91 | ```python 92 | from rio_tiler_pds.sentinel.aws import S2COGReader, S2JP2Reader 93 | 94 | with S2JP2Reader("S2A_L2A_20170729_19UDP_0") as scene: 95 | print(type(scene)) 96 | >>> 97 | 98 | with S2JP2Reader("S2A_L1C_20170729_19UDP_0") as scene: 99 | print(type(scene)) 100 | >>> 101 | 102 | 103 | with S2COGReader("S2A_29RKH_20200219_0_L2A") as scene: 104 | print(type(scene)) 105 | >>> 106 | ``` 107 | 108 | ## 0.3.2 (2020-10-13) 109 | 110 | * add `TMS` options to adapt for rio-tiler 2.0.0b17 (ref: https://github.com/cogeotiff/rio-tiler/pull/285) 111 | 112 | ## 0.3.1 (2020-10-07) 113 | 114 | * remove `pkg_resources` (https://github.com/pypa/setuptools/issues/510) 115 | 116 | ## 0.3.0 (2020-10-03) 117 | 118 | * Update sentinel2-cogs image path (https://github.com/cogeotiff/rio-tiler-pds/pull/22). 119 | * Remove ContextManager requirement in base class and update for rio-tiler 2.0b13 (https://github.com/cogeotiff/rio-tiler/pull/265). 120 | * Add MODIS (PDS and Astraea) dataset (https://github.com/cogeotiff/rio-tiler-pds/issues/18) 121 | * move reader base classes to rio-tiler (https://github.com/cogeotiff/rio-tiler-pds/issues/24) 122 | * add missing `0` (e.g "B1" -> "B01") when user forget it on sentinel and modis band names (https://github.com/cogeotiff/rio-tiler-pds/issues/25) 123 | 124 | 125 | ## 0.2.1 (2020-09-25) 126 | 127 | * add support for CBERS-4A (author @fredliporace) 128 | 129 | ## 0.2.0 (2020-08-31) 130 | * Revert the use of `assets` options to `bands` (#12) 131 | 132 | ```python 133 | from rio_tiler_pds.landsat.aws import L8Reader 134 | 135 | with L8Reader("LC08_L1TP_016037_20170813_20170814_01_RT") as landsat: 136 | # in 0.1.1 (PAST) 137 | tile, data = landsat.tile(x, y, z, assets="B1") 138 | 139 | # in 0.2.0 (NOW) 140 | tile, data = landsat.tile(x, y, z, bands="B1") 141 | ``` 142 | 143 | 144 | ## 0.1.1 (2020-08-28) 145 | 146 | * avoid `nodata` options colision with kwargs in L8Reader 147 | 148 | ## 0.1.0 (2020-08-27) 149 | 150 | Initial release. 151 | 152 | * Move code from rio-tiler 153 | * Update for rio-tiler==2.0b8 (use COGReader and MultiBaseReader) 154 | * Create new Classes (using attrs) and use ContextManager (`with Reader("sceneid") as scene:`) 155 | * Remove Landsat 8 pre-collection support 156 | * Add Sentinel 2 COGs dataset support 157 | * Use TileInfo.json and ProductInfo.json to retrieve Sentinel 1 & 2 bounds 158 | * Use `assets` options instead of `bands` 159 | * Add `expression` options in readers 160 | 161 | #### Readers 162 | ```python 163 | from rio_tiler_pds.landsat.aws import L8Reader 164 | from rio_tiler_pds.sentinel.aws import S1L1CReader 165 | from rio_tiler_pds.sentinel.aws import ( 166 | S2L1CReader, # JPEG2000 167 | S2L2AReader, # JPEG2000 168 | S2L2ACOGReader, # COG 169 | ) 170 | from rio_tiler_pds.cbers.aws import CBERSReader 171 | ``` 172 | 173 | #### Example 174 | ```python 175 | from rio_tiler_pds.landsat.aws import L8Reader 176 | 177 | with L8Reader("LC08_L1TP_016037_20170813_20170814_01_RT") as landsat: 178 | tile, data = landsat.tile(x, y, z, assets="B1") 179 | tile, data = landsat.tile(x, y, z, expression="B1/B2") 180 | ``` 181 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Development - Contributing 2 | 3 | Issues and pull requests are more than welcome: https://github.com/cogeotiff/rio-tiler-pds/issues 4 | 5 | **dev install** 6 | 7 | ```bash 8 | $ git clone https://github.com/cogeotiff/rio-tiler-pds.git 9 | $ cd rio-tiler-pds 10 | $ pip install -e .["test,dev"] 11 | ``` 12 | 13 | You can then run the tests with the following command: 14 | 15 | ```sh 16 | python -m pytest --cov rio_tiler_pds --cov-report term-missing 17 | ``` 18 | 19 | ### pre-commit 20 | 21 | This repo is set to use `pre-commit` to run *isort*, *flake8*, *pydocstring*, *black* ("uncompromising Python code formatter") and mypy when committing new code. 22 | 23 | ```bash 24 | $ pre-commit install 25 | ``` 26 | 27 | ### Docs 28 | 29 | ```sh 30 | pip install rio_tiler_pds["docs"] 31 | ``` 32 | 33 | Hot-reloading docs: 34 | 35 | ```sh 36 | git clone https://github.com/cogeotiff/rio-tiler-pds 37 | cd rio-tiler-pds 38 | mkdocs serve -f docs/mkdocs.yml 39 | ``` 40 | 41 | To manually deploy docs (note you should never need to do this because Github 42 | Actions deploys automatically for new commits.): 43 | 44 | ```sh 45 | mkdocs gh-deploy -f docs/mkdocs.yml 46 | ``` 47 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2017, Mapbox 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | * Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | * Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | * Neither the name of the copyright holder nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /docs/mkdocs.yml: -------------------------------------------------------------------------------- 1 | # Project Information 2 | site_name: 'rio-tiler-pds' 3 | site_description: 'A rio-tiler plugin to access and read Public hosted datasets.' 4 | 5 | docs_dir: 'src' 6 | site_dir: 'build' 7 | 8 | # Repository 9 | repo_name: 'cogeotiff/rio-tiler-pds' 10 | repo_url: 'https://github.com/cogeotiff/rio-tiler-pds' 11 | edit_uri: 'blob/main/src/' 12 | site_url: 'https://cogeotiff.github.io/rio-tiler-pds/' 13 | 14 | # Social links 15 | extra: 16 | social: 17 | - icon: 'fontawesome/brands/github' 18 | link: 'https://github.com/cogeotiff' 19 | - icon: 'fontawesome/brands/twitter' 20 | link: 'https://twitter.com/cogeotiff' 21 | - icon: 'fontawesome/solid/globe' 22 | link: 'https://www.cogeo.org/' 23 | 24 | # Layout 25 | nav: 26 | - Home: 'index.md' 27 | - Usage: 28 | - Overview: usage/overview.md 29 | - Sentinel: usage/sentinel.md 30 | - Landsat Collection 2: usage/landsat-c2.md 31 | - CBERS: usage/cbers.md 32 | - MODIS: usage/modis.md 33 | - Development - Contributing: 'contributing.md' 34 | - Release: 'release-notes.md' 35 | - API: 36 | - Sentinel: API/sentinel.md 37 | - Landsat Collection 2: API/landsat-c2.md 38 | - Landsat: API/landsat.md 39 | - CBERS: API/cbers.md 40 | - MODIS: API/modis.md 41 | 42 | # Theme 43 | theme: 44 | icon: 45 | logo: 'material/home' 46 | repo: 'fontawesome/brands/github' 47 | name: 'material' 48 | language: 'en' 49 | palette: 50 | primary: 'blue' 51 | accent: 'light blue' 52 | font: 53 | text: 'Nunito Sans' 54 | code: 'Fira Code' 55 | 56 | plugins: 57 | - search 58 | - mkapi: 59 | src_dirs: [rio_tiler_pds] 60 | 61 | # Uncomment if I use math in the docs in the future 62 | # extra_javascript: 63 | # - helpers/helpers.js 64 | # - https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX-AMS-MML_HTMLorMML 65 | 66 | # These extensions are chosen to be a superset of Pandoc's Markdown. 67 | # This way, I can write in Pandoc's Markdown and have it be supported here. 68 | # https://pandoc.org/MANUAL.html 69 | markdown_extensions: 70 | - admonition 71 | - attr_list 72 | - codehilite: 73 | guess_lang: false 74 | - def_list 75 | - footnotes 76 | - pymdownx.arithmatex 77 | - pymdownx.betterem 78 | - pymdownx.caret: 79 | insert: false 80 | - pymdownx.details 81 | - pymdownx.emoji 82 | - pymdownx.escapeall: 83 | hardbreak: true 84 | nbsp: true 85 | - pymdownx.magiclink: 86 | hide_protocol: true 87 | repo_url_shortener: true 88 | - pymdownx.smartsymbols 89 | - pymdownx.superfences 90 | - pymdownx.tasklist: 91 | custom_checkbox: true 92 | - pymdownx.tilde 93 | - toc: 94 | permalink: true 95 | -------------------------------------------------------------------------------- /docs/src/API/cbers.md: -------------------------------------------------------------------------------- 1 | ## Readers 2 | 3 | ## ![mkapi](rio_tiler_pds.cbers.aws.cbers4.CBERSReader|strict|all) 4 | 5 | ## Utils 6 | 7 | ## ![mkapi](rio_tiler_pds.cbers.utils.sceneid_parser) 8 | -------------------------------------------------------------------------------- /docs/src/API/landsat-c2.md: -------------------------------------------------------------------------------- 1 | ## Readers 2 | 3 | ## ![mkapi](rio_tiler_pds.landsat.aws.LandsatC2Reader|strict|all) 4 | 5 | ## Utils 6 | 7 | ## ![mkapi](rio_tiler_pds.landsat.utils.sceneid_parser) 8 | -------------------------------------------------------------------------------- /docs/src/API/modis.md: -------------------------------------------------------------------------------- 1 | ## MODIS PDS 2 | 3 | ## ![mkapi](rio_tiler_pds.modis.aws.modis_pds.MODISReader|strict|all) 4 | 5 | ## MODIS ASTRAEA 6 | 7 | ## ![mkapi](rio_tiler_pds.modis.aws.modis_astraea.MODISReader|strict|all) 8 | 9 | ## Utils 10 | 11 | ## ![mkapi](rio_tiler_pds.modis.utils.sceneid_parser) 12 | -------------------------------------------------------------------------------- /docs/src/API/sentinel.md: -------------------------------------------------------------------------------- 1 | # Readers 2 | 3 | ## ![mkapi](rio_tiler_pds.sentinel.aws.sentinel1|strict|all) 4 | 5 | ## ![mkapi](rio_tiler_pds.sentinel.aws.sentinel2|strict|all) 6 | 7 | ## Utils 8 | 9 | ## ![mkapi](rio_tiler_pds.sentinel.utils.s2_sceneid_parser) 10 | ## ![mkapi](rio_tiler_pds.sentinel.utils.s1_sceneid_parser) 11 | -------------------------------------------------------------------------------- /docs/src/contributing.md: -------------------------------------------------------------------------------- 1 | ../../CONTRIBUTING.md -------------------------------------------------------------------------------- /docs/src/index.md: -------------------------------------------------------------------------------- 1 | ../../README.md -------------------------------------------------------------------------------- /docs/src/release-notes.md: -------------------------------------------------------------------------------- 1 | ../../CHANGES.md -------------------------------------------------------------------------------- /docs/src/usage/cbers.md: -------------------------------------------------------------------------------- 1 | ## CBERS 4 - AWS 2 | 3 | Since data are requester pays, we need to set an environment variable to access the data through `rasterio`. 4 | 5 | ```bash 6 | AWS_REQUEST_PAYER="requester" 7 | ``` 8 | 9 | You can either set those variables in your environment or within your code using `rasterio.Env()`. 10 | 11 | ```python 12 | import rasterio 13 | from rio_tiler_pds.cbers.aws import CBERSReader 14 | 15 | CBERS_MUX_SCENE = "CBERS_4_MUX_20171121_057_094_L2" 16 | CBERS_AWFI_SCENE = "CBERS_4_AWFI_20170420_146_129_L2" 17 | CBERS_PAN10M_SCENE = "CBERS_4_PAN10M_20170427_161_109_L4" 18 | CBERS_PAN5M_SCENE = "CBERS_4_PAN5M_20170425_153_114_L4" 19 | 20 | with rasterio.Env(AWS_REQUEST_PAYER="requester"): 21 | with CBERSReader("CBERS_4_MUX_20171121_057_094_L2") as cbers: 22 | print(cbers.bands) 23 | >>> ('B5', 'B6', 'B7', 'B8') 24 | 25 | print(cbers.bounds) 26 | >>> (90480.0, 526840.0, 236940.0, 666560.0) 27 | 28 | print(cbers.geographic_bounds) 29 | >>> (53.3020208330578, 4.756472757234312, 54.628483877373014, 6.025171883475984) 30 | 31 | assert cbers.minzoom == 8 32 | assert cbers.maxzoom == 12 33 | 34 | with rasterio.Env(AWS_REQUEST_PAYER="requester"): 35 | with CBERSReader("CBERS_4_AWFI_20170420_146_129_L2") as cbers: 36 | print(cbers.bands) 37 | >>> ('B13', 'B14', 'B15', 'B16') 38 | 39 | with rasterio.Env(AWS_REQUEST_PAYER="requester"): 40 | with CBERSReader("CBERS_4_PAN10M_20170427_161_109_L4") as cbers: 41 | print(cbers.bands) 42 | >>> ('B2', 'B3', 'B4') 43 | 44 | with rasterio.Env(AWS_REQUEST_PAYER="requester"): 45 | with CBERSReader("CBERS_4_PAN5M_20170425_153_114_L4") as cbers: 46 | print(cbers.bands) 47 | >>> ('B1',) 48 | ``` 49 | -------------------------------------------------------------------------------- /docs/src/usage/landsat-c2.md: -------------------------------------------------------------------------------- 1 | ## Landsat Collection 2 - AWS 2 | 3 | In late 2020, the U.S. Geological Survey (USGS) — the organization that 4 | publishes Landsat data — released Landsat Collection 2. This is a major 5 | reprocessing of the entire Landsat archive. All Landsat data in Collection 2 is 6 | now stored as Cloud-Optimized GeoTIFF (COG)! 7 | 8 | [landsat_c2]: https://www.usgs.gov/core-science-systems/nli/landsat/landsat-collection-2 9 | 10 | Landsat Collection 2 can be accessed directly from an AWS bucket. The USGS maintains the `usgs-landsat` S3 bucket. Keys under the `s3://usgs-landsat/collection02/` prefix are publicly accessible. Note that this bucket is a [requester-pays][aws_requester_pays] bucket, which means that the costs of accessing the data accrue to the _user_, not the _host_. 11 | 12 | [aws_requester_pays]: https://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html 13 | 14 | Since data are requester pays, we need to set an environment variable to access the data through `rasterio`. 15 | 16 | ```bash 17 | AWS_REQUEST_PAYER="requester" 18 | ``` 19 | 20 | You can either set those variables in your environment or within your code using `rasterio.Env()`. 21 | 22 | ```python 23 | import rasterio 24 | from rio_tiler_pds.landsat.aws import LandsatC2Reader 25 | 26 | with rasterio.Env(AWS_REQUEST_PAYER="requester"): 27 | with LandsatC2Reader("LC08_L2SR_093106_20200207_20201016_02_T2") as landsat: 28 | print(landsat.bands) 29 | >>> ('QA_PIXEL', 'QA_RADSAT', 'SR_B1', 'SR_B2', 'SR_B3', 'SR_B4', 'SR_B5', 'SR_B6', 'SR_B7', 'SR_QA_AEROSOL') 30 | assert landsat.minzoom == 5 31 | assert landsat.maxzoom == 12 32 | 33 | print(landsat.info(bands="SR_B1").json(exclude_none=True)) 34 | >>> { 35 | "bounds": [127.54909041630796, -66.70705179185323, 132.96277753047164, -64.4554629843337], 36 | "minzoom": 5, 37 | "maxzoom": 12, 38 | "band_metadata": [["SR_B1", {}]], 39 | "band_descriptions": [["SR_B1", ""]], 40 | "dtype": "uint16", 41 | "nodata_type": "Nodata", 42 | "colorinterp": ["gray"] 43 | } 44 | 45 | print(landsat.statistics(bands="SR_B1")["SR_B1"].json()) 46 | >>> { 47 | "min": 2487.0, 48 | "max": 53345.0, 49 | "mean": 21039.126798561152, 50 | "count": 8896.0, 51 | "sum": 187164072.0, 52 | "std": 16484.450981447077, 53 | "median": 10978.0, 54 | "majority": 8233.0, 55 | "minority": 2487.0, 56 | "unique": 5932.0, 57 | "histogram": [ 58 | [594.0, 4181.0, 603.0, 557.0, 296.0, 207.0, 296.0, 469.0, 615.0, 1078.0], 59 | [2487.0, 7572.8, 12658.6, 17744.4, 22830.2, 27916.0, 33001.8, 38087.6, 43173.4, 48259.200000000004, 53345.0] 60 | ], 61 | "valid_percent": 54.3, 62 | "masked_pixels": 7488.0, 63 | "valid_pixels": 8896.0, 64 | "percentile_98": 52178.1, 65 | "percentile_2": 7367.9 66 | } 67 | 68 | tile_z = 8 69 | tile_x = 218 70 | tile_y = 188 71 | img = landsat.tile(tile_x, tile_y, tile_z, bands=("SR_B4", "SR_B3", "SR_B2")) 72 | assert img.data.shape == (3, 256, 256) 73 | 74 | img = landsat.tile(tile_x, tile_y, tile_z, bands="SR_B5") 75 | assert img.data.shape == (1, 256, 256) 76 | 77 | img = landsat.tile( 78 | tile_x, tile_y, tile_z, expression="SR_B5*0.8, SR_B4*1.1, SR_B3*0.8" 79 | ) 80 | assert img.data.shape == (3, 256, 256) 81 | 82 | img = landsat.preview( 83 | bands=("SR_B4", "SR_B3", "SR_B2"), pan=True, width=256, height=256 84 | ) 85 | assert img.data.shape == (3, 256, 256) 86 | ``` 87 | -------------------------------------------------------------------------------- /docs/src/usage/modis.md: -------------------------------------------------------------------------------- 1 | ## MODIS - AWS 2 | 3 | ### PDS (modis-pds bucket) 4 | 5 | **Products**: MCD43A4, MOD09GQ, MYD09GQ, MOD09GA, MYD09GA 6 | 7 | ```python 8 | from rio_tiler_pds.modis.aws import MODISPDSReader 9 | 10 | MCD43A4_SCENE = "MCD43A4.A2017006.h21v11.006.2017018074804" 11 | with MODISPDSReader(MCD43A4_SCENE) as modis: 12 | print(modis.bands) 13 | >>> ("B01", "B01qa", "B02", "B02qa", "B03", "B03qa", "B04", "B04qa", "B05", "B05qa", "B06", "B06qa", "B07", "B07qa") 14 | 15 | print(modis.bounds) 16 | >>> (31.9253, -30.0, 46.1976, -20.0) 17 | 18 | assert modis.minzoom == 4 19 | assert modis.maxzoom == 9 20 | 21 | MOD09GA_SCENE = "MOD09GA.A2017129.h34v07.006.2017137214839" 22 | with MODISPDSReader(MOD09GA_SCENE) as modis: 23 | print(modis.bands) 24 | >>> ("B01", "B02", "B03", "B04", "B05", "B06", "B07", "geoflags", "granule", "numobs1km", "numobs500m", "obscov", "obsnum", "orbit", "qc500m", "qscan", "range", "senaz", "senzen", "solaz", "solzen", "state") 25 | 26 | MOD09GQ_SCENE = "MOD09GQ.A2017120.h29v09.006.2017122031126" 27 | with MODISPDSReader(MOD09GQ_SCENE) as modis: 28 | print(modis.bands) 29 | >>> ("B01", "B02", "granule", "numobs", "obscov", "obsnum", "orbit", "qc") 30 | ``` 31 | 32 | ### ASTRAEA (astraea-opendata bucket) 33 | 34 | **Products**: MCD43A4, MOD11A1, MOD13A1, MYD11A1 MYD13A1 35 | 36 | ```python 37 | from rio_tiler_pds.modis.aws import MODISASTRAEAReader 38 | 39 | MCD43A4_SCENE = "MCD43A4.A2017006.h21v11.006.2017018074804" 40 | with MODISASTRAEAReader(MCD43A4_SCENE) as modis: 41 | print(modis.bands) 42 | >>> ("B01", "B01qa", "B02", "B02qa", "B03", "B03qa", "B04", "B04qa", "B05", "B05qa", "B06", "B06qa", "B07", "B07qa") 43 | 44 | print(modis.bounds) 45 | >>> (31.9253, -30.0, 46.1976, -20.0) 46 | 47 | assert modis.minzoom == 4 48 | assert modis.maxzoom == 9 49 | 50 | MOD11A1_SCENE = "MOD11A1.A2020250.h20v11.006.2020251085003" 51 | with MODISASTRAEAReader(MOD11A1_SCENE) as modis: 52 | print(modis.bands) 53 | >>> ("B01", "B02", "B03", "B04", "B05", "B06", "B07", "B08", "B09", "B10", "B11", "B12") 54 | 55 | MOD13A1_SCENE = "MOD13A1.A2020049.h14v04.006.2020066002045" 56 | with MODISASTRAEAReader(MOD13A1_SCENE) as modis: 57 | print(modis.bands) 58 | >>> ("B01", "B02", "B03", "B04", "B05", "B06", "B07", "B08", "B09", "B10", "B11", "B12") 59 | ``` 60 | -------------------------------------------------------------------------------- /docs/src/usage/overview.md: -------------------------------------------------------------------------------- 1 | # Usage 2 | 3 | The neighboring documentation pages include more information about each specific dataset, plus an example. 4 | 5 | ## Requester-Pays 6 | 7 | Some data are stored on AWS requester-pays buckets (you are charged for LIST/GET requests and data transfer outside the bucket region). For those datasets you need to set `AWS_REQUEST_PAYER="requester"` environement variable to tell AWS S3 that you agree with requester-pays principle. 8 | 9 | You can either set those variables in your environment or within your code using `rasterio.Env()`. 10 | 11 | ```python 12 | import rasterio 13 | from rio_tiler_pds.sentinel.aws import S2JP2Reader 14 | 15 | with rasterio.Env(AWS_REQUEST_PAYER="requester"): 16 | with S2JP2Reader("S2A_L1C_20170729_19UDP_0") as s2: 17 | print(s2.preview(bands="B01", width=64, height=64, max_size=None)) 18 | ``` 19 | -------------------------------------------------------------------------------- /docs/src/usage/sentinel.md: -------------------------------------------------------------------------------- 1 | ## Sentinel 2 - AWS 2 | 3 | ### L1C - JPEG2000 4 | 5 | !!! warnings 6 | 7 | :warning: JPEG2000 format is not `Cloud Optimized`, numerous GET requests will be needed to read such format 8 | which could result in important cost. 9 | 10 | bands: `B01, B02, B03, B04, B05, B06, B07, B08, B09, B11, B12, B8A` 11 | 12 | ```python 13 | import rasterio 14 | from rio_tiler_pds.sentinel.aws import S2JP2Reader 15 | 16 | # We use __enter__ context manager for the Reader. 17 | # When creating the instance of `sentinel` the Reader will fetch the sentinel 2 TileInfo.json 18 | # to retrieve the bounds of the dataset and other metadata available at `sentinel.tileInfo`. 19 | with rasterio.Env(AWS_REQUEST_PAYER="requester"): 20 | with S2JP2Reader("S2A_L1C_20170729_19UDP_0") as sentinel: 21 | # bounds and metadata are derived from the tileInfo.json file stored with the JPEG2000 22 | print(type(sentinel)) 23 | >>> 24 | 25 | print(type(sentinel.tileInfo)) 26 | >>> 27 | 28 | print(type(sentinel.datageom)) 29 | >>> 30 | 31 | print(sentinel.bands) 32 | >>> ('B01', 33 | 'B02', 34 | 'B03', 35 | 'B04', 36 | 'B05', 37 | 'B06', 38 | 'B07', 39 | 'B08', 40 | 'B09', 41 | 'B11', 42 | 'B12', 43 | 'B8A') 44 | 45 | print(sentinel.info(bands="B01").json(exclude_none=True)) 46 | >>> { 47 | 'bounds': [-69.98971880792764, 47.761069480166995, -68.86723101847079, 48.75300221903151], 48 | 'minzoom': 8, 49 | 'maxzoom': 14, 50 | 'band_metadata': [["B01", {}]], 51 | 'band_descriptions': [["B01", {}]], 52 | 'dtype': 'uint16', 53 | 'nodata_type': 'Nodata', 54 | 'colorinterp': ['gray'] 55 | } 56 | 57 | print(sentinel.statistics(bands="B8A")["B8A"].json()) 58 | >>> { 59 | 'min': 1.0, 60 | 'max': 19753.0, 61 | 'mean': 2873.8173758756675, 62 | 'count': 653216.0, 63 | 'sum': 1877223491.0, 64 | 'std': 2680.2546389126283, 65 | 'median': 2919.0, 66 | 'majority': 117.0, 67 | 'minority': 9913.0, 68 | 'unique': 11767.0, 69 | 'histogram': [ 70 | [281576.0, 154185.0, 130600.0, 49758.0, 30001.0, 6851.0, 242.0, 1.0, 1.0, 1.0], 71 | [1.0, 1976.2, 3951.4, 5926.6, 7901.8, 9877.0, 11852.2, 13827.4, 15802.6, 17777.8, 19753.0] 72 | ], 73 | 'valid_percent': 62.3, 74 | 'masked_pixels': 395360.0, 75 | 'valid_pixels': 653216.0, 76 | 'percentile_98': 9320.699999999953, 77 | 'percentile_2': 106.0 78 | } 79 | 80 | img = sentinel.tile(77, 89, 8, bands="B01") 81 | assert img.data.shape == (1, 256, 256) 82 | 83 | print(sentinel.point(-69.41, 48.25, bands=("B01", "B02"))) 84 | >> PointData( 85 | array=masked_array(data=[1201, 843], mask=[False, False], fill_value=999999, dtype=uint16), 86 | band_names=['B01', 'B02'], 87 | coordinates=(-69.41, 48.25), 88 | crs=CRS.from_epsg(4326), 89 | assets=[ 90 | 's3://sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/B01.jp2', 91 | 's3://sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/B02.jp2' 92 | ], 93 | metadata={} 94 | ) 95 | 96 | # Working with Expression 97 | img = sentinel.tile(77, 89, 8, expression="B01/B02") 98 | assert igm.data.shape == (1, 256, 256) 99 | 100 | print(sentinel.point(-69.41, 48.25, expression="B01/B02")) 101 | >> PointData( 102 | array=masked_array(data=[1.424673784104389], mask=[False], fill_value=999999, dtype=float32), 103 | band_names=['B01/B02'], 104 | coordinates=(-69.41, 48.25), 105 | crs=CRS.from_epsg(4326), 106 | assets=[ 107 | 's3://sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/B01.jp2', 108 | 's3://sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/B02.jp2' 109 | ], 110 | metadata={} 111 | ) 112 | ``` 113 | 114 | ### L2A - JPEG2000 115 | 116 | !!! warnings 117 | 118 | :warning: JPEG2000 format is not `Cloud Optimized`, numerous GET requests will be needed to read such format 119 | which could result in important cost. 120 | 121 | bands: `B01, B02, B03, B04, B05, B06, B07, B08, B09, B11, B12, B8A` 122 | 123 | Note: `AOT, SCL, WVP` bands are not supported. 124 | 125 | ```python 126 | import rasterio 127 | from rio_tiler_pds.sentinel.aws import S2JP2Reader 128 | 129 | with rasterio.Env(AWS_REQUEST_PAYER="requester"): 130 | with S2JP2Reader("S2A_L2A_20170729_19UDP_0") as sentinel: 131 | # bounds and metadata are derived from the tileInfo.json file stored with the JPEG2000 132 | print(type(sentinel)) 133 | >>> 134 | 135 | print(type(sentinel.tileInfo)) 136 | >>> dict 137 | 138 | print(type(sentinel.datageom)) 139 | >>> dict 140 | 141 | print(sentinel.info(bands="B01").dict(exclude_none=True)) 142 | >>> { 143 | "bounds": [-69.98831359398795, 47.7610811323474, -68.86723101847079, 48.75300225264652], 144 | "minzoom": 8, 145 | "maxzoom": 14, 146 | "band_metadata": [["B01", {}]], 147 | "band_descriptions": [["B01", ""]], 148 | "dtype": "uint16", 149 | "nodata_type": "Nodata", 150 | "colorinterp": ["gray"] 151 | } 152 | ``` 153 | 154 | ### COG (Only L2A available for now) 155 | 156 | bands: `B01, B02, B03, B04, B05, B06, B07, B08, B09, B11, B12, B8A` 157 | 158 | Note: `AOT, SCL, WVP` STAC assets are not supported. 159 | 160 | Notes: 161 | 162 | - the `B10` band is the cirrus band and is only supported for L1C, not L2A. 163 | - the `sentinel-2-l2a-cogs` is a public dataset, no AWS credential should be needed. 164 | 165 | ```python 166 | from rio_tiler_pds.sentinel.aws import S2COGReader 167 | 168 | with S2COGReader("S2A_29RKH_20200219_0_L2A") as sentinel: 169 | print(type(sentinel)) 170 | >>> 171 | 172 | print(sentinel.bands) 173 | >>> ('B01', 'B02', 'B03', 'B04', 'B05', 'B06', 'B07', 'B08', 'B09', 'B11', 'B12', 'B8A') 174 | 175 | # bounds and metadata are derived from the STAC item stored with the COG 176 | print(type(sentinel.stac_item)) 177 | >>> dict 178 | ``` 179 | 180 | ## Sentinel 1 - AWS 181 | 182 | ```python 183 | import rasterio 184 | from rio_tiler_pds.sentinel.aws import S1L1CReader 185 | 186 | with rasterio.Env(AWS_REQUEST_PAYER="requester"): 187 | with S1L1CReader("S1A_IW_GRDH_1SDV_20180716T004042_20180716T004107_022812_02792A_FD5B") as sentinel: 188 | print(sentinel.bands) 189 | > ('vv', 'vh') 190 | 191 | print(sentine.bounds) 192 | > (75.605247, 9.225784, 78.203903, 11.190425) 193 | 194 | print(type(sentinel.productInfo)) 195 | > dict 196 | 197 | print(sentinel._get_band_url("vv")) 198 | > 's3://sentinel-s1-l1c/GRD/2018/7/16/IW/DV/S1A_IW_GRDH_1SDV_20180716T004042_20180716T004107_022812_02792A_FD5B/measurement/iw-vv.tiff' 199 | ``` 200 | 201 | 202 | !!! Important 203 | 204 | For most dataset hosted on AWS you will need to have AWS credentials available in your environment. 205 | -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [project] 2 | name = "rio-tiler-pds" 3 | description = "Get mercator tile from cloud hosted dataset such as CBERS-4, Sentinel-2, Sentinel-1 and Landsat-8 AWS PDS." 4 | readme = "README.md" 5 | requires-python = ">=3.8" 6 | license = {file = "LICENSE.txt"} 7 | authors = [ 8 | {name = "Vincent Sarago", email = "vincent@developmentseed.com"}, 9 | ] 10 | keywords = ["COGEO", "Cloud Optimized Geotiff", "AWS PDS"] 11 | classifiers = [ 12 | "Intended Audience :: Information Technology", 13 | "Intended Audience :: Science/Research", 14 | "License :: OSI Approved :: MIT License", 15 | "Programming Language :: Python :: 3.8", 16 | "Programming Language :: Python :: 3.9", 17 | "Programming Language :: Python :: 3.10", 18 | "Programming Language :: Python :: 3.11", 19 | "Programming Language :: Python :: 3.12", 20 | "Programming Language :: Python :: 3.13", 21 | "Topic :: Scientific/Engineering :: GIS", 22 | "Typing :: Typed", 23 | ] 24 | dynamic = ["version"] 25 | dependencies = ["rio-tiler>=7.0,<8.0", "boto3"] 26 | 27 | [project.optional-dependencies] 28 | test = ["pytest", "pytest-cov"] 29 | dev = ["pre-commit"] 30 | docs = ["mkdocs", "mkdocs-material", "pygments", "mkapi"] 31 | 32 | [project.urls] 33 | Source = "https://github.com/cogeotiff/rio-tiler-pds" 34 | Documentation = "https://cogeotiff.github.io/rio-tiler-pds/" 35 | 36 | [build-system] 37 | requires = ["flit>=3.2,<4"] 38 | build-backend = "flit_core.buildapi" 39 | 40 | [tool.flit.module] 41 | name = "rio_tiler_pds" 42 | 43 | [tool.flit.sdist] 44 | exclude = [ 45 | "tests/", 46 | "docs/", 47 | ".github/", 48 | "CHANGELOG.md", 49 | "CONTRIBUTING.md", 50 | ] 51 | 52 | [tool.coverage.run] 53 | branch = true 54 | parallel = true 55 | 56 | [tool.coverage.report] 57 | exclude_lines = [ 58 | "no cov", 59 | "if __name__ == .__main__.:", 60 | "if TYPE_CHECKING:", 61 | ] 62 | 63 | [tool.isort] 64 | profile = "black" 65 | known_first_party = ["rio_tiler", "rio_tiler_pds", "rio_toa"] 66 | known_third_party = ["rasterio","morecantile"] 67 | default_section = "THIRDPARTY" 68 | 69 | [tool.mypy] 70 | no_strict_optional = "True" 71 | 72 | [tool.ruff.lint] 73 | select = [ 74 | "D1", # pydocstyle errors 75 | "E", # pycodestyle errors 76 | "W", # pycodestyle warnings 77 | "C", # flake8-comprehensions 78 | "B", # flake8-bugbear 79 | ] 80 | ignore = [ 81 | "E501", # line too long, handled by black 82 | "B008", # do not perform function calls in argument defaults 83 | "B905", # ignore zip() without an explicit strict= parameter, only support with python >3.10 84 | ] 85 | 86 | 87 | [tool.bumpversion] 88 | current_version = "0.11.1" 89 | search = "{current_version}" 90 | replace = "{new_version}" 91 | regex = false 92 | tag = true 93 | commit = true 94 | tag_name = "{new_version}" 95 | 96 | [[tool.bumpversion.files]] 97 | filename = "rio_tiler_pds/__init__.py" 98 | search = '__version__ = "{current_version}"' 99 | replace = '__version__ = "{new_version}"' 100 | -------------------------------------------------------------------------------- /rio_tiler_pds/__init__.py: -------------------------------------------------------------------------------- 1 | """rio-tiler-pds.""" 2 | 3 | from . import cbers, landsat, modis, sentinel # noqa 4 | 5 | __version__ = "0.11.1" 6 | -------------------------------------------------------------------------------- /rio_tiler_pds/cbers/__init__.py: -------------------------------------------------------------------------------- 1 | """rio-tiler-pds.cbers""" 2 | 3 | from rio_tiler_pds.cbers import aws # noqa 4 | from rio_tiler_pds.cbers.utils import sceneid_parser # noqa 5 | -------------------------------------------------------------------------------- /rio_tiler_pds/cbers/aws/__init__.py: -------------------------------------------------------------------------------- 1 | """rio-tiler-pds.cbers""" 2 | 3 | from rio_tiler_pds.cbers.aws.cbers4 import CBERSReader # noqa 4 | -------------------------------------------------------------------------------- /rio_tiler_pds/cbers/aws/cbers4.py: -------------------------------------------------------------------------------- 1 | """AWS CBERS 4 reader.""" 2 | 3 | from typing import Dict, Type 4 | 5 | import attr 6 | from morecantile import TileMatrixSet 7 | 8 | from rio_tiler.constants import WEB_MERCATOR_TMS 9 | from rio_tiler.errors import InvalidBandName 10 | from rio_tiler.io import MultiBandReader, Reader 11 | from rio_tiler_pds.cbers.utils import sceneid_parser 12 | 13 | 14 | @attr.s 15 | class CBERSReader(MultiBandReader): 16 | """AWS Public Dataset CBERS 4 reader. 17 | 18 | Args: 19 | sceneid (str): CBERS 4 sceneid. 20 | 21 | Attributes: 22 | scene_params (dict): scene id parameters. 23 | bands (tuple): list of available bands (default is defined for each sensor). 24 | 25 | Examples: 26 | >>> with CBERSReader('CBERS_4_AWFI_20170420_146_129_L2') as scene: 27 | print(scene.bounds) 28 | 29 | """ 30 | 31 | input: str = attr.ib() 32 | tms: TileMatrixSet = attr.ib(default=WEB_MERCATOR_TMS) 33 | 34 | minzoom: int = attr.ib(default=None) 35 | maxzoom: int = attr.ib(default=None) 36 | 37 | reader: Type[Reader] = attr.ib(default=Reader) 38 | reader_options: Dict = attr.ib(factory=dict) 39 | 40 | _scheme: str = "s3" 41 | bucket: str = attr.ib(default="cbers-pds") 42 | prefix_pattern: str = attr.ib( 43 | default="CBERS{mission}/{instrument}/{path}/{row}/{scene}" 44 | ) 45 | 46 | def __attrs_post_init__(self): 47 | """Fetch Reference band to get the bounds.""" 48 | self.scene_params = sceneid_parser(self.input) 49 | self.bands = self.scene_params["bands"] 50 | 51 | ref = self._get_band_url(self.scene_params["reference_band"]) 52 | with self.reader(ref, tms=self.tms, **self.reader_options) as cog: 53 | self.bounds = cog.bounds 54 | self.crs = cog.crs 55 | self.minzoom = cog.minzoom 56 | self.maxzoom = cog.maxzoom 57 | 58 | def _get_band_url(self, band: str) -> str: 59 | """Validate band's name and return band's url.""" 60 | if band not in self.bands: 61 | raise InvalidBandName(f"{band} is not valid") 62 | 63 | prefix = self.prefix_pattern.format(**self.scene_params) 64 | band = band.replace("B", "BAND") 65 | return f"{self._scheme}://{self.bucket}/{prefix}/{self.input}_{band}.tif" 66 | -------------------------------------------------------------------------------- /rio_tiler_pds/cbers/utils.py: -------------------------------------------------------------------------------- 1 | """CBERS utility functions.""" 2 | 3 | import re 4 | from typing import Any, Dict 5 | 6 | from rio_tiler_pds.errors import InvalidCBERSSceneId 7 | 8 | 9 | def sceneid_parser(sceneid: str) -> Dict: 10 | """Parse CBERS 4/4A scene id. 11 | 12 | Args: 13 | sceneid (str): CBERS 4/4A sceneid. 14 | 15 | Returns: 16 | dict: dictionary with metadata constructed from the sceneid. 17 | 18 | Raises: 19 | InvalidCBERSSceneId: If `sceneid` doesn't match the regex schema. 20 | 21 | Examples: 22 | >>> sceneid_parser('CBERS_4_MUX_20171121_057_094_L2') 23 | 24 | """ 25 | if not re.match(r"^CBERS_(4|4A)_\w+_[0-9]{8}_[0-9]{3}_[0-9]{3}_L\w+$", sceneid): 26 | raise InvalidCBERSSceneId("Could not match {}".format(sceneid)) 27 | 28 | cbers_pattern = ( 29 | r"(?P\w+)_" 30 | r"(?P\w+)" 31 | r"_" 32 | r"(?P\w+)" 33 | r"_" 34 | r"(?P[0-9]{4})" 35 | r"(?P[0-9]{2})" 36 | r"(?P[0-9]{2})" 37 | r"_" 38 | r"(?P[0-9]{3})" 39 | r"_" 40 | r"(?P[0-9]{3})" 41 | r"_" 42 | r"(?PL\w+)$" 43 | ) 44 | 45 | meta: Dict[str, Any] = re.match(cbers_pattern, sceneid, re.IGNORECASE).groupdict() # type: ignore 46 | meta["scene"] = sceneid 47 | meta["date"] = "{}-{}-{}".format( 48 | meta["acquisitionYear"], meta["acquisitionMonth"], meta["acquisitionDay"] 49 | ) 50 | 51 | instrument = meta["instrument"] 52 | # Bands ids for CB4 and CB4A MUX and WFI/AWFI cameras are the same 53 | # so we do not need to index this dict by mission 54 | instrument_params = { 55 | "MUX": { 56 | "reference_band": "B6", 57 | "bands": ("B5", "B6", "B7", "B8"), 58 | "rgb": ("B7", "B6", "B5"), 59 | }, 60 | "AWFI": { 61 | "reference_band": "B14", 62 | "bands": ("B13", "B14", "B15", "B16"), 63 | "rgb": ("B15", "B14", "B13"), 64 | }, 65 | "PAN10M": { 66 | "reference_band": "B4", 67 | "bands": ("B2", "B3", "B4"), 68 | "rgb": ("B3", "B4", "B2"), 69 | }, 70 | "PAN5M": {"reference_band": "B1", "bands": ("B1",), "rgb": ("B1", "B1", "B1")}, 71 | "WFI": { 72 | "reference_band": "B14", 73 | "bands": ("B13", "B14", "B15", "B16"), 74 | "rgb": ("B15", "B14", "B13"), 75 | }, 76 | "WPM": { 77 | "reference_band": "B2", 78 | "bands": ("B0", "B1", "B2", "B3", "B4"), 79 | "rgb": ("B3", "B2", "B1"), 80 | }, 81 | } 82 | meta["reference_band"] = instrument_params[instrument]["reference_band"] 83 | meta["bands"] = instrument_params[instrument]["bands"] 84 | meta["rgb"] = instrument_params[instrument]["rgb"] 85 | 86 | return meta 87 | -------------------------------------------------------------------------------- /rio_tiler_pds/copernicus/__init__.py: -------------------------------------------------------------------------------- 1 | """rio-tiler-pds.copernicus""" 2 | 3 | from rio_tiler_pds.copernicus import aws # noqa 4 | -------------------------------------------------------------------------------- /rio_tiler_pds/copernicus/aws/__init__.py: -------------------------------------------------------------------------------- 1 | """AWS copernicus dem readers""" 2 | 3 | from .dem import Dem30Reader, Dem90Reader # noqa 4 | -------------------------------------------------------------------------------- /rio_tiler_pds/copernicus/aws/dem.py: -------------------------------------------------------------------------------- 1 | """Copernicus DEM Mosaic Reader. 2 | 3 | https://registry.opendata.aws/copernicus-dem/ 4 | """ 5 | 6 | import json 7 | import math 8 | from typing import Any, Dict, List, Optional, Tuple, Type 9 | 10 | import attr 11 | from morecantile import TileMatrixSet 12 | from rasterio.crs import CRS 13 | from rasterio.errors import RasterioIOError 14 | from rasterio.warp import transform as transform_coords 15 | from rasterio.warp import transform_bounds 16 | 17 | from rio_tiler.constants import MAX_THREADS, WEB_MERCATOR_TMS, WGS84_CRS 18 | from rio_tiler.errors import PointOutsideBounds, TileOutsideBounds 19 | from rio_tiler.io import BaseReader, Reader 20 | from rio_tiler.models import BandStatistics, ImageData, Info, PointData 21 | from rio_tiler.mosaic import mosaic_point_reader, mosaic_reader 22 | from rio_tiler.types import BBox 23 | from rio_tiler.utils import CRS_to_uri 24 | 25 | 26 | @attr.s 27 | class Dem30Reader(BaseReader): 28 | """Simple Mosaic reader for copernicus DEM""" 29 | 30 | input: str = attr.ib(default="copernicus-dem-30m") 31 | 32 | tms: TileMatrixSet = attr.ib(default=WEB_MERCATOR_TMS) 33 | 34 | minzoom: int = attr.ib(default=7) 35 | maxzoom: int = attr.ib(default=8) 36 | 37 | bounds: BBox = attr.ib(init=False, default=(-180, -90, 180, 90)) 38 | crs: CRS = attr.ib(init=False, default=WGS84_CRS) 39 | 40 | reader: Type[Reader] = attr.ib(default=Reader) 41 | reader_options: Dict = attr.ib(factory=dict) 42 | 43 | colormap: Dict = attr.ib(init=False, factory=dict) 44 | 45 | _scheme: str = "s3" 46 | bucket: str = attr.ib(default="copernicus-dem-30m") 47 | prefix_pattern: str = attr.ib( 48 | default="Copernicus_DSM_COG_10_{northsouth}{lat:02d}_00_{eastwest}{lon:03d}_00_DEM/Copernicus_DSM_COG_10_{northsouth}{lat:02d}_00_{eastwest}{lon:03d}_00_DEM" 49 | ) 50 | 51 | def tile( 52 | self, 53 | tile_x: int, 54 | tile_y: int, 55 | tile_z: int, 56 | reverse: bool = False, 57 | threads: int = MAX_THREADS, 58 | **kwargs: Any, 59 | ) -> ImageData: 60 | """Get Tile.""" 61 | assets = self.assets_for_tile(tile_x, tile_y, tile_z) 62 | mosaic_assets = list(reversed(assets)) if reverse else assets 63 | 64 | def _reader( 65 | asset: str, tile_x: int, tile_y: int, tile_z: int, **kwargs: Any 66 | ) -> ImageData: 67 | with Reader(asset, tms=self.tms) as src: 68 | return src.tile(tile_x, tile_y, tile_z, **kwargs) 69 | 70 | return mosaic_reader( 71 | mosaic_assets, 72 | _reader, 73 | tile_x, 74 | tile_y, 75 | tile_z, 76 | threads=threads, 77 | allowed_exceptions=(TileOutsideBounds, RasterioIOError), 78 | **kwargs, 79 | )[0] 80 | 81 | def point( 82 | self, 83 | lon: float, 84 | lat: float, 85 | coord_crs: CRS = WGS84_CRS, 86 | reverse: bool = False, 87 | threads: int = MAX_THREADS, 88 | **kwargs: Any, 89 | ) -> PointData: 90 | """Get Point value.""" 91 | assets = self.assets_for_point(lon, lat, coord_crs=coord_crs) 92 | mosaic_assets = list(reversed(assets)) if reverse else assets 93 | 94 | def _reader(asset: str, lon: float, lat: float, **kwargs) -> PointData: 95 | with Reader(asset, tms=self.tms) as src: 96 | return src.point(lon, lat, **kwargs) 97 | 98 | return mosaic_point_reader( 99 | mosaic_assets, 100 | _reader, 101 | lon, 102 | lat, 103 | threads=threads, 104 | allowed_exceptions=(PointOutsideBounds, RasterioIOError), 105 | **kwargs, 106 | )[0] 107 | 108 | def info(self) -> Info: 109 | """info.""" 110 | meta = { 111 | "bounds": self.bounds, 112 | "crs": CRS_to_uri(self.crs) or self.crs.to_wkt(), 113 | "band_metadata": [("b1", {})], 114 | "band_descriptions": [("b1", "")], 115 | "dtype": "float32", 116 | "colorinterp": ["grey"], 117 | "nodata_type": "None", 118 | "driver": "GTiff", 119 | "count": 1, 120 | } 121 | return Info(**meta) 122 | 123 | def statistics(self, **kwargs: Any) -> Dict[str, BandStatistics]: 124 | """Return Dataset's statistics.""" 125 | # FOR NOW WE ONLY RETURN VALUE FROM THE FIRST FILE 126 | dataset = self.prefix_pattern.format(northsouth="N", eastwest="E", lat=0, lon=6) 127 | with Reader(f"{self._scheme}://{self.bucket}/{dataset}.tif") as src: 128 | return src.statistics(**kwargs) 129 | 130 | ############################################################################ 131 | # Not Implemented methods 132 | # BaseReader required those method to be implemented 133 | def preview(self, *args, **kwargs): 134 | """Placeholder for BaseReader.preview.""" 135 | raise NotImplementedError 136 | 137 | def part(self, *args, **kwargs): 138 | """Placeholder for BaseReader.part.""" 139 | raise NotImplementedError 140 | 141 | def feature(self, *args, **kwargs): 142 | """Placeholder for BaseReader.feature.""" 143 | raise NotImplementedError 144 | 145 | def assets_for_tile(self, x: int, y: int, z: int) -> List[str]: 146 | """Retrieve assets for tile.""" 147 | xmin, ymin, xmax, ymax = self.tms.bounds(x, y, z) 148 | return self.assets_for_bbox( 149 | xmin, ymin, xmax, ymax, coord_crs=self.tms.rasterio_geographic_crs 150 | ) 151 | 152 | def assets_for_bbox( 153 | self, 154 | xmin: float, 155 | ymin: float, 156 | xmax: float, 157 | ymax: float, 158 | coord_crs: Optional[CRS] = WGS84_CRS, 159 | ) -> List[str]: 160 | """Retrieve assets for bbox.""" 161 | if coord_crs != WGS84_CRS: 162 | xmin, ymin, xmax, ymax = transform_bounds( 163 | coord_crs, 164 | WGS84_CRS, 165 | xmin, 166 | ymin, 167 | xmax, 168 | ymax, 169 | ) 170 | 171 | xmin = int(xmin + 360) 172 | xmax = int(xmax + 360) 173 | ymax = int(ymax + 180) 174 | ymin = int(ymin + 180) 175 | 176 | files = [] 177 | for x in range(xmin, xmax + 1, 1): 178 | for y in range(ymin, ymax + 1, 1): 179 | lon = x - 360 180 | lat = y - 180 181 | files.append(self._get_dataset_url(lon, lat)) 182 | 183 | return files 184 | 185 | def assets_for_point( 186 | self, 187 | lon: float, 188 | lat: float, 189 | coord_crs: CRS = WGS84_CRS, 190 | ) -> List[str]: 191 | """Retrieve assets for point.""" 192 | if coord_crs != WGS84_CRS: 193 | xs, ys = transform_coords(coord_crs, WGS84_CRS, [lon], [lat]) 194 | lon, lat = xs[0], ys[0] 195 | 196 | return [self._get_dataset_url(lon, lat)] 197 | 198 | def _get_dataset_url(self, lon: float, lat: float) -> str: 199 | """Return dataset url.""" 200 | northsouth = "N" if lat >= 0 else "S" 201 | eastwest = "W" if lon < 0 else "E" 202 | 203 | lat = abs(math.floor(lat)) 204 | lon = abs(math.floor(lon)) 205 | 206 | dataset = self.prefix_pattern.format( 207 | northsouth=northsouth, eastwest=eastwest, lat=lat, lon=lon 208 | ) 209 | return f"{self._scheme}://{self.bucket}/{dataset}.tif" 210 | 211 | 212 | @attr.s 213 | class Dem90Reader(Dem30Reader): 214 | """Simple Mosaic reader for copernicus DEM""" 215 | 216 | input: str = attr.ib(default="copernicus-dem-90m") 217 | 218 | tms: TileMatrixSet = attr.ib(default=WEB_MERCATOR_TMS) 219 | 220 | minzoom: int = attr.ib(default=6) 221 | maxzoom: int = attr.ib(default=7) 222 | 223 | bounds: BBox = attr.ib(init=False, default=(-180, -90, 180, 90)) 224 | crs: CRS = attr.ib(init=False, default=WGS84_CRS) 225 | 226 | reader: Type[Reader] = attr.ib(default=Reader) 227 | reader_options: Dict = attr.ib(factory=dict) 228 | 229 | colormap: Dict = attr.ib(init=False, factory=dict) 230 | 231 | _scheme: str = "s3" 232 | bucket: str = attr.ib(default="copernicus-dem-90m") 233 | prefix_pattern: str = attr.ib( 234 | default="Copernicus_DSM_COG_30_{northsouth}{lat:02d}_00_{eastwest}{lon:03d}_00_DEM/Copernicus_DSM_COG_30_{northsouth}{lat:02d}_00_{eastwest}{lon:03d}_00_DEM" 235 | ) 236 | 237 | def statistics(self, **kwargs: Any) -> Dict[str, BandStatistics]: 238 | """Return Dataset's statistics.""" 239 | # FOR NOW WE ONLY RETURN VALUE FROM THE FIRST FILE 240 | dataset = self.prefix_pattern.format( 241 | northsouth="S", eastwest="W", lat=90, lon=164 242 | ) 243 | with Reader(f"{self._scheme}://{self.bucket}/{dataset}.tif") as src: 244 | return src.statistics(**kwargs) 245 | -------------------------------------------------------------------------------- /rio_tiler_pds/errors.py: -------------------------------------------------------------------------------- 1 | """Errors and warnings.""" 2 | 3 | from rio_tiler.errors import RioTilerError 4 | 5 | 6 | class InvalidLandsatSceneId(RioTilerError): 7 | """Invalid Landsat-8 scene id.""" 8 | 9 | 10 | class InvalidSentinelSceneId(RioTilerError): 11 | """Invalid Sentinel-2 scene id.""" 12 | 13 | 14 | class InvalidCBERSSceneId(RioTilerError): 15 | """Invalid CBERS scene id.""" 16 | 17 | 18 | class InvalidMODISSceneId(RioTilerError): 19 | """Invalid MODIS scene id.""" 20 | 21 | 22 | class InvalidMODISProduct(RioTilerError): 23 | """Invalid MODIS Product.""" 24 | -------------------------------------------------------------------------------- /rio_tiler_pds/landsat/__init__.py: -------------------------------------------------------------------------------- 1 | """rio-tiler-pds.landsat""" 2 | 3 | from rio_tiler_pds.landsat import aws # noqa 4 | from rio_tiler_pds.landsat.utils import sceneid_parser # noqa 5 | -------------------------------------------------------------------------------- /rio_tiler_pds/landsat/aws/__init__.py: -------------------------------------------------------------------------------- 1 | """rio-tiler-pds.landsat.aws""" 2 | 3 | from rio_tiler_pds.landsat.aws.landsat_collection2 import LandsatC2Reader # noqa 4 | -------------------------------------------------------------------------------- /rio_tiler_pds/landsat/aws/landsat_collection2.py: -------------------------------------------------------------------------------- 1 | """AWS Landsat Collection 2 reader. 2 | 3 | Notes: 4 | - For collection 2, level 2, ETM and TM have the same bands 5 | - There is no level 2 for MSS sensor 6 | - processing_level for level 2 are `L2SR` or `L2SP` 7 | - The L2SR includes: 8 | - Surface Reflectance (SR) 9 | - angle coefficients file, 10 | - Quality Assessment (QA) Bands 11 | - The L2SP includes 12 | - Surface Reflectance (SR) 13 | - Surface Temperature (ST) 14 | - ST intermediate bands 15 | - angle coefficients file 16 | - Quality Assessment (QA) Band. 17 | 18 | Links: 19 | - https://www.usgs.gov/core-science-systems/nli/landsat/landsat-collection-2 20 | 21 | """ 22 | 23 | import json 24 | from typing import Dict, Type 25 | 26 | import attr 27 | from botocore.exceptions import ClientError 28 | from morecantile import TileMatrixSet 29 | 30 | from rio_tiler.constants import WEB_MERCATOR_TMS, WGS84_CRS 31 | from rio_tiler.errors import InvalidBandName 32 | from rio_tiler.io import MultiBandReader, Reader 33 | from rio_tiler_pds.landsat.utils import sceneid_parser 34 | from rio_tiler_pds.utils import fetch 35 | 36 | 37 | @attr.s 38 | class LandsatC2Reader(MultiBandReader): 39 | """AWS Public Dataset Landsat Collection 2 COG Reader. 40 | 41 | Args: 42 | input (str): Landsat 8 sceneid. 43 | 44 | Attributes: 45 | minzoom (int): Dataset's Min Zoom level (default is 5). 46 | maxzoom (int): Dataset's Max Zoom level (default is 12). 47 | scene_params (dict): scene id parameters. 48 | bands (tuple): list of available bands. 49 | 50 | Examples: 51 | >>> with LandsatC2Reader('LC08_L2SR_093106_20200207_20201016_02_T2') as scene: 52 | print(scene.bounds) 53 | 54 | >>> with LandsatC2Reader('LC08_L1TP_116043_20201122_20201122_02_RT') as scene: 55 | print(scene.bounds) 56 | 57 | """ 58 | 59 | input: str = attr.ib() 60 | tms: TileMatrixSet = attr.ib(default=WEB_MERCATOR_TMS) 61 | 62 | minzoom: int = attr.ib(default=5) 63 | maxzoom: int = attr.ib(default=12) 64 | 65 | reader: Type[Reader] = attr.ib(default=Reader) 66 | reader_options: Dict = attr.ib(factory=dict) 67 | 68 | _scheme: str = "s3" 69 | bucket: str = attr.ib(default="usgs-landsat") 70 | prefix_pattern: str = attr.ib( 71 | default="collection02/level-{_processingLevelNum}/{category}/{_sensor_s3_prefix}/{acquisitionYear}/{path}/{row}/{scene}/{scene}" 72 | ) 73 | 74 | def __attrs_post_init__(self): 75 | """Fetch productInfo and get bounds.""" 76 | self.scene_params = sceneid_parser(self.input) 77 | self.bands = self.scene_params["bands"] 78 | 79 | self.bounds = self.get_geometry() 80 | self.crs = WGS84_CRS 81 | 82 | def get_geometry(self): 83 | """Fetch geometry info for the scene.""" 84 | # Allow custom function for users who want to use the WRS2 grid and 85 | # avoid this GET request. 86 | prefix = self.prefix_pattern.format(**self.scene_params) 87 | 88 | if self.scene_params["_processingLevelNum"] == "1": 89 | stac_key = f"{prefix}_stac.json" 90 | else: 91 | # This fetches the Surface Reflectance (SR) STAC item. 92 | # There are separate STAC items for Surface Reflectance and Surface 93 | # Temperature (ST), but they have the same geometry. The SR should 94 | # always exist, the ST might not exist based on the scene. 95 | stac_key = f"{prefix}_SR_stac.json" 96 | 97 | try: 98 | self.stac_item = fetch(f"s3://{self.bucket}/{stac_key}", request_pays=True) 99 | except ClientError as e: 100 | if e.response["Error"]["Code"] == "NoSuchKey": 101 | raise ValueError( 102 | "stac_item not found. Some RT scenes may not exist in usgs-landsat bucket." 103 | ) from e 104 | else: 105 | raise e 106 | 107 | return self.stac_item["bbox"] 108 | 109 | def _get_band_url(self, band: str) -> str: 110 | """Validate band name and return band's url.""" 111 | # TODO: allow B1 instead of SR_B1 112 | 113 | if band not in self.bands: 114 | raise InvalidBandName(f"{band} is not valid.\nValid bands: {self.bands}") 115 | 116 | prefix = self.prefix_pattern.format(**self.scene_params) 117 | return f"{self._scheme}://{self.bucket}/{prefix}_{band}.TIF" 118 | -------------------------------------------------------------------------------- /rio_tiler_pds/landsat/utils.py: -------------------------------------------------------------------------------- 1 | """Landsat utility functions.""" 2 | 3 | import re 4 | from typing import Any, Dict, Tuple 5 | 6 | import numpy 7 | 8 | from rio_tiler_pds.errors import InvalidLandsatSceneId 9 | 10 | OLI_SR_BANDS: Tuple[str, ...] = ( 11 | "QA_PIXEL", 12 | "QA_RADSAT", 13 | "SR_B1", 14 | "SR_B2", 15 | "SR_B3", 16 | "SR_B4", 17 | "SR_B5", 18 | "SR_B6", 19 | "SR_B7", 20 | "SR_QA_AEROSOL", 21 | ) 22 | 23 | TIRS_ST_BANDS: Tuple[str, ...] = ( 24 | "ST_ATRAN", 25 | "ST_B10", 26 | "ST_CDIST", 27 | "ST_DRAD", 28 | "ST_EMIS", 29 | "ST_EMSD", 30 | "ST_QA", 31 | "ST_TRAD", 32 | "ST_URAD", 33 | ) 34 | 35 | TM_SR_BANDS: Tuple[str, ...] = ( 36 | "QA_PIXEL", 37 | "QA_RADSAT", 38 | "SR_ATMOS_OPACITY", 39 | "SR_B1", 40 | "SR_B2", 41 | "SR_B3", 42 | "SR_B4", 43 | "SR_B5", 44 | "SR_B7", 45 | "SR_CLOUD_QA", 46 | ) 47 | 48 | TM_ST_BANDS: Tuple[str, ...] = ( 49 | "ST_ATRAN", 50 | "ST_B6", 51 | "ST_CDIST", 52 | "ST_DRAD", 53 | "ST_EMIS", 54 | "ST_EMSD", 55 | "ST_QA", 56 | "ST_TRAD", 57 | "ST_URAD", 58 | ) 59 | 60 | OLI_L1_BANDS: Tuple[str, ...] = ("B1", "B2", "B3", "B4", "B5", "B6", "B7", "B8", "B9") 61 | 62 | TIRS_L1_BANDS: Tuple[str, ...] = ("B10", "B11") 63 | 64 | OLI_L1_QA_BANDS: Tuple[str, ...] = ( 65 | "QA_PIXEL", 66 | "QA_RADSAT", 67 | "SAA", 68 | "SZA", 69 | "VAA", 70 | "VZA", 71 | ) 72 | 73 | TIRS_L1_QA_BANDS: Tuple[str, ...] = ( 74 | "QA_PIXEL", 75 | "QA_RADSAT", 76 | ) 77 | 78 | ETM_L1_BANDS: Tuple[str, ...] = ( 79 | "B1", 80 | "B2", 81 | "B3", 82 | "B4", 83 | "B5", 84 | "B6_VCID_1", 85 | "B6_VCID_2", 86 | "B7", 87 | "B8", 88 | "QA_PIXEL", 89 | "QA_RADSAT", 90 | "SAA", 91 | "SZA", 92 | "VAA", 93 | "VZA", 94 | ) 95 | 96 | TM_L1_BANDS: Tuple[str, ...] = ( 97 | "B1", 98 | "B2", 99 | "B3", 100 | "B4", 101 | "B5", 102 | "B6", 103 | "B7", 104 | "QA_PIXEL", 105 | "QA_RADSAT", 106 | "SAA", 107 | "SZA", 108 | "VAA", 109 | "VZA", 110 | ) 111 | 112 | MSS_L1_BANDS: Tuple[str, ...] = ("B4", "B5", "B6", "B7", "QA_PIXEL", "QA_RADSAT") 113 | 114 | 115 | def sceneid_parser(sceneid: str) -> Dict: 116 | """Parse Landsat id. 117 | 118 | Author @perrygeo - http://www.perrygeo.com 119 | 120 | Args: 121 | sceneid (str): Landsat sceneid. 122 | 123 | Returns: 124 | dict: dictionary with metadata constructed from the sceneid. 125 | 126 | Raises: 127 | InvalidLandsatSceneId: If `sceneid` doesn't match the regex schema. 128 | 129 | Examples: 130 | >>> sceneid_parser('LC08_L1TP_016037_20170813_20170814_01_RT') 131 | 132 | """ 133 | if not re.match( 134 | r"^L[COTEM]\d{2}_L\d{1}[A-Z]{2}_\d{6}_\d{8}_\d{8}_\d{2}_\w{2}$", sceneid 135 | ): 136 | raise InvalidLandsatSceneId("Could not match {}".format(sceneid)) 137 | 138 | collection_pattern = ( 139 | r"^L" 140 | r"(?P\w{1})" 141 | r"(?P\w{2})" 142 | r"_" 143 | r"(?P\w{4})" 144 | r"_" 145 | r"(?P[0-9]{3})" 146 | r"(?P[0-9]{3})" 147 | r"_" 148 | r"(?P[0-9]{4})" 149 | r"(?P[0-9]{2})" 150 | r"(?P[0-9]{2})" 151 | r"_" 152 | r"(?P[0-9]{4})" 153 | r"(?P[0-9]{2})" 154 | r"(?P[0-9]{2})" 155 | r"_" 156 | r"(?P\w{2})" 157 | r"_" 158 | r"(?P\w{2})$" 159 | ) 160 | 161 | meta: Dict[str, Any] = re.match( # type: ignore 162 | collection_pattern, sceneid, re.IGNORECASE 163 | ).groupdict() 164 | 165 | meta["scene"] = sceneid 166 | meta["date"] = "{}-{}-{}".format( 167 | meta["acquisitionYear"], meta["acquisitionMonth"], meta["acquisitionDay"] 168 | ) 169 | meta["_processingLevelNum"] = meta["processingCorrectionLevel"][1] 170 | 171 | if meta["sensor"] == "C": 172 | sensor_name = "oli-tirs" 173 | elif meta["sensor"] == "O": 174 | sensor_name = "oli" 175 | elif meta["sensor"] == "T" and int(meta["satellite"]) >= 8: 176 | sensor_name = "tirs" 177 | elif meta["sensor"] == "E": 178 | sensor_name = "etm" 179 | elif meta["sensor"] == "T" and int(meta["satellite"]) < 8: 180 | sensor_name = "tm" 181 | elif meta["sensor"] == "M": 182 | sensor_name = "mss" 183 | 184 | meta["category"] = ( 185 | "albers" if meta["collectionCategory"] in ["A1", "A2"] else "standard" 186 | ) 187 | 188 | # S3 paths always use oli-tirs 189 | _sensor_s3_prefix = sensor_name 190 | if _sensor_s3_prefix in ["oli", "tirs"]: 191 | _sensor_s3_prefix = "oli-tirs" 192 | 193 | meta["sensor_name"] = sensor_name 194 | meta["_sensor_s3_prefix"] = _sensor_s3_prefix 195 | meta["bands"] = get_bands_for_scene_meta(meta) 196 | 197 | return meta 198 | 199 | 200 | def get_bands_for_scene_meta(meta: Dict) -> Tuple[str, ...]: # noqa: C901 201 | """Get available Landsat bands given scene metadata""" 202 | sensor_name = meta["sensor_name"] 203 | 204 | if meta["processingCorrectionLevel"] == "L2SR": 205 | if sensor_name in ["oli-tirs", "oli"]: 206 | bands = OLI_SR_BANDS 207 | elif sensor_name in ["tm", "etm"]: 208 | bands = TM_SR_BANDS 209 | 210 | elif meta["processingCorrectionLevel"] == "L2SP": 211 | if sensor_name == "oli-tirs": 212 | bands = OLI_SR_BANDS + TIRS_ST_BANDS 213 | elif sensor_name in ["tm", "etm"]: 214 | bands = TM_SR_BANDS + TM_ST_BANDS 215 | 216 | # Level 1 217 | else: 218 | if sensor_name == "oli": 219 | bands = OLI_L1_BANDS + OLI_L1_QA_BANDS 220 | elif sensor_name == "tirs": 221 | bands = TIRS_L1_BANDS + TIRS_L1_QA_BANDS 222 | elif sensor_name == "oli-tirs": 223 | bands = OLI_L1_BANDS + TIRS_L1_BANDS + OLI_L1_QA_BANDS 224 | elif sensor_name == "etm": 225 | bands = ETM_L1_BANDS 226 | elif sensor_name == "tm": 227 | bands = TM_L1_BANDS 228 | elif sensor_name == "mss": 229 | bands = MSS_L1_BANDS 230 | 231 | return bands 232 | -------------------------------------------------------------------------------- /rio_tiler_pds/modis/__init__.py: -------------------------------------------------------------------------------- 1 | """rio-tiler-pds.modis""" 2 | 3 | from rio_tiler_pds.modis import aws # noqa 4 | from rio_tiler_pds.modis.utils import sceneid_parser # noqa 5 | -------------------------------------------------------------------------------- /rio_tiler_pds/modis/aws/__init__.py: -------------------------------------------------------------------------------- 1 | """rio-tiler-pds.modis.aws""" 2 | 3 | # fmt: off 4 | from rio_tiler_pds.modis.aws.modis_astraea import MODISReader as MODISASTRAEAReader # noqa isort:skip 5 | # fmt: on 6 | from rio_tiler_pds.modis.aws.modis_pds import MODISReader as MODISPDSReader # noqa 7 | -------------------------------------------------------------------------------- /rio_tiler_pds/modis/aws/modis_astraea.py: -------------------------------------------------------------------------------- 1 | """AWS MODIS reader.""" 2 | 3 | from typing import Dict, Type 4 | 5 | import attr 6 | from morecantile import TileMatrixSet 7 | 8 | from rio_tiler.constants import WEB_MERCATOR_TMS, WGS84_CRS 9 | from rio_tiler.errors import InvalidBandName 10 | from rio_tiler.io import MultiBandReader, Reader 11 | from rio_tiler_pds.errors import InvalidMODISProduct 12 | from rio_tiler_pds.modis.modland_grid import tile_bbox 13 | from rio_tiler_pds.modis.utils import sceneid_parser 14 | 15 | MCD43A4_BANDS = ( 16 | "B01", 17 | "B01qa", 18 | "B02", 19 | "B02qa", 20 | "B03", 21 | "B03qa", 22 | "B04", 23 | "B04qa", 24 | "B05", 25 | "B05qa", 26 | "B06", 27 | "B06qa", 28 | "B07", 29 | "B07qa", 30 | ) 31 | 32 | MODIS_BANDS = ( 33 | "B01", 34 | "B02", 35 | "B03", 36 | "B04", 37 | "B05", 38 | "B06", 39 | "B07", 40 | "B08", 41 | "B09", 42 | "B10", 43 | "B11", 44 | "B12", 45 | ) 46 | 47 | modis_valid_bands = { 48 | "MCD43A4": MCD43A4_BANDS, 49 | "MOD11A1": MODIS_BANDS, 50 | "MYD11A1": MODIS_BANDS, 51 | "MOD13A1": MODIS_BANDS, 52 | "MYD13A1": MODIS_BANDS, 53 | } 54 | 55 | MOD11A1_MYD11A1_PREFIX = { 56 | "B01": "LSTD_", 57 | "B02": "QCD_", 58 | "B03": "DVT_", 59 | "B04": "DVA_", 60 | "B05": "LSTN_", 61 | "B06": "QCN_", 62 | "B07": "NVT_", 63 | "B08": "NVA_", 64 | "B09": "E31_", 65 | "B10": "E32_", 66 | "B11": "CDC_", 67 | "B12": "CNC_", 68 | } 69 | 70 | MOD13A1_MYD13A1_PREFIX = { 71 | "B01": "NDVI_", 72 | "B02": "EVI_", 73 | "B03": "VIQ_", 74 | "B04": "RR_", 75 | "B05": "NIRR_", 76 | "B06": "BR_", 77 | "B07": "MIRR_", 78 | "B08": "VZA_", 79 | "B09": "SZA_", 80 | "B10": "RAA_", 81 | "B11": "CDOY_", 82 | "B12": "PR_", 83 | } 84 | 85 | 86 | @attr.s 87 | class MODISReader(MultiBandReader): 88 | """AWS Public Dataset MODIS reader. 89 | 90 | Args: 91 | sceneid (str): MODIS sceneid. 92 | 93 | Attributes: 94 | scene_params (dict): scene id parameters. 95 | bands (tuple): list of available bands (default is defined for each sensor). 96 | 97 | Examples: 98 | >>> with MODISReader('MCD43A4.A2017006.h21v11.006.2017018074804') as scene: 99 | print(scene.bounds) 100 | 101 | """ 102 | 103 | input: str = attr.ib() 104 | tms: TileMatrixSet = attr.ib(default=WEB_MERCATOR_TMS) 105 | 106 | minzoom: int = attr.ib(default=4) 107 | # Most of MODIS product are at 500m resolution (zoom = 8) 108 | # Some are at 250m (zoom = 10) (MOD09GQ & MYD09GQ) thus we use maxzoom = 9 by default 109 | maxzoom: int = attr.ib(default=9) 110 | 111 | reader: Type[Reader] = attr.ib(default=Reader) 112 | reader_options: Dict = attr.ib(factory=dict) 113 | 114 | _scheme: str = "s3" 115 | bucket: str = attr.ib(default="astraea-opendata") 116 | prefix_pattern: str = attr.ib( 117 | default="{product}.{version}/{horizontal_grid}/{vertical_grid}/{date}" 118 | ) 119 | 120 | def __attrs_post_init__(self): 121 | """Parse Sceneid and get grid bounds.""" 122 | self.scene_params = sceneid_parser(self.input) 123 | product = self.scene_params["product"] 124 | if product not in modis_valid_bands: 125 | raise InvalidMODISProduct(f"{product} is not supported.") 126 | 127 | self.bands = modis_valid_bands[product] 128 | self.bounds = tile_bbox( 129 | self.scene_params["horizontal_grid"], 130 | self.scene_params["vertical_grid"], 131 | ) 132 | self.crs = WGS84_CRS 133 | 134 | def _get_band_url(self, band: str) -> str: 135 | """Validate band's name and return band's url.""" 136 | band = f"B0{band[-1]}" if band.startswith("B") and len(band) < 3 else band 137 | 138 | if band not in self.bands: 139 | raise InvalidBandName(f"{band} is not valid") 140 | 141 | if self.scene_params["product"] in ["MOD11A1", "MYD11A1"]: 142 | band_prefix = MOD11A1_MYD11A1_PREFIX[band] 143 | elif self.scene_params["product"] in ["MOD13A1", "MYD13A1"]: 144 | band_prefix = MOD13A1_MYD13A1_PREFIX[band] 145 | else: 146 | band_prefix = "" 147 | 148 | prefix = self.prefix_pattern.format(**self.scene_params) 149 | return f"{self._scheme}://{self.bucket}/{prefix}/{self.input}_{band_prefix}{band}.TIF" 150 | -------------------------------------------------------------------------------- /rio_tiler_pds/modis/aws/modis_pds.py: -------------------------------------------------------------------------------- 1 | """AWS MODIS reader.""" 2 | 3 | from typing import Dict, Type 4 | 5 | import attr 6 | from morecantile import TileMatrixSet 7 | 8 | from rio_tiler.constants import WEB_MERCATOR_TMS, WGS84_CRS 9 | from rio_tiler.errors import InvalidBandName 10 | from rio_tiler.io import MultiBandReader, Reader 11 | from rio_tiler_pds.errors import InvalidMODISProduct 12 | from rio_tiler_pds.modis.modland_grid import tile_bbox 13 | from rio_tiler_pds.modis.utils import sceneid_parser 14 | 15 | MCD43A4_BANDS = ( 16 | "B01", 17 | "B01qa", 18 | "B02", 19 | "B02qa", 20 | "B03", 21 | "B03qa", 22 | "B04", 23 | "B04qa", 24 | "B05", 25 | "B05qa", 26 | "B06", 27 | "B06qa", 28 | "B07", 29 | "B07qa", 30 | ) 31 | MOD09GQ_MYD09GQ_BANDS = ( 32 | "B01", 33 | "B02", 34 | "granule", 35 | "numobs", 36 | "obscov", 37 | "obsnum", 38 | "orbit", 39 | "qc", 40 | ) 41 | MOD09GA_MYD09GA_BAND = ( 42 | "B01", 43 | "B02", 44 | "B03", 45 | "B04", 46 | "B05", 47 | "B06", 48 | "B07", 49 | "geoflags", 50 | "granule", 51 | "numobs1km", 52 | "numobs500m", 53 | "obscov", 54 | "obsnum", 55 | "orbit", 56 | "qc500m", 57 | "qscan", 58 | "range", 59 | "senaz", 60 | "senzen", 61 | "solaz", 62 | "solzen", 63 | "state", 64 | ) 65 | 66 | modis_valid_bands = { 67 | "MCD43A4": MCD43A4_BANDS, 68 | "MOD09GQ": MOD09GQ_MYD09GQ_BANDS, 69 | "MYD09GQ": MOD09GQ_MYD09GQ_BANDS, 70 | "MOD09GA": MOD09GA_MYD09GA_BAND, 71 | "MYD09GA": MOD09GA_MYD09GA_BAND, 72 | } 73 | 74 | 75 | @attr.s 76 | class MODISReader(MultiBandReader): 77 | """AWS Public Dataset MODIS reader. 78 | 79 | Args: 80 | sceneid (str): MODIS sceneid. 81 | 82 | Attributes: 83 | scene_params (dict): scene id parameters. 84 | bands (tuple): list of available bands (default is defined for each sensor). 85 | 86 | Examples: 87 | >>> with MODISReader('MCD43A4.A2017006.h21v11.006.2017018074804') as scene: 88 | print(scene.bounds) 89 | 90 | """ 91 | 92 | input: str = attr.ib() 93 | tms: TileMatrixSet = attr.ib(default=WEB_MERCATOR_TMS) 94 | 95 | minzoom: int = attr.ib(default=4) 96 | # Most of MODIS product are at 500m resolution (zoom = 8) 97 | # Some are at 250m (zoom = 10) (MOD09GQ & MYD09GQ) thus we use maxzoom = 9 by default 98 | maxzoom: int = attr.ib(default=9) 99 | 100 | reader: Type[Reader] = attr.ib(default=Reader) 101 | reader_options: Dict = attr.ib(factory=dict) 102 | 103 | _scheme: str = "s3" 104 | bucket: str = attr.ib(default="modis-pds") 105 | prefix_pattern: str = attr.ib( 106 | default="{product}.{version}/{horizontal_grid}/{vertical_grid}/{date}" 107 | ) 108 | 109 | def __attrs_post_init__(self): 110 | """Parse Sceneid and get grid bounds.""" 111 | self.scene_params = sceneid_parser(self.input) 112 | product = self.scene_params["product"] 113 | 114 | if product not in modis_valid_bands: 115 | raise InvalidMODISProduct(f"{product} is not supported.") 116 | 117 | self.bands = modis_valid_bands[product] 118 | self.bounds = tile_bbox( 119 | self.scene_params["horizontal_grid"], 120 | self.scene_params["vertical_grid"], 121 | ) 122 | self.crs = WGS84_CRS 123 | 124 | def _get_band_url(self, band: str) -> str: 125 | """Validate band's name and return band's url.""" 126 | band = f"B0{band[-1]}" if band.startswith("B") and len(band) < 3 else band 127 | 128 | if band not in self.bands: 129 | raise InvalidBandName(f"{band} is not valid") 130 | 131 | prefix = self.prefix_pattern.format(**self.scene_params) 132 | return f"{self._scheme}://{self.bucket}/{prefix}/{self.input}_{band}.TIF" 133 | -------------------------------------------------------------------------------- /rio_tiler_pds/modis/utils.py: -------------------------------------------------------------------------------- 1 | """MODIS utility functions.""" 2 | 3 | import re 4 | from typing import Any, Dict 5 | 6 | from rio_tiler_pds.errors import InvalidMODISSceneId 7 | 8 | 9 | def sceneid_parser(sceneid: str) -> Dict: 10 | """Parse MODIS scene id. 11 | 12 | Args: 13 | sceneid (str): Sentinel-2 sceneid. 14 | 15 | Returns: 16 | dict: dictionary with metadata constructed from the sceneid. 17 | 18 | Raises: 19 | InvalidMODISSceneId: If `sceneid` doesn't match the regex schema. 20 | 21 | Examples: 22 | >>> sceneid_parser('MCD43A4.A2017006.h21v11.006.2017018074804') 23 | 24 | """ 25 | if re.match( 26 | r"^M[COY]D[0-9]{2}[A-Z0-9]{2}\.A[0-9]{4}[0-9]{3}\.h[0-9]{2}v[0-9]{2}\.[0-9]{3}\.[0-9]{13}$", 27 | sceneid, 28 | ): 29 | pattern = ( 30 | r"^(?PM[COY]D[0-9]{2}[A-Z0-9]{2})" 31 | r"\." 32 | r"A(?P[0-9]{4}[0-9]{3})" 33 | r"\." 34 | r"h(?P[0-9]{2})" 35 | r"v(?P[0-9]{2})" 36 | r"\." 37 | r"(?P[0-9]{3})" 38 | r"\." 39 | r"(?P[0-9]{4})" 40 | r"(?P[0-9]{3})" 41 | r"[0-9]{6}$" 42 | ) 43 | else: 44 | raise InvalidMODISSceneId("Could not match {}".format(sceneid)) 45 | 46 | meta: Dict[str, Any] = re.match(pattern, sceneid, re.IGNORECASE).groupdict() # type: ignore 47 | meta["scene"] = sceneid 48 | return meta 49 | -------------------------------------------------------------------------------- /rio_tiler_pds/sentinel/__init__.py: -------------------------------------------------------------------------------- 1 | """rio-tiler-pds.sentinel""" 2 | 3 | from rio_tiler_pds.sentinel import aws # noqa 4 | from rio_tiler_pds.sentinel.utils import s1_sceneid_parser, s2_sceneid_parser # noqa 5 | -------------------------------------------------------------------------------- /rio_tiler_pds/sentinel/aws/__init__.py: -------------------------------------------------------------------------------- 1 | """AWS Sentinel 1 & 2 readers""" 2 | 3 | from .sentinel1 import S1L1CReader # noqa 4 | from .sentinel2 import S2L1CReader # noqa 5 | from .sentinel2 import S2COGReader, S2JP2Reader, S2L2ACOGReader, S2L2AReader # noqa 6 | -------------------------------------------------------------------------------- /rio_tiler_pds/sentinel/aws/sentinel1.py: -------------------------------------------------------------------------------- 1 | """AWS Sentinel 1 reader.""" 2 | 3 | import json 4 | from typing import Dict, Tuple, Type 5 | 6 | import attr 7 | from morecantile import TileMatrixSet 8 | from rasterio.features import bounds as featureBounds 9 | 10 | from rio_tiler.constants import WEB_MERCATOR_TMS, WGS84_CRS 11 | from rio_tiler.errors import InvalidBandName 12 | from rio_tiler.io import MultiBandReader, Reader 13 | from rio_tiler_pds.sentinel.utils import s1_sceneid_parser 14 | from rio_tiler_pds.utils import fetch 15 | 16 | 17 | def get_bounds(geom: Dict) -> Tuple[float, float, float, float]: 18 | """Get Bounds from GeoJSON geometry and handle multi polygon crossing the antimeridian line. 19 | 20 | ref: https://github.com/cogeotiff/rio-tiler-pds/issues/77 21 | """ 22 | if geom["type"] == "MultiPolygon": 23 | bounds = [ 24 | featureBounds({"type": "Polygon", "coordinates": poly}) 25 | for poly in geom["coordinates"] 26 | ] 27 | minx, miny, maxx, maxy = zip(*bounds) 28 | return (max(minx), min(miny), min(maxx), max(maxy)) 29 | 30 | return featureBounds(geom) 31 | 32 | 33 | @attr.s 34 | class S1L1CReader(MultiBandReader): 35 | """AWS Public Dataset Sentinel 1 reader. 36 | 37 | Args: 38 | input (str): Sentinel-1 sceneid. 39 | 40 | Attributes: 41 | minzoom (int): Dataset's Min Zoom level (default is 8). 42 | maxzoom (int): Dataset's Max Zoom level (default is 14). 43 | bands (tuple): list of available bands (default is ('vv', 'vh')). 44 | productInfo (dict): sentinel 1 productInfo.json content. 45 | datageom (dict): sentinel 1 data geometry. 46 | 47 | Examples: 48 | >>> with S1L1CReader('S1A_IW_GRDH_1SDV_20180716T004042_20180716T004107_022812_02792A_FD5B') as scene: 49 | print(scene.bounds) 50 | 51 | """ 52 | 53 | input: str = attr.ib() 54 | tms: TileMatrixSet = attr.ib(default=WEB_MERCATOR_TMS) 55 | 56 | minzoom: int = attr.ib(default=8) 57 | maxzoom: int = attr.ib(default=14) 58 | 59 | reader: Type[Reader] = attr.ib(default=Reader) 60 | reader_options: Dict = attr.ib(factory=dict) 61 | 62 | productInfo: Dict = attr.ib(init=False) 63 | datageom: Dict = attr.ib(init=False) 64 | 65 | _scheme: str = "s3" 66 | bucket: str = attr.ib(default="sentinel-s1-l1c") 67 | prefix_pattern: str = attr.ib( 68 | default="{product}/{acquisitionYear}/{_month}/{_day}/{beam}/{polarisation}/{scene}" 69 | ) 70 | 71 | def __attrs_post_init__(self): 72 | """Fetch productInfo and get bounds.""" 73 | self.scene_params = s1_sceneid_parser(self.input) 74 | if self.scene_params["polarisation"] == "DH": 75 | self.bands = ("hh", "hv") 76 | 77 | elif self.scene_params["polarisation"] == "DV": 78 | self.bands = ("vv", "vh") 79 | 80 | elif self.scene_params["polarisation"] == "SH": 81 | self.bands = ("hh",) 82 | 83 | elif self.scene_params["polarisation"] == "SV": 84 | self.bands = ("vv",) 85 | 86 | prefix = self.prefix_pattern.format(**self.scene_params) 87 | self.productInfo = fetch( 88 | f"s3://{self.bucket}/{prefix}/productInfo.json", request_pays=True 89 | ) 90 | 91 | self.datageom = self.productInfo["footprint"] 92 | self.bounds = get_bounds(self.datageom) 93 | self.crs = WGS84_CRS 94 | 95 | def _get_band_url(self, band: str) -> str: 96 | """Validate band name and return band's url.""" 97 | if band not in self.bands: 98 | raise InvalidBandName(f"{band} is not valid") 99 | 100 | prefix = self.prefix_pattern.format(**self.scene_params) 101 | return f"{self._scheme}://{self.bucket}/{prefix}/measurement/{self.scene_params['beam'].lower()}-{band}.tiff" 102 | -------------------------------------------------------------------------------- /rio_tiler_pds/sentinel/utils.py: -------------------------------------------------------------------------------- 1 | """Sentinel 1 & 2 utility functions.""" 2 | 3 | import re 4 | from typing import Any, Dict 5 | 6 | from rio_tiler_pds.errors import InvalidSentinelSceneId 7 | 8 | 9 | def s2_sceneid_parser(sceneid: str) -> Dict: 10 | """Parse Sentinel 2 scene id. 11 | 12 | Args: 13 | sceneid (str): Sentinel-2 sceneid. 14 | 15 | Returns: 16 | dict: dictionary with metadata constructed from the sceneid. 17 | 18 | Raises: 19 | InvalidSentinelSceneId: If `sceneid` doesn't match the regex schema. 20 | 21 | Examples: 22 | >>> s2_sceneid_parser('S2A_L1C_20170729_19UDP_0') 23 | 24 | >>> s2_sceneid_parser('S2A_L2A_20170729_19UDP_0') 25 | 26 | >>> s2_sceneid_parser('S2A_29RKH_20200219_0_L2A') 27 | 28 | >>> s2_sceneid_parse('S2B_MSIL2A_20190730T190919_N0212_R056_T10UEU_20201005T200819') 29 | 30 | """ 31 | if re.match( 32 | "^S2[A-Z]_L[0-2][A-C]_[0-9]{8}_[0-9]{1,2}[A-Z]{3}_[0-9]{1,2}$", sceneid 33 | ): # Legacy sceneid format 34 | pattern = ( 35 | r"^S" 36 | r"(?P\w{1})" 37 | r"(?P[A-Z]{1})" 38 | r"_" 39 | r"(?PL[0-2][ABC])" 40 | r"_" 41 | r"(?P[0-9]{4})" 42 | r"(?P[0-9]{2})" 43 | r"(?P[0-9]{2})" 44 | r"_" 45 | r"(?P[0-9]{1,2})" 46 | r"(?P\w{1})" 47 | r"(?P\w{2})" 48 | r"_" 49 | r"(?P[0-9]{1,2})$" 50 | ) 51 | 52 | elif re.match( 53 | r"^S2[A-Z]_[0-9]{1,2}[A-Z]{3}_[0-9]{8}_[0-9]{1,2}_L[0-2][A-C]$", sceneid 54 | ): # New sceneid format 55 | pattern = ( 56 | r"^S" 57 | r"(?P\w{1})" 58 | r"(?P[A-Z]{1})" 59 | r"_" 60 | r"(?P[0-9]{1,2})" 61 | r"(?P\w{1})" 62 | r"(?P\w{2})" 63 | r"_" 64 | r"(?P[0-9]{4})" 65 | r"(?P[0-9]{2})" 66 | r"(?P[0-9]{2})" 67 | r"_" 68 | r"(?P[0-9]{1,2})" 69 | r"_" 70 | r"(?PL[0-2][ABC])$" 71 | ) 72 | elif re.match( 73 | r"^S2[A-Z]_MSIL[0-2][ABC]_[0-9]{8}T[0-9]{6}_N[0-9]{4}_R[0-9]{3}_T[0-9A-Z]{5}_[0-9]{8}T[0-9]{6}$", 74 | sceneid, 75 | ): # product id 76 | pattern = ( 77 | r"^S" 78 | r"(?P\w{1})" 79 | r"(?P[A-Z]{1})" 80 | r"_" 81 | r"MSI(?PL[0-2][ABC])" 82 | r"_" 83 | r"(?P[0-9]{4})" 84 | r"(?P[0-9]{2})" 85 | r"(?P[0-9]{2})" 86 | r"T(?P[0-9]{6})" 87 | r"_" 88 | r"N(?P[0-9]{4})" 89 | r"_" 90 | r"R(?P[0-9]{3})" 91 | r"_T" 92 | r"(?P[0-9]{2})" 93 | r"(?P\w{1})" 94 | r"(?P\w{2})" 95 | r"_" 96 | r"(?P[0-9]{8}T[0-9]{6})$" 97 | ) 98 | else: 99 | raise InvalidSentinelSceneId("Could not match {}".format(sceneid)) 100 | 101 | meta: Dict[str, Any] = re.match(pattern, sceneid, re.IGNORECASE).groupdict() # type: ignore 102 | 103 | # When parsing product id, num won't be set. 104 | if not meta.get("num"): 105 | meta["num"] = "0" 106 | 107 | meta["scene"] = sceneid 108 | meta["date"] = "{}-{}-{}".format( 109 | meta["acquisitionYear"], meta["acquisitionMonth"], meta["acquisitionDay"] 110 | ) 111 | 112 | meta["_utm"] = meta["utm"].lstrip("0") 113 | meta["_month"] = meta["acquisitionMonth"].lstrip("0") 114 | meta["_day"] = meta["acquisitionDay"].lstrip("0") 115 | meta["_levelLow"] = meta["processingLevel"].lower() 116 | 117 | return meta 118 | 119 | 120 | def s1_sceneid_parser(sceneid: str) -> Dict: 121 | """Parse Sentinel 1 scene id. 122 | 123 | Args: 124 | sceneid (str): Sentinel-1 sceneid. 125 | 126 | Returns: 127 | dict: dictionary with metadata constructed from the sceneid. 128 | 129 | Raises: 130 | InvalidSentinelSceneId: If `sceneid` doesn't match the regex schema. 131 | 132 | Examples: 133 | >>> s1_sceneid_parser('S1A_IW_GRDH_1SDV_20180716T004042_20180716T004107_022812_02792A_FD5B') 134 | 135 | """ 136 | if not re.match( 137 | "^S1[A-Z]_(IW|EW|S[1-6])_[A-Z]{3}[FHM]_[0-9][SA][A-Z]{2}_[0-9]{8}T[0-9]{6}_[0-9]{8}T[0-9]{6}_[0-9A-Z]{6}_[0-9A-Z]{6}_[0-9A-Z]{4}$", 138 | sceneid, 139 | ): 140 | raise InvalidSentinelSceneId("Could not match {}".format(sceneid)) 141 | 142 | sentinel_pattern = ( 143 | r"^S" 144 | r"(?P\w{1})" 145 | r"(?P[A-Z]{1})" 146 | r"_" 147 | r"(?P(IW)|(EW)|(S[1-6]))" 148 | r"_" 149 | r"(?P[A-Z]{3})" 150 | r"(?P[FHM])" 151 | r"_" 152 | r"(?P[0-9])" 153 | r"(?P[SA])" 154 | r"(?P(SH)|(SV)|(DH)|(DV))" 155 | r"_" 156 | r"(?P[0-9]{8}T[0-9]{6})" 157 | r"_" 158 | r"(?P[0-9]{8}T[0-9]{6})" 159 | r"_" 160 | r"(?P[0-9]{6})" 161 | r"_" 162 | r"(?P[0-9A-Z]{6})" 163 | r"_" 164 | r"(?P[0-9A-Z]{4})$" 165 | ) 166 | 167 | meta: Dict[str, Any] = re.match( # type: ignore 168 | sentinel_pattern, sceneid, re.IGNORECASE 169 | ).groupdict() 170 | 171 | meta["acquisitionYear"] = meta["startDateTime"][0:4] 172 | meta["acquisitionMonth"] = meta["startDateTime"][4:6] 173 | meta["acquisitionDay"] = meta["startDateTime"][6:8] 174 | 175 | meta["scene"] = sceneid 176 | meta["date"] = "{}-{}-{}".format( 177 | meta["acquisitionYear"], meta["acquisitionMonth"], meta["acquisitionDay"] 178 | ) 179 | meta["_month"] = meta["acquisitionMonth"].lstrip("0") 180 | meta["_day"] = meta["acquisitionDay"].lstrip("0") 181 | return meta 182 | -------------------------------------------------------------------------------- /rio_tiler_pds/utils.py: -------------------------------------------------------------------------------- 1 | """rio_tiler_pds.utils.""" 2 | 3 | import json 4 | import os 5 | import warnings 6 | from functools import lru_cache 7 | from typing import Any, Dict 8 | from urllib.parse import urlparse 9 | 10 | import httpx 11 | from boto3.session import Session as boto3_session 12 | 13 | 14 | def aws_get_object( 15 | bucket: str, 16 | key: str, 17 | request_pays: bool = False, 18 | client: "boto3_session.client" = None, 19 | ) -> bytes: 20 | """AWS s3 get object content.""" 21 | if not client: 22 | if profile_name := os.environ.get("AWS_PROFILE", None): 23 | session = boto3_session(profile_name=profile_name) 24 | 25 | else: 26 | access_key = os.environ.get("AWS_ACCESS_KEY_ID", None) 27 | secret_access_key = os.environ.get("AWS_SECRET_ACCESS_KEY", None) 28 | access_token = os.environ.get("AWS_SESSION_TOKEN", None) 29 | 30 | # AWS_REGION is GDAL specific. Later overloaded by standard AWS_DEFAULT_REGION 31 | region_name = os.environ.get( 32 | "AWS_DEFAULT_REGION", os.environ.get("AWS_REGION", None) 33 | ) 34 | 35 | session = boto3_session( 36 | aws_access_key_id=access_key, 37 | aws_secret_access_key=secret_access_key, 38 | aws_session_token=access_token, 39 | region_name=region_name or None, 40 | ) 41 | 42 | # AWS_S3_ENDPOINT and AWS_HTTPS are GDAL config options of vsis3 driver 43 | # https://gdal.org/user/virtual_file_systems.html#vsis3-aws-s3-files 44 | endpoint_url = os.environ.get("AWS_S3_ENDPOINT", None) 45 | if endpoint_url: 46 | use_https = os.environ.get("AWS_HTTPS", "YES") 47 | if use_https.upper() in ["YES", "TRUE", "ON"]: 48 | endpoint_url = "https://" + endpoint_url 49 | 50 | else: 51 | endpoint_url = "http://" + endpoint_url 52 | 53 | client = session.client("s3", endpoint_url=endpoint_url) 54 | 55 | params = {"Bucket": bucket, "Key": key} 56 | if request_pays or os.environ.get("AWS_REQUEST_PAYER", "").lower() == "requester": 57 | params["RequestPayer"] = "requester" 58 | 59 | response = client.get_object(**params) 60 | return response["Body"].read() 61 | 62 | 63 | @lru_cache(maxsize=512) 64 | def get_object(bucket: str, key: str, request_pays: bool = False) -> bytes: 65 | """Add LRU cache on top of AWS Get Object.""" 66 | warnings.warn( 67 | "`rio_tiler_pds.utils.get_object` will be removed in version 1.0, Please use `rio_tiler_pds.utils.fetch`", 68 | DeprecationWarning, 69 | stacklevel=1, 70 | ) 71 | return aws_get_object(bucket, key, request_pays=request_pays) 72 | 73 | 74 | @lru_cache(maxsize=512) 75 | def fetch(filepath: str, **kwargs: Any) -> Dict: 76 | """Fetch URL. 77 | 78 | A LRU cache is set on top of this function. 79 | 80 | Args: 81 | filepath (str): URL. 82 | kwargs (any): additional options to pass to client. 83 | 84 | Returns: 85 | dict: URL JSON content. 86 | 87 | """ 88 | parsed = urlparse(filepath) 89 | if parsed.scheme == "s3": 90 | bucket = parsed.netloc 91 | key = parsed.path.strip("/") 92 | return json.loads(aws_get_object(bucket, key, **kwargs)) 93 | 94 | elif parsed.scheme in ["https", "http", "ftp"]: 95 | resp = httpx.get(filepath, **kwargs) 96 | resp.raise_for_status() 97 | return resp.json() 98 | 99 | else: 100 | with open(filepath, "r") as f: 101 | return json.load(f) 102 | -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- 1 | """rio-tiler tests suite.""" 2 | -------------------------------------------------------------------------------- /tests/fixtures/astraea-opendata/MYD13A1.006/30/10/2020153/MYD13A1.A2020153.h30v10.006.2020170024036_BR_B06.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/astraea-opendata/MYD13A1.006/30/10/2020153/MYD13A1.A2020153.h30v10.006.2020170024036_BR_B06.TIF -------------------------------------------------------------------------------- /tests/fixtures/astraea-opendata/MYD13A1.006/30/10/2020153/MYD13A1.A2020153.h30v10.006.2020170024036_CDOY_B11.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/astraea-opendata/MYD13A1.006/30/10/2020153/MYD13A1.A2020153.h30v10.006.2020170024036_CDOY_B11.TIF -------------------------------------------------------------------------------- /tests/fixtures/astraea-opendata/MYD13A1.006/30/10/2020153/MYD13A1.A2020153.h30v10.006.2020170024036_EVI_B02.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/astraea-opendata/MYD13A1.006/30/10/2020153/MYD13A1.A2020153.h30v10.006.2020170024036_EVI_B02.TIF -------------------------------------------------------------------------------- /tests/fixtures/astraea-opendata/MYD13A1.006/30/10/2020153/MYD13A1.A2020153.h30v10.006.2020170024036_MIRR_B07.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/astraea-opendata/MYD13A1.006/30/10/2020153/MYD13A1.A2020153.h30v10.006.2020170024036_MIRR_B07.TIF -------------------------------------------------------------------------------- /tests/fixtures/astraea-opendata/MYD13A1.006/30/10/2020153/MYD13A1.A2020153.h30v10.006.2020170024036_NDVI_B01.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/astraea-opendata/MYD13A1.006/30/10/2020153/MYD13A1.A2020153.h30v10.006.2020170024036_NDVI_B01.TIF -------------------------------------------------------------------------------- /tests/fixtures/astraea-opendata/MYD13A1.006/30/10/2020153/MYD13A1.A2020153.h30v10.006.2020170024036_NIRR_B05.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/astraea-opendata/MYD13A1.006/30/10/2020153/MYD13A1.A2020153.h30v10.006.2020170024036_NIRR_B05.TIF -------------------------------------------------------------------------------- /tests/fixtures/astraea-opendata/MYD13A1.006/30/10/2020153/MYD13A1.A2020153.h30v10.006.2020170024036_PR_B12.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/astraea-opendata/MYD13A1.006/30/10/2020153/MYD13A1.A2020153.h30v10.006.2020170024036_PR_B12.TIF -------------------------------------------------------------------------------- /tests/fixtures/astraea-opendata/MYD13A1.006/30/10/2020153/MYD13A1.A2020153.h30v10.006.2020170024036_RAA_B10.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/astraea-opendata/MYD13A1.006/30/10/2020153/MYD13A1.A2020153.h30v10.006.2020170024036_RAA_B10.TIF -------------------------------------------------------------------------------- /tests/fixtures/astraea-opendata/MYD13A1.006/30/10/2020153/MYD13A1.A2020153.h30v10.006.2020170024036_RR_B04.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/astraea-opendata/MYD13A1.006/30/10/2020153/MYD13A1.A2020153.h30v10.006.2020170024036_RR_B04.TIF -------------------------------------------------------------------------------- /tests/fixtures/astraea-opendata/MYD13A1.006/30/10/2020153/MYD13A1.A2020153.h30v10.006.2020170024036_SZA_B09.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/astraea-opendata/MYD13A1.006/30/10/2020153/MYD13A1.A2020153.h30v10.006.2020170024036_SZA_B09.TIF -------------------------------------------------------------------------------- /tests/fixtures/astraea-opendata/MYD13A1.006/30/10/2020153/MYD13A1.A2020153.h30v10.006.2020170024036_VIQ_B03.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/astraea-opendata/MYD13A1.006/30/10/2020153/MYD13A1.A2020153.h30v10.006.2020170024036_VIQ_B03.TIF -------------------------------------------------------------------------------- /tests/fixtures/astraea-opendata/MYD13A1.006/30/10/2020153/MYD13A1.A2020153.h30v10.006.2020170024036_VZA_B08.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/astraea-opendata/MYD13A1.006/30/10/2020153/MYD13A1.A2020153.h30v10.006.2020170024036_VZA_B08.TIF -------------------------------------------------------------------------------- /tests/fixtures/cbers-pds/CBERS4/AWFI/146/129/CBERS_4_AWFI_20170420_146_129_L2/CBERS_4_AWFI_20170420_146_129_L2_BAND13.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/cbers-pds/CBERS4/AWFI/146/129/CBERS_4_AWFI_20170420_146_129_L2/CBERS_4_AWFI_20170420_146_129_L2_BAND13.tif -------------------------------------------------------------------------------- /tests/fixtures/cbers-pds/CBERS4/AWFI/146/129/CBERS_4_AWFI_20170420_146_129_L2/CBERS_4_AWFI_20170420_146_129_L2_BAND13.tif.ovr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/cbers-pds/CBERS4/AWFI/146/129/CBERS_4_AWFI_20170420_146_129_L2/CBERS_4_AWFI_20170420_146_129_L2_BAND13.tif.ovr -------------------------------------------------------------------------------- /tests/fixtures/cbers-pds/CBERS4/AWFI/146/129/CBERS_4_AWFI_20170420_146_129_L2/CBERS_4_AWFI_20170420_146_129_L2_BAND14.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/cbers-pds/CBERS4/AWFI/146/129/CBERS_4_AWFI_20170420_146_129_L2/CBERS_4_AWFI_20170420_146_129_L2_BAND14.tif -------------------------------------------------------------------------------- /tests/fixtures/cbers-pds/CBERS4/AWFI/146/129/CBERS_4_AWFI_20170420_146_129_L2/CBERS_4_AWFI_20170420_146_129_L2_BAND14.tif.ovr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/cbers-pds/CBERS4/AWFI/146/129/CBERS_4_AWFI_20170420_146_129_L2/CBERS_4_AWFI_20170420_146_129_L2_BAND14.tif.ovr -------------------------------------------------------------------------------- /tests/fixtures/cbers-pds/CBERS4/AWFI/146/129/CBERS_4_AWFI_20170420_146_129_L2/CBERS_4_AWFI_20170420_146_129_L2_BAND15.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/cbers-pds/CBERS4/AWFI/146/129/CBERS_4_AWFI_20170420_146_129_L2/CBERS_4_AWFI_20170420_146_129_L2_BAND15.tif -------------------------------------------------------------------------------- /tests/fixtures/cbers-pds/CBERS4/AWFI/146/129/CBERS_4_AWFI_20170420_146_129_L2/CBERS_4_AWFI_20170420_146_129_L2_BAND15.tif.ovr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/cbers-pds/CBERS4/AWFI/146/129/CBERS_4_AWFI_20170420_146_129_L2/CBERS_4_AWFI_20170420_146_129_L2_BAND15.tif.ovr -------------------------------------------------------------------------------- /tests/fixtures/cbers-pds/CBERS4/AWFI/146/129/CBERS_4_AWFI_20170420_146_129_L2/CBERS_4_AWFI_20170420_146_129_L2_BAND16.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/cbers-pds/CBERS4/AWFI/146/129/CBERS_4_AWFI_20170420_146_129_L2/CBERS_4_AWFI_20170420_146_129_L2_BAND16.tif -------------------------------------------------------------------------------- /tests/fixtures/cbers-pds/CBERS4/AWFI/146/129/CBERS_4_AWFI_20170420_146_129_L2/CBERS_4_AWFI_20170420_146_129_L2_BAND16.tif.ovr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/cbers-pds/CBERS4/AWFI/146/129/CBERS_4_AWFI_20170420_146_129_L2/CBERS_4_AWFI_20170420_146_129_L2_BAND16.tif.ovr -------------------------------------------------------------------------------- /tests/fixtures/cbers-pds/CBERS4/MUX/057/094/CBERS_4_MUX_20171121_057_094_L2/CBERS_4_MUX_20171121_057_094_L2_BAND5.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/cbers-pds/CBERS4/MUX/057/094/CBERS_4_MUX_20171121_057_094_L2/CBERS_4_MUX_20171121_057_094_L2_BAND5.tif -------------------------------------------------------------------------------- /tests/fixtures/cbers-pds/CBERS4/MUX/057/094/CBERS_4_MUX_20171121_057_094_L2/CBERS_4_MUX_20171121_057_094_L2_BAND5.tif.ovr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/cbers-pds/CBERS4/MUX/057/094/CBERS_4_MUX_20171121_057_094_L2/CBERS_4_MUX_20171121_057_094_L2_BAND5.tif.ovr -------------------------------------------------------------------------------- /tests/fixtures/cbers-pds/CBERS4/MUX/057/094/CBERS_4_MUX_20171121_057_094_L2/CBERS_4_MUX_20171121_057_094_L2_BAND6.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/cbers-pds/CBERS4/MUX/057/094/CBERS_4_MUX_20171121_057_094_L2/CBERS_4_MUX_20171121_057_094_L2_BAND6.tif -------------------------------------------------------------------------------- /tests/fixtures/cbers-pds/CBERS4/MUX/057/094/CBERS_4_MUX_20171121_057_094_L2/CBERS_4_MUX_20171121_057_094_L2_BAND6.tif.ovr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/cbers-pds/CBERS4/MUX/057/094/CBERS_4_MUX_20171121_057_094_L2/CBERS_4_MUX_20171121_057_094_L2_BAND6.tif.ovr -------------------------------------------------------------------------------- /tests/fixtures/cbers-pds/CBERS4/MUX/057/094/CBERS_4_MUX_20171121_057_094_L2/CBERS_4_MUX_20171121_057_094_L2_BAND7.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/cbers-pds/CBERS4/MUX/057/094/CBERS_4_MUX_20171121_057_094_L2/CBERS_4_MUX_20171121_057_094_L2_BAND7.tif -------------------------------------------------------------------------------- /tests/fixtures/cbers-pds/CBERS4/MUX/057/094/CBERS_4_MUX_20171121_057_094_L2/CBERS_4_MUX_20171121_057_094_L2_BAND7.tif.ovr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/cbers-pds/CBERS4/MUX/057/094/CBERS_4_MUX_20171121_057_094_L2/CBERS_4_MUX_20171121_057_094_L2_BAND7.tif.ovr -------------------------------------------------------------------------------- /tests/fixtures/cbers-pds/CBERS4/MUX/057/094/CBERS_4_MUX_20171121_057_094_L2/CBERS_4_MUX_20171121_057_094_L2_BAND8.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/cbers-pds/CBERS4/MUX/057/094/CBERS_4_MUX_20171121_057_094_L2/CBERS_4_MUX_20171121_057_094_L2_BAND8.tif -------------------------------------------------------------------------------- /tests/fixtures/cbers-pds/CBERS4/MUX/057/094/CBERS_4_MUX_20171121_057_094_L2/CBERS_4_MUX_20171121_057_094_L2_BAND8.tif.ovr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/cbers-pds/CBERS4/MUX/057/094/CBERS_4_MUX_20171121_057_094_L2/CBERS_4_MUX_20171121_057_094_L2_BAND8.tif.ovr -------------------------------------------------------------------------------- /tests/fixtures/cbers-pds/CBERS4/PAN10M/161/109/CBERS_4_PAN10M_20170427_161_109_L4/CBERS_4_PAN10M_20170427_161_109_L4_BAND2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/cbers-pds/CBERS4/PAN10M/161/109/CBERS_4_PAN10M_20170427_161_109_L4/CBERS_4_PAN10M_20170427_161_109_L4_BAND2.tif -------------------------------------------------------------------------------- /tests/fixtures/cbers-pds/CBERS4/PAN10M/161/109/CBERS_4_PAN10M_20170427_161_109_L4/CBERS_4_PAN10M_20170427_161_109_L4_BAND2.tif.ovr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/cbers-pds/CBERS4/PAN10M/161/109/CBERS_4_PAN10M_20170427_161_109_L4/CBERS_4_PAN10M_20170427_161_109_L4_BAND2.tif.ovr -------------------------------------------------------------------------------- /tests/fixtures/cbers-pds/CBERS4/PAN10M/161/109/CBERS_4_PAN10M_20170427_161_109_L4/CBERS_4_PAN10M_20170427_161_109_L4_BAND3.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/cbers-pds/CBERS4/PAN10M/161/109/CBERS_4_PAN10M_20170427_161_109_L4/CBERS_4_PAN10M_20170427_161_109_L4_BAND3.tif -------------------------------------------------------------------------------- /tests/fixtures/cbers-pds/CBERS4/PAN10M/161/109/CBERS_4_PAN10M_20170427_161_109_L4/CBERS_4_PAN10M_20170427_161_109_L4_BAND3.tif.ovr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/cbers-pds/CBERS4/PAN10M/161/109/CBERS_4_PAN10M_20170427_161_109_L4/CBERS_4_PAN10M_20170427_161_109_L4_BAND3.tif.ovr -------------------------------------------------------------------------------- /tests/fixtures/cbers-pds/CBERS4/PAN10M/161/109/CBERS_4_PAN10M_20170427_161_109_L4/CBERS_4_PAN10M_20170427_161_109_L4_BAND4.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/cbers-pds/CBERS4/PAN10M/161/109/CBERS_4_PAN10M_20170427_161_109_L4/CBERS_4_PAN10M_20170427_161_109_L4_BAND4.tif -------------------------------------------------------------------------------- /tests/fixtures/cbers-pds/CBERS4/PAN10M/161/109/CBERS_4_PAN10M_20170427_161_109_L4/CBERS_4_PAN10M_20170427_161_109_L4_BAND4.tif.ovr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/cbers-pds/CBERS4/PAN10M/161/109/CBERS_4_PAN10M_20170427_161_109_L4/CBERS_4_PAN10M_20170427_161_109_L4_BAND4.tif.ovr -------------------------------------------------------------------------------- /tests/fixtures/cbers-pds/CBERS4/PAN5M/153/114/CBERS_4_PAN5M_20170425_153_114_L4/CBERS_4_PAN5M_20170425_153_114_L4_BAND1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/cbers-pds/CBERS4/PAN5M/153/114/CBERS_4_PAN5M_20170425_153_114_L4/CBERS_4_PAN5M_20170425_153_114_L4_BAND1.tif -------------------------------------------------------------------------------- /tests/fixtures/cbers-pds/CBERS4/PAN5M/153/114/CBERS_4_PAN5M_20170425_153_114_L4/CBERS_4_PAN5M_20170425_153_114_L4_BAND1.tif.ovr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/cbers-pds/CBERS4/PAN5M/153/114/CBERS_4_PAN5M_20170425_153_114_L4/CBERS_4_PAN5M_20170425_153_114_L4_BAND1.tif.ovr -------------------------------------------------------------------------------- /tests/fixtures/cbers-pds/CBERS4A/MUX/201/137/CBERS_4A_MUX_20200808_201_137_L4/CBERS_4A_MUX_20200808_201_137_L4_BAND5.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/cbers-pds/CBERS4A/MUX/201/137/CBERS_4A_MUX_20200808_201_137_L4/CBERS_4A_MUX_20200808_201_137_L4_BAND5.tif -------------------------------------------------------------------------------- /tests/fixtures/cbers-pds/CBERS4A/MUX/201/137/CBERS_4A_MUX_20200808_201_137_L4/CBERS_4A_MUX_20200808_201_137_L4_BAND6.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/cbers-pds/CBERS4A/MUX/201/137/CBERS_4A_MUX_20200808_201_137_L4/CBERS_4A_MUX_20200808_201_137_L4_BAND6.tif -------------------------------------------------------------------------------- /tests/fixtures/cbers-pds/CBERS4A/MUX/201/137/CBERS_4A_MUX_20200808_201_137_L4/CBERS_4A_MUX_20200808_201_137_L4_BAND7.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/cbers-pds/CBERS4A/MUX/201/137/CBERS_4A_MUX_20200808_201_137_L4/CBERS_4A_MUX_20200808_201_137_L4_BAND7.tif -------------------------------------------------------------------------------- /tests/fixtures/cbers-pds/CBERS4A/MUX/201/137/CBERS_4A_MUX_20200808_201_137_L4/CBERS_4A_MUX_20200808_201_137_L4_BAND8.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/cbers-pds/CBERS4A/MUX/201/137/CBERS_4A_MUX_20200808_201_137_L4/CBERS_4A_MUX_20200808_201_137_L4_BAND8.tif -------------------------------------------------------------------------------- /tests/fixtures/cbers-pds/CBERS4A/WFI/221/156/CBERS_4A_WFI_20200801_221_156_L4/CBERS_4A_WFI_20200801_221_156_L4_BAND13.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/cbers-pds/CBERS4A/WFI/221/156/CBERS_4A_WFI_20200801_221_156_L4/CBERS_4A_WFI_20200801_221_156_L4_BAND13.tif -------------------------------------------------------------------------------- /tests/fixtures/cbers-pds/CBERS4A/WFI/221/156/CBERS_4A_WFI_20200801_221_156_L4/CBERS_4A_WFI_20200801_221_156_L4_BAND14.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/cbers-pds/CBERS4A/WFI/221/156/CBERS_4A_WFI_20200801_221_156_L4/CBERS_4A_WFI_20200801_221_156_L4_BAND14.tif -------------------------------------------------------------------------------- /tests/fixtures/cbers-pds/CBERS4A/WFI/221/156/CBERS_4A_WFI_20200801_221_156_L4/CBERS_4A_WFI_20200801_221_156_L4_BAND15.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/cbers-pds/CBERS4A/WFI/221/156/CBERS_4A_WFI_20200801_221_156_L4/CBERS_4A_WFI_20200801_221_156_L4_BAND15.tif -------------------------------------------------------------------------------- /tests/fixtures/cbers-pds/CBERS4A/WFI/221/156/CBERS_4A_WFI_20200801_221_156_L4/CBERS_4A_WFI_20200801_221_156_L4_BAND16.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/cbers-pds/CBERS4A/WFI/221/156/CBERS_4A_WFI_20200801_221_156_L4/CBERS_4A_WFI_20200801_221_156_L4_BAND16.tif -------------------------------------------------------------------------------- /tests/fixtures/cbers-pds/CBERS4A/WPM/209/139/CBERS_4A_WPM_20200730_209_139_L4/CBERS_4A_WPM_20200730_209_139_L4_BAND0.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/cbers-pds/CBERS4A/WPM/209/139/CBERS_4A_WPM_20200730_209_139_L4/CBERS_4A_WPM_20200730_209_139_L4_BAND0.tif -------------------------------------------------------------------------------- /tests/fixtures/cbers-pds/CBERS4A/WPM/209/139/CBERS_4A_WPM_20200730_209_139_L4/CBERS_4A_WPM_20200730_209_139_L4_BAND1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/cbers-pds/CBERS4A/WPM/209/139/CBERS_4A_WPM_20200730_209_139_L4/CBERS_4A_WPM_20200730_209_139_L4_BAND1.tif -------------------------------------------------------------------------------- /tests/fixtures/cbers-pds/CBERS4A/WPM/209/139/CBERS_4A_WPM_20200730_209_139_L4/CBERS_4A_WPM_20200730_209_139_L4_BAND2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/cbers-pds/CBERS4A/WPM/209/139/CBERS_4A_WPM_20200730_209_139_L4/CBERS_4A_WPM_20200730_209_139_L4_BAND2.tif -------------------------------------------------------------------------------- /tests/fixtures/cbers-pds/CBERS4A/WPM/209/139/CBERS_4A_WPM_20200730_209_139_L4/CBERS_4A_WPM_20200730_209_139_L4_BAND3.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/cbers-pds/CBERS4A/WPM/209/139/CBERS_4A_WPM_20200730_209_139_L4/CBERS_4A_WPM_20200730_209_139_L4_BAND3.tif -------------------------------------------------------------------------------- /tests/fixtures/cbers-pds/CBERS4A/WPM/209/139/CBERS_4A_WPM_20200730_209_139_L4/CBERS_4A_WPM_20200730_209_139_L4_BAND4.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/cbers-pds/CBERS4A/WPM/209/139/CBERS_4A_WPM_20200730_209_139_L4/CBERS_4A_WPM_20200730_209_139_L4_BAND4.tif -------------------------------------------------------------------------------- /tests/fixtures/copernicus-dem-30m/Copernicus_DSM_COG_10_N00_00_E006_00_DEM/Copernicus_DSM_COG_10_N00_00_E006_00_DEM.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/copernicus-dem-30m/Copernicus_DSM_COG_10_N00_00_E006_00_DEM/Copernicus_DSM_COG_10_N00_00_E006_00_DEM.tif -------------------------------------------------------------------------------- /tests/fixtures/copernicus-dem-90m/Copernicus_DSM_COG_30_S90_00_W164_00_DEM/Copernicus_DSM_COG_30_S90_00_W164_00_DEM.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/copernicus-dem-90m/Copernicus_DSM_COG_30_S90_00_W164_00_DEM/Copernicus_DSM_COG_30_S90_00_W164_00_DEM.tif -------------------------------------------------------------------------------- /tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_B1.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_B1.TIF -------------------------------------------------------------------------------- /tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_B1.TIF.ovr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_B1.TIF.ovr -------------------------------------------------------------------------------- /tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_B10.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_B10.TIF -------------------------------------------------------------------------------- /tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_B10.TIF.ovr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_B10.TIF.ovr -------------------------------------------------------------------------------- /tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_B11.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_B11.TIF -------------------------------------------------------------------------------- /tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_B11.TIF.ovr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_B11.TIF.ovr -------------------------------------------------------------------------------- /tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_B2.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_B2.TIF -------------------------------------------------------------------------------- /tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_B2.TIF.ovr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_B2.TIF.ovr -------------------------------------------------------------------------------- /tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_B3.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_B3.TIF -------------------------------------------------------------------------------- /tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_B3.TIF.ovr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_B3.TIF.ovr -------------------------------------------------------------------------------- /tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_B4.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_B4.TIF -------------------------------------------------------------------------------- /tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_B4.TIF.ovr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_B4.TIF.ovr -------------------------------------------------------------------------------- /tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_B5.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_B5.TIF -------------------------------------------------------------------------------- /tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_B5.TIF.ovr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_B5.TIF.ovr -------------------------------------------------------------------------------- /tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_B6.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_B6.TIF -------------------------------------------------------------------------------- /tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_B6.TIF.ovr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_B6.TIF.ovr -------------------------------------------------------------------------------- /tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_B7.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_B7.TIF -------------------------------------------------------------------------------- /tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_B7.TIF.ovr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_B7.TIF.ovr -------------------------------------------------------------------------------- /tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_B8.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_B8.TIF -------------------------------------------------------------------------------- /tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_B8.TIF.ovr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_B8.TIF.ovr -------------------------------------------------------------------------------- /tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_B9.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_B9.TIF -------------------------------------------------------------------------------- /tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_B9.TIF.ovr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_B9.TIF.ovr -------------------------------------------------------------------------------- /tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_BQA.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_BQA.TIF -------------------------------------------------------------------------------- /tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_BQA.TIF.ovr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/landsat-pds/c1/L8/016/037/LC08_L1TP_016037_20170813_20170814_01_RT/LC08_L1TP_016037_20170813_20170814_01_RT_BQA.TIF.ovr -------------------------------------------------------------------------------- /tests/fixtures/modis-pds/MCD43A4.006/21/11/2017006/MCD43A4.A2017006.h21v11.006.2017018074804_B01.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/modis-pds/MCD43A4.006/21/11/2017006/MCD43A4.A2017006.h21v11.006.2017018074804_B01.TIF -------------------------------------------------------------------------------- /tests/fixtures/modis-pds/MCD43A4.006/21/11/2017006/MCD43A4.A2017006.h21v11.006.2017018074804_B01qa.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/modis-pds/MCD43A4.006/21/11/2017006/MCD43A4.A2017006.h21v11.006.2017018074804_B01qa.TIF -------------------------------------------------------------------------------- /tests/fixtures/modis-pds/MCD43A4.006/21/11/2017006/MCD43A4.A2017006.h21v11.006.2017018074804_B02.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/modis-pds/MCD43A4.006/21/11/2017006/MCD43A4.A2017006.h21v11.006.2017018074804_B02.TIF -------------------------------------------------------------------------------- /tests/fixtures/modis-pds/MCD43A4.006/21/11/2017006/MCD43A4.A2017006.h21v11.006.2017018074804_B02qa.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/modis-pds/MCD43A4.006/21/11/2017006/MCD43A4.A2017006.h21v11.006.2017018074804_B02qa.TIF -------------------------------------------------------------------------------- /tests/fixtures/modis-pds/MCD43A4.006/21/11/2017006/MCD43A4.A2017006.h21v11.006.2017018074804_B03.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/modis-pds/MCD43A4.006/21/11/2017006/MCD43A4.A2017006.h21v11.006.2017018074804_B03.TIF -------------------------------------------------------------------------------- /tests/fixtures/modis-pds/MCD43A4.006/21/11/2017006/MCD43A4.A2017006.h21v11.006.2017018074804_B03qa.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/modis-pds/MCD43A4.006/21/11/2017006/MCD43A4.A2017006.h21v11.006.2017018074804_B03qa.TIF -------------------------------------------------------------------------------- /tests/fixtures/modis-pds/MCD43A4.006/21/11/2017006/MCD43A4.A2017006.h21v11.006.2017018074804_B04.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/modis-pds/MCD43A4.006/21/11/2017006/MCD43A4.A2017006.h21v11.006.2017018074804_B04.TIF -------------------------------------------------------------------------------- /tests/fixtures/modis-pds/MCD43A4.006/21/11/2017006/MCD43A4.A2017006.h21v11.006.2017018074804_B04qa.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/modis-pds/MCD43A4.006/21/11/2017006/MCD43A4.A2017006.h21v11.006.2017018074804_B04qa.TIF -------------------------------------------------------------------------------- /tests/fixtures/modis-pds/MCD43A4.006/21/11/2017006/MCD43A4.A2017006.h21v11.006.2017018074804_B05.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/modis-pds/MCD43A4.006/21/11/2017006/MCD43A4.A2017006.h21v11.006.2017018074804_B05.TIF -------------------------------------------------------------------------------- /tests/fixtures/modis-pds/MCD43A4.006/21/11/2017006/MCD43A4.A2017006.h21v11.006.2017018074804_B05qa.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/modis-pds/MCD43A4.006/21/11/2017006/MCD43A4.A2017006.h21v11.006.2017018074804_B05qa.TIF -------------------------------------------------------------------------------- /tests/fixtures/modis-pds/MCD43A4.006/21/11/2017006/MCD43A4.A2017006.h21v11.006.2017018074804_B06.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/modis-pds/MCD43A4.006/21/11/2017006/MCD43A4.A2017006.h21v11.006.2017018074804_B06.TIF -------------------------------------------------------------------------------- /tests/fixtures/modis-pds/MCD43A4.006/21/11/2017006/MCD43A4.A2017006.h21v11.006.2017018074804_B06qa.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/modis-pds/MCD43A4.006/21/11/2017006/MCD43A4.A2017006.h21v11.006.2017018074804_B06qa.TIF -------------------------------------------------------------------------------- /tests/fixtures/modis-pds/MCD43A4.006/21/11/2017006/MCD43A4.A2017006.h21v11.006.2017018074804_B07.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/modis-pds/MCD43A4.006/21/11/2017006/MCD43A4.A2017006.h21v11.006.2017018074804_B07.TIF -------------------------------------------------------------------------------- /tests/fixtures/modis-pds/MCD43A4.006/21/11/2017006/MCD43A4.A2017006.h21v11.006.2017018074804_B07qa.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/modis-pds/MCD43A4.006/21/11/2017006/MCD43A4.A2017006.h21v11.006.2017018074804_B07qa.TIF -------------------------------------------------------------------------------- /tests/fixtures/sentinel-cogs/sentinel-s2-l2a-cogs/29/R/KH/2020/2/S2A_29RKH_20200219_0_L2A/AOT.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-cogs/sentinel-s2-l2a-cogs/29/R/KH/2020/2/S2A_29RKH_20200219_0_L2A/AOT.tif -------------------------------------------------------------------------------- /tests/fixtures/sentinel-cogs/sentinel-s2-l2a-cogs/29/R/KH/2020/2/S2A_29RKH_20200219_0_L2A/B01.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-cogs/sentinel-s2-l2a-cogs/29/R/KH/2020/2/S2A_29RKH_20200219_0_L2A/B01.tif -------------------------------------------------------------------------------- /tests/fixtures/sentinel-cogs/sentinel-s2-l2a-cogs/29/R/KH/2020/2/S2A_29RKH_20200219_0_L2A/B02.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-cogs/sentinel-s2-l2a-cogs/29/R/KH/2020/2/S2A_29RKH_20200219_0_L2A/B02.tif -------------------------------------------------------------------------------- /tests/fixtures/sentinel-cogs/sentinel-s2-l2a-cogs/29/R/KH/2020/2/S2A_29RKH_20200219_0_L2A/B03.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-cogs/sentinel-s2-l2a-cogs/29/R/KH/2020/2/S2A_29RKH_20200219_0_L2A/B03.tif -------------------------------------------------------------------------------- /tests/fixtures/sentinel-cogs/sentinel-s2-l2a-cogs/29/R/KH/2020/2/S2A_29RKH_20200219_0_L2A/B04.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-cogs/sentinel-s2-l2a-cogs/29/R/KH/2020/2/S2A_29RKH_20200219_0_L2A/B04.tif -------------------------------------------------------------------------------- /tests/fixtures/sentinel-cogs/sentinel-s2-l2a-cogs/29/R/KH/2020/2/S2A_29RKH_20200219_0_L2A/B05.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-cogs/sentinel-s2-l2a-cogs/29/R/KH/2020/2/S2A_29RKH_20200219_0_L2A/B05.tif -------------------------------------------------------------------------------- /tests/fixtures/sentinel-cogs/sentinel-s2-l2a-cogs/29/R/KH/2020/2/S2A_29RKH_20200219_0_L2A/B06.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-cogs/sentinel-s2-l2a-cogs/29/R/KH/2020/2/S2A_29RKH_20200219_0_L2A/B06.tif -------------------------------------------------------------------------------- /tests/fixtures/sentinel-cogs/sentinel-s2-l2a-cogs/29/R/KH/2020/2/S2A_29RKH_20200219_0_L2A/B07.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-cogs/sentinel-s2-l2a-cogs/29/R/KH/2020/2/S2A_29RKH_20200219_0_L2A/B07.tif -------------------------------------------------------------------------------- /tests/fixtures/sentinel-cogs/sentinel-s2-l2a-cogs/29/R/KH/2020/2/S2A_29RKH_20200219_0_L2A/B08.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-cogs/sentinel-s2-l2a-cogs/29/R/KH/2020/2/S2A_29RKH_20200219_0_L2A/B08.tif -------------------------------------------------------------------------------- /tests/fixtures/sentinel-cogs/sentinel-s2-l2a-cogs/29/R/KH/2020/2/S2A_29RKH_20200219_0_L2A/B09.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-cogs/sentinel-s2-l2a-cogs/29/R/KH/2020/2/S2A_29RKH_20200219_0_L2A/B09.tif -------------------------------------------------------------------------------- /tests/fixtures/sentinel-cogs/sentinel-s2-l2a-cogs/29/R/KH/2020/2/S2A_29RKH_20200219_0_L2A/B11.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-cogs/sentinel-s2-l2a-cogs/29/R/KH/2020/2/S2A_29RKH_20200219_0_L2A/B11.tif -------------------------------------------------------------------------------- /tests/fixtures/sentinel-cogs/sentinel-s2-l2a-cogs/29/R/KH/2020/2/S2A_29RKH_20200219_0_L2A/B12.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-cogs/sentinel-s2-l2a-cogs/29/R/KH/2020/2/S2A_29RKH_20200219_0_L2A/B12.tif -------------------------------------------------------------------------------- /tests/fixtures/sentinel-cogs/sentinel-s2-l2a-cogs/29/R/KH/2020/2/S2A_29RKH_20200219_0_L2A/B8A.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-cogs/sentinel-s2-l2a-cogs/29/R/KH/2020/2/S2A_29RKH_20200219_0_L2A/B8A.tif -------------------------------------------------------------------------------- /tests/fixtures/sentinel-cogs/sentinel-s2-l2a-cogs/29/R/KH/2020/2/S2A_29RKH_20200219_0_L2A/L2A_PVI.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-cogs/sentinel-s2-l2a-cogs/29/R/KH/2020/2/S2A_29RKH_20200219_0_L2A/L2A_PVI.tif -------------------------------------------------------------------------------- /tests/fixtures/sentinel-cogs/sentinel-s2-l2a-cogs/29/R/KH/2020/2/S2A_29RKH_20200219_0_L2A/SCL.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-cogs/sentinel-s2-l2a-cogs/29/R/KH/2020/2/S2A_29RKH_20200219_0_L2A/SCL.tif -------------------------------------------------------------------------------- /tests/fixtures/sentinel-cogs/sentinel-s2-l2a-cogs/29/R/KH/2020/2/S2A_29RKH_20200219_0_L2A/TCI.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-cogs/sentinel-s2-l2a-cogs/29/R/KH/2020/2/S2A_29RKH_20200219_0_L2A/TCI.tif -------------------------------------------------------------------------------- /tests/fixtures/sentinel-cogs/sentinel-s2-l2a-cogs/29/R/KH/2020/2/S2A_29RKH_20200219_0_L2A/WVP.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-cogs/sentinel-s2-l2a-cogs/29/R/KH/2020/2/S2A_29RKH_20200219_0_L2A/WVP.tif -------------------------------------------------------------------------------- /tests/fixtures/sentinel-cogs/sentinel-s2-l2a-cogs/31/N/BJ/2019/5/S2A_31NBJ_20190524_0_L2A/S2A_31NBJ_20190524_0_L2A.json: -------------------------------------------------------------------------------- 1 | {"type":"Feature","stac_version":"1.0.0-beta.2","stac_extensions":["eo","view","proj"],"id":"S2A_31NBJ_20190524_0_L2A","bbox":[0.27758575672297514,7.140823912195332,1.2774933588684951,8.138354360032071],"geometry":{"type":"Polygon","coordinates":[[[0.2838624071490842,7.140823912195332],[0.27758575672297514,8.132898865512598],[1.273509283430528,8.138354360032071],[1.2774933588684951,7.145606788355981],[0.2838624071490842,7.140823912195332]]]},"properties":{"datetime":"2019-05-24T10:28:59Z","platform":"sentinel-2a","constellation":"sentinel-2","instruments":["msi"],"gsd":10,"view:off_nadir":0,"proj:epsg":32631,"sentinel:latitude_band":"N","sentinel:grid_square":"BJ","sentinel:sequence":"0","sentinel:product_id":"S2A_MSIL2A_20190524T101031_N0212_R022_T31NBJ_20190524T130304","sentinel:data_coverage":100,"created":"2020-08-28T04:30:59.407Z","updated":"2020-08-28T04:30:59.407Z","sentinel:valid_cloud_cover":false,"eo:cloud_cover":0,"sentinel:utm_zone":31},"collection":"sentinel-s2-l2a-cogs","assets":{"thumbnail":{"title":"Thumbnail","type":"image/png","href":"https://roda.sentinel-hub.com/sentinel-s2-l1c/tiles/31/N/BJ/2019/5/24/0/preview.jpg","roles":["thumbnail"]},"overview":{"title":"True color image","type":"image/tiff; application=geotiff; profile=cloud-optimized","href":"https://sentinel-cogs.s3.us-west-2.amazonaws.com/sentinel-s2-l2a-cogs/31/N/BJ/2019/5/S2A_31NBJ_20190524_0_L2A/L2A_PVI.tif","roles":["overview"],"eo:bands":[{"full_width_half_max":0.038,"center_wavelength":0.6645,"name":"B04","common_name":"red"},{"full_width_half_max":0.045,"center_wavelength":0.56,"name":"B03","common_name":"green"},{"full_width_half_max":0.098,"center_wavelength":0.4966,"name":"B02","common_name":"blue"}],"gsd":10,"proj:shape":[343,343],"proj:transform":[320,0,199980,0,-320,900000,0,0,1]},"info":{"title":"Original JSON metadata","type":"application/json","href":"https://roda.sentinel-hub.com/sentinel-s2-l2a/tiles/31/N/BJ/2019/5/24/0/tileInfo.json","roles":["metadata"]},"metadata":{"title":"Original XML metadata","type":"application/xml","href":"https://roda.sentinel-hub.com/sentinel-s2-l2a/tiles/31/N/BJ/2019/5/24/0/metadata.xml","roles":["metadata"]},"visual":{"title":"True color image","type":"image/tiff; application=geotiff; profile=cloud-optimized","href":"https://sentinel-cogs.s3.us-west-2.amazonaws.com/sentinel-s2-l2a-cogs/31/N/BJ/2019/5/S2A_31NBJ_20190524_0_L2A/TCI.tif","roles":["overview"],"eo:bands":[{"full_width_half_max":0.038,"center_wavelength":0.6645,"name":"B04","common_name":"red"},{"full_width_half_max":0.045,"center_wavelength":0.56,"name":"B03","common_name":"green"},{"full_width_half_max":0.098,"center_wavelength":0.4966,"name":"B02","common_name":"blue"}],"gsd":10,"proj:shape":[10980,10980],"proj:transform":[10,0,199980,0,-10,900000,0,0,1]},"B01":{"title":"Band 1 (coastal)","type":"image/tiff; application=geotiff; profile=cloud-optimized","href":"https://sentinel-cogs.s3.us-west-2.amazonaws.com/sentinel-s2-l2a-cogs/31/N/BJ/2019/5/S2A_31NBJ_20190524_0_L2A/B01.tif","roles":["data"],"eo:bands":[{"full_width_half_max":0.027,"center_wavelength":0.4439,"name":"B01","common_name":"coastal"}],"gsd":60,"proj:shape":[1830,1830],"proj:transform":[60,0,199980,0,-60,900000,0,0,1]},"B02":{"title":"Band 2 (blue)","type":"image/tiff; application=geotiff; profile=cloud-optimized","href":"https://sentinel-cogs.s3.us-west-2.amazonaws.com/sentinel-s2-l2a-cogs/31/N/BJ/2019/5/S2A_31NBJ_20190524_0_L2A/B02.tif","roles":["data"],"eo:bands":[{"full_width_half_max":0.098,"center_wavelength":0.4966,"name":"B02","common_name":"blue"}],"gsd":10,"proj:shape":[10980,10980],"proj:transform":[10,0,199980,0,-10,900000,0,0,1]},"B03":{"title":"Band 3 (green)","type":"image/tiff; application=geotiff; profile=cloud-optimized","href":"https://sentinel-cogs.s3.us-west-2.amazonaws.com/sentinel-s2-l2a-cogs/31/N/BJ/2019/5/S2A_31NBJ_20190524_0_L2A/B03.tif","roles":["data"],"eo:bands":[{"full_width_half_max":0.045,"center_wavelength":0.56,"name":"B03","common_name":"green"}],"gsd":10,"proj:shape":[10980,10980],"proj:transform":[10,0,199980,0,-10,900000,0,0,1]},"B04":{"title":"Band 4 (red)","type":"image/tiff; application=geotiff; profile=cloud-optimized","href":"https://sentinel-cogs.s3.us-west-2.amazonaws.com/sentinel-s2-l2a-cogs/31/N/BJ/2019/5/S2A_31NBJ_20190524_0_L2A/B04.tif","roles":["data"],"eo:bands":[{"full_width_half_max":0.038,"center_wavelength":0.6645,"name":"B04","common_name":"red"}],"gsd":10,"proj:shape":[10980,10980],"proj:transform":[10,0,199980,0,-10,900000,0,0,1]},"B05":{"title":"Band 5","type":"image/tiff; application=geotiff; profile=cloud-optimized","href":"https://sentinel-cogs.s3.us-west-2.amazonaws.com/sentinel-s2-l2a-cogs/31/N/BJ/2019/5/S2A_31NBJ_20190524_0_L2A/B05.tif","roles":["data"],"eo:bands":[{"full_width_half_max":0.019,"center_wavelength":0.7039,"name":"B05"}],"gsd":20,"proj:shape":[5490,5490],"proj:transform":[20,0,199980,0,-20,900000,0,0,1]},"B06":{"title":"Band 6","type":"image/tiff; application=geotiff; profile=cloud-optimized","href":"https://sentinel-cogs.s3.us-west-2.amazonaws.com/sentinel-s2-l2a-cogs/31/N/BJ/2019/5/S2A_31NBJ_20190524_0_L2A/B06.tif","roles":["data"],"eo:bands":[{"full_width_half_max":0.018,"center_wavelength":0.7402,"name":"B06"}],"gsd":20,"proj:shape":[5490,5490],"proj:transform":[20,0,199980,0,-20,900000,0,0,1]},"B07":{"title":"Band 7","type":"image/tiff; application=geotiff; profile=cloud-optimized","href":"https://sentinel-cogs.s3.us-west-2.amazonaws.com/sentinel-s2-l2a-cogs/31/N/BJ/2019/5/S2A_31NBJ_20190524_0_L2A/B07.tif","roles":["data"],"eo:bands":[{"full_width_half_max":0.028,"center_wavelength":0.7825,"name":"B07"}],"gsd":20,"proj:shape":[5490,5490],"proj:transform":[20,0,199980,0,-20,900000,0,0,1]},"B08":{"title":"Band 8 (nir)","type":"image/tiff; application=geotiff; profile=cloud-optimized","href":"https://sentinel-cogs.s3.us-west-2.amazonaws.com/sentinel-s2-l2a-cogs/31/N/BJ/2019/5/S2A_31NBJ_20190524_0_L2A/B08.tif","roles":["data"],"eo:bands":[{"full_width_half_max":0.145,"center_wavelength":0.8351,"name":"B08","common_name":"nir"}],"gsd":10,"proj:shape":[10980,10980],"proj:transform":[10,0,199980,0,-10,900000,0,0,1]},"B8A":{"title":"Band 8A","type":"image/tiff; application=geotiff; profile=cloud-optimized","href":"https://sentinel-cogs.s3.us-west-2.amazonaws.com/sentinel-s2-l2a-cogs/31/N/BJ/2019/5/S2A_31NBJ_20190524_0_L2A/B8A.tif","roles":["data"],"eo:bands":[{"full_width_half_max":0.033,"center_wavelength":0.8648,"name":"B8A"}],"gsd":20,"proj:shape":[5490,5490],"proj:transform":[20,0,199980,0,-20,900000,0,0,1]},"B09":{"title":"Band 9","type":"image/tiff; application=geotiff; profile=cloud-optimized","href":"https://sentinel-cogs.s3.us-west-2.amazonaws.com/sentinel-s2-l2a-cogs/31/N/BJ/2019/5/S2A_31NBJ_20190524_0_L2A/B09.tif","roles":["data"],"eo:bands":[{"full_width_half_max":0.026,"center_wavelength":0.945,"name":"B09"}],"gsd":60,"proj:shape":[1830,1830],"proj:transform":[60,0,199980,0,-60,900000,0,0,1]},"B11":{"title":"Band 11 (swir16)","type":"image/tiff; application=geotiff; profile=cloud-optimized","href":"https://sentinel-cogs.s3.us-west-2.amazonaws.com/sentinel-s2-l2a-cogs/31/N/BJ/2019/5/S2A_31NBJ_20190524_0_L2A/B11.tif","roles":["data"],"eo:bands":[{"full_width_half_max":0.143,"center_wavelength":1.6137,"name":"B11","common_name":"swir16"}],"gsd":20,"proj:shape":[5490,5490],"proj:transform":[20,0,199980,0,-20,900000,0,0,1]},"B12":{"title":"Band 12 (swir22)","type":"image/tiff; application=geotiff; profile=cloud-optimized","href":"https://sentinel-cogs.s3.us-west-2.amazonaws.com/sentinel-s2-l2a-cogs/31/N/BJ/2019/5/S2A_31NBJ_20190524_0_L2A/B12.tif","roles":["data"],"eo:bands":[{"full_width_half_max":0.242,"center_wavelength":2.22024,"name":"B12","common_name":"swir22"}],"gsd":20,"proj:shape":[5490,5490],"proj:transform":[20,0,199980,0,-20,900000,0,0,1]},"AOT":{"title":"Aerosol Optical Thickness (AOT)","type":"image/tiff; application=geotiff; profile=cloud-optimized","href":"https://sentinel-cogs.s3.us-west-2.amazonaws.com/sentinel-s2-l2a-cogs/31/N/BJ/2019/5/S2A_31NBJ_20190524_0_L2A/AOT.tif","roles":["data"],"proj:shape":[1830,1830],"proj:transform":[60,0,199980,0,-60,900000,0,0,1]},"WVP":{"title":"Water Vapour (WVP)","type":"image/tiff; application=geotiff; profile=cloud-optimized","href":"https://sentinel-cogs.s3.us-west-2.amazonaws.com/sentinel-s2-l2a-cogs/31/N/BJ/2019/5/S2A_31NBJ_20190524_0_L2A/WVP.tif","roles":["data"],"proj:shape":[10980,10980],"proj:transform":[10,0,199980,0,-10,900000,0,0,1]},"SCL":{"title":"Scene Classification Map (SCL)","type":"image/tiff; application=geotiff; profile=cloud-optimized","href":"https://sentinel-cogs.s3.us-west-2.amazonaws.com/sentinel-s2-l2a-cogs/31/N/BJ/2019/5/S2A_31NBJ_20190524_0_L2A/SCL.tif","roles":["data"],"proj:shape":[5490,5490],"proj:transform":[20,0,199980,0,-20,900000,0,0,1]}},"links":[{"rel":"self","href":"https://sentinel-cogs.s3.us-west-2.amazonaws.com/sentinel-s2-l2a-cogs/31/N/BJ/2019/5/S2A_31NBJ_20190524_0_L2A/S2A_31NBJ_20190524_0_L2A.json","type":"application/json"},{"rel":"canonical","href":"https://sentinel-cogs.s3.us-west-2.amazonaws.com/sentinel-s2-l2a-cogs/31/N/BJ/2019/5/S2A_31NBJ_20190524_0_L2A/S2A_31NBJ_20190524_0_L2A.json","type":"application/json"},{"rel":"parent","href":"https://earth-search.aws.element84.com/v0/collections/sentinel-s2-l2a"},{"rel":"collection","href":"https://earth-search.aws.element84.com/v0/collections/sentinel-s2-l2a"},{"rel":"root","href":"https://earth-search.aws.element84.com/v0/"},{"title":"Source STAC Item","rel":"derived_from","href":"https://earth-search.aws.element84.com/v0/collections/sentinel-s2-l2a/items/S2A_31NBJ_20190524_0_L2A","type":"application/json"}]} 2 | -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s1-l1c/GRD/2018/7/16/IW/DV/S1A_IW_GRDH_1SDV_20180716T004042_20180716T004107_022812_02792A_FD5B/measurement/iw-vh.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s1-l1c/GRD/2018/7/16/IW/DV/S1A_IW_GRDH_1SDV_20180716T004042_20180716T004107_022812_02792A_FD5B/measurement/iw-vh.tiff -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s1-l1c/GRD/2018/7/16/IW/DV/S1A_IW_GRDH_1SDV_20180716T004042_20180716T004107_022812_02792A_FD5B/measurement/iw-vv.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s1-l1c/GRD/2018/7/16/IW/DV/S1A_IW_GRDH_1SDV_20180716T004042_20180716T004107_022812_02792A_FD5B/measurement/iw-vv.tiff -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s1-l1c/GRD/2018/7/16/IW/DV/S1A_IW_GRDH_1SDV_20180716T004042_20180716T004107_022812_02792A_FD5B/productInfo.json: -------------------------------------------------------------------------------- 1 | { 2 | "id" : "S1A_IW_GRDH_1SDV_20180716T004042_20180716T004107_022812_02792A_FD5B", 3 | "path" : "GRD/2018/7/16/IW/DV/S1A_IW_GRDH_1SDV_20180716T004042_20180716T004107_022812_02792A_FD5B", 4 | "missionId" : "S1A", 5 | "productType" : "GRD", 6 | "mode" : "IW", 7 | "polarization" : "DV", 8 | "startTime" : "2018-07-16T00:40:42", 9 | "stopTime" : "2018-07-16T00:41:07", 10 | "absoluteOrbitNumber" : 22812, 11 | "missionDataTakeId" : 162090, 12 | "productUniqueIdentifier" : "FD5B", 13 | "sciHubIngestion" : "2018-07-16T07:08:26.620Z", 14 | "s3Ingestion" : "2018-07-18T21:36:32.805Z", 15 | "sciHubId" : "3074a802-abec-4603-b291-c84d27d3ea62", 16 | "footprint" : { 17 | "type" : "Polygon", 18 | "crs" : { 19 | "type" : "name", 20 | "properties" : { 21 | "name" : "urn:ogc:def:crs:EPSG:8.8.1:4326" 22 | } 23 | }, 24 | "coordinates" : [ [ [ 77.891296, 9.225784 ], [ 75.605247, 9.682624 ], [ 75.906174, 11.190425 ], [ 78.203903, 10.737548 ], [ 77.891296, 9.225784 ] ] ] 25 | }, 26 | "filenameMap" : { 27 | "annotation/calibration/noise-s1a-iw-grd-vv-20180716t004042-20180716t004107-022812-02792a-001.xml" : "annotation/calibration/noise-iw-vv.xml", 28 | "support/s1-level-1-calibration.xsd" : "support/s1-level-1-calibration.xsd", 29 | "annotation/s1a-iw-grd-vh-20180716t004042-20180716t004107-022812-02792a-002.xml" : "annotation/iw-vh.xml", 30 | "support/s1-map-overlay.xsd" : "support/s1-map-overlay.xsd", 31 | "preview/map-overlay.kml" : "preview/map-overlay.kml", 32 | "annotation/calibration/noise-s1a-iw-grd-vh-20180716t004042-20180716t004107-022812-02792a-002.xml" : "annotation/calibration/noise-iw-vh.xml", 33 | "annotation/calibration/calibration-s1a-iw-grd-vv-20180716t004042-20180716t004107-022812-02792a-001.xml" : "annotation/calibration/calibration-iw-vv.xml", 34 | "support/s1-product-preview.xsd" : "support/s1-product-preview.xsd", 35 | "annotation/s1a-iw-grd-vv-20180716t004042-20180716t004107-022812-02792a-001.xml" : "annotation/iw-vv.xml", 36 | "measurement/s1a-iw-grd-vv-20180716t004042-20180716t004107-022812-02792a-001.tiff" : "measurement/iw-vv.tiff", 37 | "annotation/calibration/calibration-s1a-iw-grd-vh-20180716t004042-20180716t004107-022812-02792a-002.xml" : "annotation/calibration/calibration-iw-vh.xml", 38 | "support/s1-level-1-quicklook.xsd" : "support/s1-level-1-quicklook.xsd", 39 | "support/s1-object-types.xsd" : "support/s1-object-types.xsd", 40 | "preview/product-preview.html" : "preview/product-preview.html", 41 | "support/s1-level-1-measurement.xsd" : "support/s1-level-1-measurement.xsd", 42 | "support/s1-level-1-noise.xsd" : "support/s1-level-1-noise.xsd", 43 | "support/s1-level-1-product.xsd" : "support/s1-level-1-product.xsd", 44 | "preview/quick-look.png" : "preview/quick-look.png", 45 | "S1A_IW_GRDH_1SDV_20180716T004042_20180716T004107_022812_02792A_FD5B.SAFE-report-20180716T060823.pdf" : "report-20180716T060823.pdf", 46 | "manifest.safe" : "manifest.safe", 47 | "preview/icons/logo.png" : "preview/icons/logo.png", 48 | "measurement/s1a-iw-grd-vh-20180716t004042-20180716t004107-022812-02792a-002.tiff" : "measurement/iw-vh.tiff" 49 | } 50 | } -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s1-l1c/GRD/2023/7/26/IW/DV/S1A_IW_GRDH_1SDV_20230726T183302_20230726T183327_049598_05F6CA_31E7/productInfo.json: -------------------------------------------------------------------------------- 1 | { 2 | "id" : "S1A_IW_GRDH_1SDV_20230726T183302_20230726T183327_049598_05F6CA_31E7", 3 | "path" : "GRD/2023/7/26/IW/DV/S1A_IW_GRDH_1SDV_20230726T183302_20230726T183327_049598_05F6CA_31E7", 4 | "missionId" : "S1A", 5 | "productType" : "GRD", 6 | "resolution" : "H", 7 | "mode" : "IW", 8 | "polarization" : "DV", 9 | "startTime" : "2023-07-26T18:33:02", 10 | "stopTime" : "2023-07-26T18:33:27", 11 | "absoluteOrbitNumber" : 49598, 12 | "missionDataTakeId" : 390858, 13 | "productUniqueIdentifier" : "31E7", 14 | "sciHubIngestion" : "2023-07-26T20:28:27.549Z", 15 | "s3Ingestion" : "2023-07-26T22:35:57.571Z", 16 | "sciHubId" : "ed042e78-376d-4614-a73e-83f79ea463b6", 17 | "footprint" : { 18 | "type" : "MultiPolygon", 19 | "coordinates" : [ [ [ [ 180.0, 62.52138872791733 ], [ 179.94979152463551, 62.52658106629492 ], [ 179.46990657679865, 62.57485506167223 ], [ 178.9813798181196, 62.6221501683127 ], [ 178.738681118481, 62.644959850172626 ], [ 178.25266997765007, 62.689273025316226 ], [ 177.77391401557458, 62.73116163376606 ], [ 177.53029365830048, 62.751804324749735 ], [ 177.04869673747694, 62.791293247459784 ], [ 176.5508378718863, 62.83026664501019 ], [ 176.3037281203709, 62.848922159103715 ], [ 175.84591004046774, 62.88226850489882 ], [ 175.7832968544936, 62.70374482277905 ], [ 175.72211102575443, 62.52504447786457 ], [ 175.66527915232953, 62.34605015536937 ], [ 175.6053588236643, 62.16729040474062 ], [ 175.54817449400198, 61.98834960555291 ], [ 175.48844521186035, 61.80960524230824 ], [ 175.38292995222957, 61.49054362053522 ], [ 175.82589036146206, 61.4571792745189 ], [ 176.05957913992813, 61.43895767761053 ], [ 176.52612531192008, 61.40131515991415 ], [ 176.9915270239868, 61.362078698156 ], [ 177.22378541508246, 61.341864763256126 ], [ 177.68739115241843, 61.300249793064 ], [ 178.14974778134427, 61.257057591701475 ], [ 178.38044504519894, 61.2348723445106 ], [ 178.84085245503275, 61.1893278399659 ], [ 179.29991114903933, 61.14222431125801 ], [ 179.52892267707472, 61.11809024266489 ], [ 179.97829453382462, 61.06949078480844 ], [ 180.0, 61.115074335603865 ], [ 180.0, 62.52138872791733 ] ] ], [ [ [ -180.0, 62.52138872791733 ], [ -180.0, 61.115074335603865 ], [ -179.95528668344312, 61.208976568342585 ], [ -179.86990854106338, 61.386675758949224 ], [ -179.78377141580856, 61.564335906363944 ], [ -179.69686099291556, 61.7419564176713 ], [ -179.60916260861518, 61.91953667731231 ], [ -179.52066123106215, 62.09707606329313 ], [ -179.43134387930303, 62.27457416563086 ], [ -179.34123633603335, 62.451941133348306 ], [ -179.81084543337622, 62.50182719954094 ], [ -180.0, 62.52138872791733 ] ] ] ] 20 | }, 21 | "filenameMap" : { 22 | "support/s1-level-1-calibration.xsd" : "support/s1-level-1-calibration.xsd", 23 | "annotation/s1a-iw-grd-vh-20230726t183302-20230726t183327-049598-05f6ca-002.xml" : "annotation/iw-vh.xml", 24 | "S1A_IW_GRDH_1SDV_20230726T183302_20230726T183327_049598_05F6CA_31E7.SAFE-report-20230726T202509.pdf" : "report-20230726T202509.pdf", 25 | "support/s1-product-preview.xsd" : "support/s1-product-preview.xsd", 26 | "measurement/s1a-iw-grd-vv-20230726t183302-20230726t183327-049598-05f6ca-001.tiff" : "measurement/iw-vv.tiff", 27 | "annotation/s1a-iw-grd-vv-20230726t183302-20230726t183327-049598-05f6ca-001.xml" : "annotation/iw-vv.xml", 28 | "support/s1-level-1-noise.xsd" : "support/s1-level-1-noise.xsd", 29 | "preview/quick-look.png" : "preview/quick-look.png", 30 | "manifest.safe" : "manifest.safe", 31 | "preview/icons/logo.png" : "preview/icons/logo.png", 32 | "annotation/calibration/noise-s1a-iw-grd-vv-20230726t183302-20230726t183327-049598-05f6ca-001.xml" : "annotation/calibration/noise-iw-vv.xml", 33 | "support/s1-map-overlay.xsd" : "support/s1-map-overlay.xsd", 34 | "annotation/calibration/noise-s1a-iw-grd-vh-20230726t183302-20230726t183327-049598-05f6ca-002.xml" : "annotation/calibration/noise-iw-vh.xml", 35 | "preview/map-overlay.kml" : "preview/map-overlay.kml", 36 | "annotation/rfi/rfi-s1a-iw-grd-vh-20230726t183302-20230726t183327-049598-05f6ca-002.xml" : "annotation/rfi/rfi-iw-vh.xml", 37 | "annotation/calibration/calibration-s1a-iw-grd-vv-20230726t183302-20230726t183327-049598-05f6ca-001.xml" : "annotation/calibration/calibration-iw-vv.xml", 38 | "annotation/rfi/rfi-s1a-iw-grd-vv-20230726t183302-20230726t183327-049598-05f6ca-001.xml" : "annotation/rfi/rfi-iw-vv.xml", 39 | "annotation/calibration/calibration-s1a-iw-grd-vh-20230726t183302-20230726t183327-049598-05f6ca-002.xml" : "annotation/calibration/calibration-iw-vh.xml", 40 | "support/s1-object-types.xsd" : "support/s1-object-types.xsd", 41 | "support/s1-level-1-quicklook.xsd" : "support/s1-level-1-quicklook.xsd", 42 | "preview/product-preview.html" : "preview/product-preview.html", 43 | "support/s1-level-1-rfi.xsd" : "support/s1-level-1-rfi.xsd", 44 | "support/s1-level-1-measurement.xsd" : "support/s1-level-1-measurement.xsd", 45 | "support/s1-level-1-product.xsd" : "support/s1-level-1-product.xsd", 46 | "measurement/s1a-iw-grd-vh-20230726t183302-20230726t183327-049598-05f6ca-002.tiff" : "measurement/iw-vh.tiff" 47 | }, 48 | "version" : 3 49 | } -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s1-l1c/GRD/2023/8/9/S1/DV/S1A_S1_GRDH_1SDV_20230809T020729_20230809T020754_049792_05FCE6_1175/measurement/s1-vh.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s1-l1c/GRD/2023/8/9/S1/DV/S1A_S1_GRDH_1SDV_20230809T020729_20230809T020754_049792_05FCE6_1175/measurement/s1-vh.tiff -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s1-l1c/GRD/2023/8/9/S1/DV/S1A_S1_GRDH_1SDV_20230809T020729_20230809T020754_049792_05FCE6_1175/productInfo.json: -------------------------------------------------------------------------------- 1 | { 2 | "id" : "S1A_S1_GRDH_1SDV_20230809T020729_20230809T020754_049792_05FCE6_1175", 3 | "path" : "GRD/2023/8/9/S1/DV/S1A_S1_GRDH_1SDV_20230809T020729_20230809T020754_049792_05FCE6_1175", 4 | "missionId" : "S1A", 5 | "productType" : "GRD", 6 | "resolution" : "H", 7 | "mode" : "S1", 8 | "polarization" : "DV", 9 | "startTime" : "2023-08-09T02:07:29", 10 | "stopTime" : "2023-08-09T02:07:54", 11 | "absoluteOrbitNumber" : 49792, 12 | "missionDataTakeId" : 392422, 13 | "productUniqueIdentifier" : "1175", 14 | "sciHubIngestion" : "2023-08-09T08:16:36.948Z", 15 | "s3Ingestion" : "2023-08-09T10:24:15.088Z", 16 | "sciHubId" : "10e1fa60-fa51-4e9f-b56e-608608bfa60c", 17 | "footprint" : { 18 | "type" : "MultiPolygon", 19 | "coordinates" : [ [ [ [ 55.858765023967315, -4.022203076791528 ], [ 55.15269410781527, -3.8687201770035715 ], [ 54.84048193722755, -5.343071773846793 ], [ 55.54787619756915, -5.497421358669248 ], [ 55.858765023967315, -4.022203076791528 ] ] ] ] 20 | }, 21 | "filenameMap" : { 22 | "support/s1-level-1-calibration.xsd" : "support/s1-level-1-calibration.xsd", 23 | "measurement/s1a-s1-grd-vh-20230809t020729-20230809t020754-049792-05fce6-002.tiff" : "measurement/s1-vh.tiff", 24 | "annotation/s1a-s1-grd-vh-20230809t020729-20230809t020754-049792-05fce6-002.xml" : "annotation/s1-vh.xml", 25 | "annotation/s1a-s1-grd-vv-20230809t020729-20230809t020754-049792-05fce6-001.xml" : "annotation/s1-vv.xml", 26 | "measurement/s1a-s1-grd-vv-20230809t020729-20230809t020754-049792-05fce6-001.tiff" : "measurement/s1-vv.tiff", 27 | "support/s1-product-preview.xsd" : "support/s1-product-preview.xsd", 28 | "annotation/calibration/calibration-s1a-s1-grd-vh-20230809t020729-20230809t020754-049792-05fce6-002.xml" : "annotation/calibration/calibration-s1-vh.xml", 29 | "annotation/rfi/rfi-s1a-s1-grd-vv-20230809t020729-20230809t020754-049792-05fce6-001.xml" : "annotation/rfi/rfi-s1-vv.xml", 30 | "annotation/calibration/calibration-s1a-s1-grd-vv-20230809t020729-20230809t020754-049792-05fce6-001.xml" : "annotation/calibration/calibration-s1-vv.xml", 31 | "support/s1-level-1-noise.xsd" : "support/s1-level-1-noise.xsd", 32 | "annotation/calibration/noise-s1a-s1-grd-vh-20230809t020729-20230809t020754-049792-05fce6-002.xml" : "annotation/calibration/noise-s1-vh.xml", 33 | "preview/quick-look.png" : "preview/quick-look.png", 34 | "manifest.safe" : "manifest.safe", 35 | "preview/icons/logo.png" : "preview/icons/logo.png", 36 | "support/s1-map-overlay.xsd" : "support/s1-map-overlay.xsd", 37 | "preview/map-overlay.kml" : "preview/map-overlay.kml", 38 | "preview/product-preview.html" : "preview/product-preview.html", 39 | "support/s1-level-1-quicklook.xsd" : "support/s1-level-1-quicklook.xsd", 40 | "support/s1-object-types.xsd" : "support/s1-object-types.xsd", 41 | "support/s1-level-1-rfi.xsd" : "support/s1-level-1-rfi.xsd", 42 | "annotation/rfi/rfi-s1a-s1-grd-vh-20230809t020729-20230809t020754-049792-05fce6-002.xml" : "annotation/rfi/rfi-s1-vh.xml", 43 | "support/s1-level-1-measurement.xsd" : "support/s1-level-1-measurement.xsd", 44 | "support/s1-level-1-product.xsd" : "support/s1-level-1-product.xsd", 45 | "S1A_S1_GRDH_1SDV_20230809T020729_20230809T020754_049792_05FCE6_1175.SAFE-report-20230809T081019.pdf" : "report-20230809T081019.pdf", 46 | "annotation/calibration/noise-s1a-s1-grd-vv-20230809t020729-20230809t020754-049792-05fce6-001.xml" : "annotation/calibration/noise-s1-vv.xml" 47 | }, 48 | "version" : 3 49 | } -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/B01.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/B01.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/B02.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/B02.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/B03.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/B03.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/B04.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/B04.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/B05.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/B05.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/B06.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/B06.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/B07.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/B07.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/B08.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/B08.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/B09.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/B09.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/B10.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/B10.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/B11.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/B11.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/B12.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/B12.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/B8A.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/B8A.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/preview.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/preview.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/preview.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/preview.jpg -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/preview/B01.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/preview/B01.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/preview/B02.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/preview/B02.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/preview/B03.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/preview/B03.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/preview/B04.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/preview/B04.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/preview/B05.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/preview/B05.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/preview/B06.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/preview/B06.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/preview/B07.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/preview/B07.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/preview/B08.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/preview/B08.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/preview/B09.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/preview/B09.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/preview/B10.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/preview/B10.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/preview/B11.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/preview/B11.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/preview/B12.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/preview/B12.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/preview/B8A.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/preview/B8A.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l1c/tiles/19/U/DP/2017/7/29/0/tileInfo.json: -------------------------------------------------------------------------------- 1 | { 2 | "path" : "tiles/19/U/DP/2017/7/29/0", 3 | "timestamp" : "2017-07-29T15:35:57.455Z", 4 | "utmZone" : 19, 5 | "latitudeBand" : "U", 6 | "gridSquare" : "DP", 7 | "datastrip" : { 8 | "id" : "S2A_OPER_MSI_L1C_DS_SGS__20170729T190750_S20170729T153557_N02.05", 9 | "path" : "products/2017/7/29/S2A_MSIL1C_20170729T153601_N0205_R111_T19UDP_20170729T153557/datastrip/0" 10 | }, 11 | "tileGeometry" : { 12 | "type" : "Polygon", 13 | "crs" : { 14 | "type" : "name", 15 | "properties" : { 16 | "name" : "urn:ogc:def:crs:EPSG:8.8.1:32619" 17 | } 18 | }, 19 | "coordinates" : [ [ [ 399960.0, 5400000.0 ], [ 509760.0, 5400000.0 ], [ 509760.0, 5290200.0 ], [ 399960.0, 5290200.0 ], [ 399960.0, 5400000.0 ] ] ] 20 | }, 21 | "tileDataGeometry" : { 22 | "type" : "Polygon", 23 | "crs" : { 24 | "type" : "name", 25 | "properties" : { 26 | "name" : "urn:ogc:def:crs:EPSG:8.8.1:32619" 27 | } 28 | }, 29 | "coordinates" : [ [ [ 455751.639737068, 5399999.0 ], [ 509759.0, 5399999.0 ], [ 509759.0, 5290201.0 ], [ 427246.524415387, 5290201.0 ], [ 435521.982220293, 5321877.55668891 ], [ 452351.175461678, 5386762.063042682 ], [ 455751.639737068, 5399999.0 ] ] ] 30 | }, 31 | "tileOrigin" : { 32 | "type" : "Point", 33 | "crs" : { 34 | "type" : "name", 35 | "properties" : { 36 | "name" : "urn:ogc:def:crs:EPSG:8.8.1:32619" 37 | } 38 | }, 39 | "coordinates" : [ 399960.0, 5400000.0 ] 40 | }, 41 | "dataCoveragePercentage" : 62.13, 42 | "cloudyPixelPercentage" : 24.48, 43 | "productName" : "S2A_MSIL1C_20170729T153601_N0205_R111_T19UDP_20170729T153557", 44 | "productPath" : "products/2017/7/29/S2A_MSIL1C_20170729T153601_N0205_R111_T19UDP_20170729T153557" 45 | } -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R10m/AOT.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R10m/AOT.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R10m/B02.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R10m/B02.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R10m/B03.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R10m/B03.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R10m/B04.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R10m/B04.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R10m/B08.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R10m/B08.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R10m/TCI.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R10m/TCI.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R10m/WVP.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R10m/WVP.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R20m/AOT.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R20m/AOT.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R20m/B02.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R20m/B02.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R20m/B03.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R20m/B03.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R20m/B04.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R20m/B04.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R20m/B05.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R20m/B05.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R20m/B06.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R20m/B06.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R20m/B07.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R20m/B07.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R20m/B08.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R20m/B08.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R20m/B11.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R20m/B11.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R20m/B12.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R20m/B12.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R20m/B8A.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R20m/B8A.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R20m/SCL.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R20m/SCL.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R20m/TCI.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R20m/TCI.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R20m/WVP.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R20m/WVP.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R60m/AOT.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R60m/AOT.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R60m/B01.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R60m/B01.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R60m/B02.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R60m/B02.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R60m/B03.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R60m/B03.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R60m/B04.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R60m/B04.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R60m/B05.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R60m/B05.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R60m/B06.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R60m/B06.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R60m/B07.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R60m/B07.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R60m/B08.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R60m/B08.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R60m/B09.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R60m/B09.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R60m/B11.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R60m/B11.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R60m/B12.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R60m/B12.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R60m/B8A.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R60m/B8A.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R60m/SCL.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R60m/SCL.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R60m/TCI.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R60m/TCI.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R60m/WVP.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/R60m/WVP.jp2 -------------------------------------------------------------------------------- /tests/fixtures/sentinel-s2-l2a/tiles/19/U/DP/2017/7/29/0/tileInfo.json: -------------------------------------------------------------------------------- 1 | { 2 | "path" : "tiles/19/U/DP/2017/7/29/0", 3 | "timestamp" : "2017-07-29T15:35:57.455Z", 4 | "utmZone" : 19, 5 | "latitudeBand" : "U", 6 | "gridSquare" : "DP", 7 | "datastrip" : { 8 | "id" : "S2A_OPER_MSI_L2A_DS_SHIT_20200401T051010_S20170729T153557_N00.01", 9 | "path" : "products/2017/7/29/S2A_MSIL2A_20170729T153601_N0001_R111_T19UDP_20200401T051009/datastrip/0" 10 | }, 11 | "tileGeometry" : { 12 | "type" : "Polygon", 13 | "crs" : { 14 | "type" : "name", 15 | "properties" : { 16 | "name" : "urn:ogc:def:crs:EPSG:8.8.1:32619" 17 | } 18 | }, 19 | "coordinates" : [ [ [ 399960.0, 5400000.0 ], [ 509760.0, 5400000.0 ], [ 509760.0, 5290200.0 ], [ 399960.0, 5290200.0 ], [ 399960.0, 5400000.0 ] ] ] 20 | }, 21 | "tileDataGeometry" : { 22 | "type" : "Polygon", 23 | "crs" : { 24 | "type" : "name", 25 | "properties" : { 26 | "name" : "urn:ogc:def:crs:EPSG:8.8.1:32619" 27 | } 28 | }, 29 | "coordinates" : [ [ [ 455854.9527242855, 5399999.0 ], [ 509759.0, 5399999.0 ], [ 509759.0, 5290201.0 ], [ 427349.83668402565, 5290201.0 ], [ 455854.9527242855, 5399999.0 ] ] ] 30 | }, 31 | "tileOrigin" : { 32 | "type" : "Point", 33 | "crs" : { 34 | "type" : "name", 35 | "properties" : { 36 | "name" : "urn:ogc:def:crs:EPSG:8.8.1:32619" 37 | } 38 | }, 39 | "coordinates" : [ 399960.0, 5400000.0 ] 40 | }, 41 | "dataCoveragePercentage" : 62.07, 42 | "cloudyPixelPercentage" : 0.0, 43 | "productName" : "S2A_MSIL2A_20170729T153601_N0001_R111_T19UDP_20200401T051009", 44 | "productPath" : "products/2017/7/29/S2A_MSIL2A_20170729T153601_N0001_R111_T19UDP_20200401T051009" 45 | } -------------------------------------------------------------------------------- /tests/fixtures/usgs-landsat/README.md: -------------------------------------------------------------------------------- 1 | 2 | Test files created with: 3 | 4 | ```bash 5 | mkdir -p collection02/level-2/standard/oli-tirs/2020/001/062/LC08_L2SP_001062_20201031_20201106_02_T2/ 6 | cd collection02/level-2/standard/oli-tirs/2020/001/062/LC08_L2SP_001062_20201031_20201106_02_T2/ 7 | aws s3 cp --recursive s3://usgs-landsat/collection02/level-2/standard/oli-tirs/2020/001/062/LC08_L2SP_001062_20201031_20201106_02_T2/ . --request-payer 8 | 9 | find . -name '*.TIF' | while read line; do 10 | b=$(echo $line | sed 's/.TIF/_s.TIF/g'); 11 | echo $b; 12 | gdal_translate -outsize 5% 5% $line $b; 13 | rio cogeo create $b $line --blocksize 128; 14 | rm $line; 15 | mv $b $line; 16 | done 17 | ``` 18 | -------------------------------------------------------------------------------- /tests/fixtures/usgs-landsat/collection02/level-2/standard/oli-tirs/2020/001/062/LC08_L2SP_001062_20201031_20201106_02_T2/LC08_L2SP_001062_20201031_20201106_02_T2_QA_PIXEL.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/usgs-landsat/collection02/level-2/standard/oli-tirs/2020/001/062/LC08_L2SP_001062_20201031_20201106_02_T2/LC08_L2SP_001062_20201031_20201106_02_T2_QA_PIXEL.TIF -------------------------------------------------------------------------------- /tests/fixtures/usgs-landsat/collection02/level-2/standard/oli-tirs/2020/001/062/LC08_L2SP_001062_20201031_20201106_02_T2/LC08_L2SP_001062_20201031_20201106_02_T2_QA_RADSAT.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/usgs-landsat/collection02/level-2/standard/oli-tirs/2020/001/062/LC08_L2SP_001062_20201031_20201106_02_T2/LC08_L2SP_001062_20201031_20201106_02_T2_QA_RADSAT.TIF -------------------------------------------------------------------------------- /tests/fixtures/usgs-landsat/collection02/level-2/standard/oli-tirs/2020/001/062/LC08_L2SP_001062_20201031_20201106_02_T2/LC08_L2SP_001062_20201031_20201106_02_T2_SR_B1.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/usgs-landsat/collection02/level-2/standard/oli-tirs/2020/001/062/LC08_L2SP_001062_20201031_20201106_02_T2/LC08_L2SP_001062_20201031_20201106_02_T2_SR_B1.TIF -------------------------------------------------------------------------------- /tests/fixtures/usgs-landsat/collection02/level-2/standard/oli-tirs/2020/001/062/LC08_L2SP_001062_20201031_20201106_02_T2/LC08_L2SP_001062_20201031_20201106_02_T2_SR_B2.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/usgs-landsat/collection02/level-2/standard/oli-tirs/2020/001/062/LC08_L2SP_001062_20201031_20201106_02_T2/LC08_L2SP_001062_20201031_20201106_02_T2_SR_B2.TIF -------------------------------------------------------------------------------- /tests/fixtures/usgs-landsat/collection02/level-2/standard/oli-tirs/2020/001/062/LC08_L2SP_001062_20201031_20201106_02_T2/LC08_L2SP_001062_20201031_20201106_02_T2_SR_B3.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/usgs-landsat/collection02/level-2/standard/oli-tirs/2020/001/062/LC08_L2SP_001062_20201031_20201106_02_T2/LC08_L2SP_001062_20201031_20201106_02_T2_SR_B3.TIF -------------------------------------------------------------------------------- /tests/fixtures/usgs-landsat/collection02/level-2/standard/oli-tirs/2020/001/062/LC08_L2SP_001062_20201031_20201106_02_T2/LC08_L2SP_001062_20201031_20201106_02_T2_SR_B4.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/usgs-landsat/collection02/level-2/standard/oli-tirs/2020/001/062/LC08_L2SP_001062_20201031_20201106_02_T2/LC08_L2SP_001062_20201031_20201106_02_T2_SR_B4.TIF -------------------------------------------------------------------------------- /tests/fixtures/usgs-landsat/collection02/level-2/standard/oli-tirs/2020/001/062/LC08_L2SP_001062_20201031_20201106_02_T2/LC08_L2SP_001062_20201031_20201106_02_T2_SR_B5.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/usgs-landsat/collection02/level-2/standard/oli-tirs/2020/001/062/LC08_L2SP_001062_20201031_20201106_02_T2/LC08_L2SP_001062_20201031_20201106_02_T2_SR_B5.TIF -------------------------------------------------------------------------------- /tests/fixtures/usgs-landsat/collection02/level-2/standard/oli-tirs/2020/001/062/LC08_L2SP_001062_20201031_20201106_02_T2/LC08_L2SP_001062_20201031_20201106_02_T2_SR_B6.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/usgs-landsat/collection02/level-2/standard/oli-tirs/2020/001/062/LC08_L2SP_001062_20201031_20201106_02_T2/LC08_L2SP_001062_20201031_20201106_02_T2_SR_B6.TIF -------------------------------------------------------------------------------- /tests/fixtures/usgs-landsat/collection02/level-2/standard/oli-tirs/2020/001/062/LC08_L2SP_001062_20201031_20201106_02_T2/LC08_L2SP_001062_20201031_20201106_02_T2_SR_B7.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/usgs-landsat/collection02/level-2/standard/oli-tirs/2020/001/062/LC08_L2SP_001062_20201031_20201106_02_T2/LC08_L2SP_001062_20201031_20201106_02_T2_SR_B7.TIF -------------------------------------------------------------------------------- /tests/fixtures/usgs-landsat/collection02/level-2/standard/oli-tirs/2020/001/062/LC08_L2SP_001062_20201031_20201106_02_T2/LC08_L2SP_001062_20201031_20201106_02_T2_SR_QA_AEROSOL.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/usgs-landsat/collection02/level-2/standard/oli-tirs/2020/001/062/LC08_L2SP_001062_20201031_20201106_02_T2/LC08_L2SP_001062_20201031_20201106_02_T2_SR_QA_AEROSOL.TIF -------------------------------------------------------------------------------- /tests/fixtures/usgs-landsat/collection02/level-2/standard/oli-tirs/2020/001/062/LC08_L2SP_001062_20201031_20201106_02_T2/LC08_L2SP_001062_20201031_20201106_02_T2_ST_ATRAN.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/usgs-landsat/collection02/level-2/standard/oli-tirs/2020/001/062/LC08_L2SP_001062_20201031_20201106_02_T2/LC08_L2SP_001062_20201031_20201106_02_T2_ST_ATRAN.TIF -------------------------------------------------------------------------------- /tests/fixtures/usgs-landsat/collection02/level-2/standard/oli-tirs/2020/001/062/LC08_L2SP_001062_20201031_20201106_02_T2/LC08_L2SP_001062_20201031_20201106_02_T2_ST_B10.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/usgs-landsat/collection02/level-2/standard/oli-tirs/2020/001/062/LC08_L2SP_001062_20201031_20201106_02_T2/LC08_L2SP_001062_20201031_20201106_02_T2_ST_B10.TIF -------------------------------------------------------------------------------- /tests/fixtures/usgs-landsat/collection02/level-2/standard/oli-tirs/2020/001/062/LC08_L2SP_001062_20201031_20201106_02_T2/LC08_L2SP_001062_20201031_20201106_02_T2_ST_CDIST.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/usgs-landsat/collection02/level-2/standard/oli-tirs/2020/001/062/LC08_L2SP_001062_20201031_20201106_02_T2/LC08_L2SP_001062_20201031_20201106_02_T2_ST_CDIST.TIF -------------------------------------------------------------------------------- /tests/fixtures/usgs-landsat/collection02/level-2/standard/oli-tirs/2020/001/062/LC08_L2SP_001062_20201031_20201106_02_T2/LC08_L2SP_001062_20201031_20201106_02_T2_ST_DRAD.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/usgs-landsat/collection02/level-2/standard/oli-tirs/2020/001/062/LC08_L2SP_001062_20201031_20201106_02_T2/LC08_L2SP_001062_20201031_20201106_02_T2_ST_DRAD.TIF -------------------------------------------------------------------------------- /tests/fixtures/usgs-landsat/collection02/level-2/standard/oli-tirs/2020/001/062/LC08_L2SP_001062_20201031_20201106_02_T2/LC08_L2SP_001062_20201031_20201106_02_T2_ST_EMIS.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/usgs-landsat/collection02/level-2/standard/oli-tirs/2020/001/062/LC08_L2SP_001062_20201031_20201106_02_T2/LC08_L2SP_001062_20201031_20201106_02_T2_ST_EMIS.TIF -------------------------------------------------------------------------------- /tests/fixtures/usgs-landsat/collection02/level-2/standard/oli-tirs/2020/001/062/LC08_L2SP_001062_20201031_20201106_02_T2/LC08_L2SP_001062_20201031_20201106_02_T2_ST_EMSD.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/usgs-landsat/collection02/level-2/standard/oli-tirs/2020/001/062/LC08_L2SP_001062_20201031_20201106_02_T2/LC08_L2SP_001062_20201031_20201106_02_T2_ST_EMSD.TIF -------------------------------------------------------------------------------- /tests/fixtures/usgs-landsat/collection02/level-2/standard/oli-tirs/2020/001/062/LC08_L2SP_001062_20201031_20201106_02_T2/LC08_L2SP_001062_20201031_20201106_02_T2_ST_QA.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/usgs-landsat/collection02/level-2/standard/oli-tirs/2020/001/062/LC08_L2SP_001062_20201031_20201106_02_T2/LC08_L2SP_001062_20201031_20201106_02_T2_ST_QA.TIF -------------------------------------------------------------------------------- /tests/fixtures/usgs-landsat/collection02/level-2/standard/oli-tirs/2020/001/062/LC08_L2SP_001062_20201031_20201106_02_T2/LC08_L2SP_001062_20201031_20201106_02_T2_ST_TRAD.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/usgs-landsat/collection02/level-2/standard/oli-tirs/2020/001/062/LC08_L2SP_001062_20201031_20201106_02_T2/LC08_L2SP_001062_20201031_20201106_02_T2_ST_TRAD.TIF -------------------------------------------------------------------------------- /tests/fixtures/usgs-landsat/collection02/level-2/standard/oli-tirs/2020/001/062/LC08_L2SP_001062_20201031_20201106_02_T2/LC08_L2SP_001062_20201031_20201106_02_T2_ST_URAD.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/usgs-landsat/collection02/level-2/standard/oli-tirs/2020/001/062/LC08_L2SP_001062_20201031_20201106_02_T2/LC08_L2SP_001062_20201031_20201106_02_T2_ST_URAD.TIF -------------------------------------------------------------------------------- /tests/fixtures/usgs-landsat/collection02/level-2/standard/oli-tirs/2020/001/062/LC08_L2SP_001062_20201031_20201106_02_T2/LC08_L2SP_001062_20201031_20201106_02_T2_thumb_large.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/usgs-landsat/collection02/level-2/standard/oli-tirs/2020/001/062/LC08_L2SP_001062_20201031_20201106_02_T2/LC08_L2SP_001062_20201031_20201106_02_T2_thumb_large.jpeg -------------------------------------------------------------------------------- /tests/fixtures/usgs-landsat/collection02/level-2/standard/oli-tirs/2020/001/062/LC08_L2SP_001062_20201031_20201106_02_T2/LC08_L2SP_001062_20201031_20201106_02_T2_thumb_small.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cogeotiff/rio-tiler-pds/95f3955b18ccd7e0617e001adb16b81a37d805fa/tests/fixtures/usgs-landsat/collection02/level-2/standard/oli-tirs/2020/001/062/LC08_L2SP_001062_20201031_20201106_02_T2/LC08_L2SP_001062_20201031_20201106_02_T2_thumb_small.jpeg -------------------------------------------------------------------------------- /tests/test_copernicus_dem.py: -------------------------------------------------------------------------------- 1 | """tests rio_tiler_pds.copernicus""" 2 | 3 | import json 4 | import os 5 | from unittest.mock import patch 6 | 7 | import morecantile 8 | import pytest 9 | import rasterio 10 | from rasterio.crs import CRS 11 | 12 | from rio_tiler_pds.copernicus.aws import Dem30Reader, Dem90Reader 13 | 14 | COPERNICUS_30m_BUCKET = os.path.join( 15 | os.path.dirname(__file__), "fixtures", "copernicus-dem-30m" 16 | ) 17 | COPERNICUS_90m_BUCKET = os.path.join( 18 | os.path.dirname(__file__), "fixtures", "copernicus-dem-90m" 19 | ) 20 | 21 | 22 | @pytest.fixture(autouse=True) 23 | def testing_env_var(monkeypatch): 24 | """Set fake env to make sure we don't hit AWS services.""" 25 | monkeypatch.setenv("AWS_ACCESS_KEY_ID", "jqt") 26 | monkeypatch.setenv("AWS_SECRET_ACCESS_KEY", "rde") 27 | monkeypatch.delenv("AWS_PROFILE", raising=False) 28 | monkeypatch.setenv("AWS_CONFIG_FILE", "/tmp/noconfigheere") 29 | monkeypatch.setenv("AWS_SHARED_CREDENTIALS_FILE", "/tmp/noconfighereeither") 30 | monkeypatch.setenv("GDAL_DISABLE_READDIR_ON_OPEN", "EMPTY_DIR") 31 | 32 | 33 | def mock_rasterio_open(src_path): 34 | """Mock rasterio Open.""" 35 | if src_path.startswith("s3://copernicus-dem-30m"): 36 | src_path = src_path.replace("s3://copernicus-dem-30m", COPERNICUS_30m_BUCKET) 37 | return rasterio.open(src_path) 38 | 39 | elif src_path.startswith("s3://copernicus-dem-90m"): 40 | src_path = src_path.replace("s3://copernicus-dem-90m", COPERNICUS_90m_BUCKET) 41 | return rasterio.open(src_path) 42 | 43 | else: 44 | raise ValueError(f"Invalid path {src_path}") 45 | 46 | 47 | @patch("rio_tiler.io.rasterio.rasterio") 48 | def test_Dem30Reader(rio): 49 | """Test Dem30Reader.""" 50 | rio.open = mock_rasterio_open 51 | 52 | with Dem30Reader() as dem: 53 | assert dem.input == "copernicus-dem-30m" 54 | assert dem.minzoom == 7 55 | assert dem.maxzoom == 8 56 | assert dem.bounds == (-180, -90, 180, 90) 57 | assert dem.get_geographic_bounds(CRS.from_epsg(4326)) == (-180, -90, 180, 90) 58 | 59 | info = dem.info() 60 | assert info.bounds == dem.bounds 61 | crs = info.crs 62 | assert CRS.from_user_input(crs) == dem.crs 63 | 64 | assert dem.statistics()["b1"] 65 | 66 | assert dem._get_dataset_url(0, 0).endswith( 67 | "Copernicus_DSM_COG_10_N00_00_E000_00_DEM.tif" 68 | ) 69 | assert dem._get_dataset_url(1, 1).endswith( 70 | "Copernicus_DSM_COG_10_N01_00_E001_00_DEM.tif" 71 | ) 72 | assert dem._get_dataset_url(-1, -1).endswith( 73 | "Copernicus_DSM_COG_10_S01_00_W001_00_DEM.tif" 74 | ) 75 | 76 | pts = dem.assets_for_point(0, 0) 77 | assert len(pts) == 1 78 | assert pts[0].endswith("Copernicus_DSM_COG_10_N00_00_E000_00_DEM.tif") 79 | 80 | pts = dem.assets_for_point(9.9, 9.9) 81 | assert len(pts) == 1 82 | assert pts[0].endswith("Copernicus_DSM_COG_10_N09_00_E009_00_DEM.tif") 83 | 84 | pts = dem.assets_for_point(10.1, 10.1) 85 | assert len(pts) == 1 86 | assert pts[0].endswith("Copernicus_DSM_COG_10_N10_00_E010_00_DEM.tif") 87 | 88 | pts = dem.assets_for_point(-9.9, -9.9) 89 | assert len(pts) == 1 90 | assert pts[0].endswith("Copernicus_DSM_COG_10_S10_00_W010_00_DEM.tif") 91 | 92 | pts = dem.assets_for_point(-10.1, -10.1) 93 | assert len(pts) == 1 94 | assert pts[0].endswith("Copernicus_DSM_COG_10_S11_00_W011_00_DEM.tif") 95 | 96 | pts = dem.assets_for_point(10, 10) 97 | assert len(pts) == 1 98 | assert pts[0].endswith("Copernicus_DSM_COG_10_N10_00_E010_00_DEM.tif") 99 | 100 | pts = dem.assets_for_point(1113194.91, 1118889.98, coord_crs="epsg:3857") 101 | assert len(pts) == 1 102 | assert pts[0].endswith("Copernicus_DSM_COG_10_N10_00_E010_00_DEM.tif") 103 | 104 | bbox = dem.assets_for_bbox(10, 10, 11, 11) 105 | assert len(bbox) == 4 106 | assert bbox[0].endswith("Copernicus_DSM_COG_10_N10_00_E010_00_DEM.tif") 107 | assert bbox[1].endswith("Copernicus_DSM_COG_10_N11_00_E010_00_DEM.tif") 108 | assert bbox[2].endswith("Copernicus_DSM_COG_10_N10_00_E011_00_DEM.tif") 109 | assert bbox[3].endswith("Copernicus_DSM_COG_10_N11_00_E011_00_DEM.tif") 110 | 111 | bbox = dem.assets_for_bbox( 112 | 1113194.91, 113 | 1118889.98, 114 | 1224514.39, 115 | 1232106.80, 116 | coord_crs="epsg:3857", 117 | ) 118 | assert len(bbox) == 1 119 | assert bbox[0].endswith("Copernicus_DSM_COG_10_N10_00_E010_00_DEM.tif") 120 | 121 | tile = dem.assets_for_tile(530, 509, 10) 122 | assert len(tile) == 2 123 | 124 | img = dem.tile(1060, 1019, 11) 125 | assert img.array.shape == (1, 256, 256) 126 | assert img.crs == "epsg:3857" 127 | 128 | pts = dem.point(6.2, 0.1) 129 | assert pts.array.shape == (1,) 130 | assert pts.assets[0].endswith("Copernicus_DSM_COG_10_N00_00_E006_00_DEM.tif") 131 | 132 | tms = morecantile.tms.get("WGS1984Quad") 133 | with Dem30Reader(tms=tms) as dem: 134 | tile = dem.assets_for_tile(1062, 510, 10) 135 | assert len(tile) == 1 136 | 137 | img = dem.tile(1062, 510, 10) 138 | assert img.array.shape == (1, 256, 256) 139 | assert img.crs == "epsg:4326" 140 | 141 | 142 | @patch("rio_tiler.io.rasterio.rasterio") 143 | def test_Dem90Reader(rio): 144 | """Test Dem90Reader.""" 145 | rio.open = mock_rasterio_open 146 | 147 | with Dem90Reader() as dem: 148 | assert dem.input == "copernicus-dem-90m" 149 | assert dem.minzoom == 6 150 | assert dem.maxzoom == 7 151 | assert dem.bounds == (-180, -90, 180, 90) 152 | assert dem.get_geographic_bounds(CRS.from_epsg(4326)) == (-180, -90, 180, 90) 153 | 154 | info = dem.info() 155 | assert info.bounds == dem.bounds 156 | crs = info.crs 157 | assert CRS.from_user_input(crs) == dem.crs 158 | 159 | assert dem.statistics()["b1"] 160 | 161 | assert dem._get_dataset_url(0, 0).endswith( 162 | "Copernicus_DSM_COG_30_N00_00_E000_00_DEM.tif" 163 | ) 164 | assert dem._get_dataset_url(1, 1).endswith( 165 | "Copernicus_DSM_COG_30_N01_00_E001_00_DEM.tif" 166 | ) 167 | assert dem._get_dataset_url(-1, -1).endswith( 168 | "Copernicus_DSM_COG_30_S01_00_W001_00_DEM.tif" 169 | ) 170 | 171 | pts = dem.assets_for_point(0, 0) 172 | assert len(pts) == 1 173 | assert pts[0].endswith("Copernicus_DSM_COG_30_N00_00_E000_00_DEM.tif") 174 | 175 | pts = dem.assets_for_point(9.9, 9.9) 176 | assert len(pts) == 1 177 | assert pts[0].endswith("Copernicus_DSM_COG_30_N09_00_E009_00_DEM.tif") 178 | 179 | pts = dem.assets_for_point(10.1, 10.1) 180 | assert len(pts) == 1 181 | assert pts[0].endswith("Copernicus_DSM_COG_30_N10_00_E010_00_DEM.tif") 182 | 183 | pts = dem.assets_for_point(-9.9, -9.9) 184 | assert len(pts) == 1 185 | assert pts[0].endswith("Copernicus_DSM_COG_30_S10_00_W010_00_DEM.tif") 186 | 187 | pts = dem.assets_for_point(-10.1, -10.1) 188 | assert len(pts) == 1 189 | assert pts[0].endswith("Copernicus_DSM_COG_30_S11_00_W011_00_DEM.tif") 190 | 191 | pts = dem.assets_for_point(10, 10) 192 | assert len(pts) == 1 193 | assert pts[0].endswith("Copernicus_DSM_COG_30_N10_00_E010_00_DEM.tif") 194 | 195 | pts = dem.assets_for_point(1113194.91, 1118889.98, coord_crs="epsg:3857") 196 | assert len(pts) == 1 197 | assert pts[0].endswith("Copernicus_DSM_COG_30_N10_00_E010_00_DEM.tif") 198 | 199 | bbox = dem.assets_for_bbox(10, 10, 11, 11) 200 | assert len(bbox) == 4 201 | assert bbox[0].endswith("Copernicus_DSM_COG_30_N10_00_E010_00_DEM.tif") 202 | assert bbox[1].endswith("Copernicus_DSM_COG_30_N11_00_E010_00_DEM.tif") 203 | assert bbox[2].endswith("Copernicus_DSM_COG_30_N10_00_E011_00_DEM.tif") 204 | assert bbox[3].endswith("Copernicus_DSM_COG_30_N11_00_E011_00_DEM.tif") 205 | 206 | bbox = dem.assets_for_bbox( 207 | 1113194.91, 208 | 1118889.98, 209 | 1224514.39, 210 | 1232106.80, 211 | coord_crs="epsg:3857", 212 | ) 213 | assert len(bbox) == 1 214 | assert bbox[0].endswith("Copernicus_DSM_COG_30_N10_00_E010_00_DEM.tif") 215 | 216 | tile = dem.assets_for_tile(530, 509, 10) 217 | assert len(tile) == 2 218 | 219 | pts = dem.point(-163.9, -89.5) 220 | assert pts.array.shape == (1,) 221 | assert pts.assets[0].endswith("Copernicus_DSM_COG_30_S90_00_W164_00_DEM.tif") 222 | -------------------------------------------------------------------------------- /tests/test_modis_astraea.py: -------------------------------------------------------------------------------- 1 | """tests rio_tiler.sentinel2""" 2 | 3 | import os 4 | from unittest.mock import patch 5 | 6 | import pytest 7 | import rasterio 8 | 9 | from rio_tiler.errors import InvalidBandName 10 | from rio_tiler_pds.errors import InvalidMODISProduct 11 | from rio_tiler_pds.modis.aws import MODISASTRAEAReader 12 | 13 | MODIS_AST_BUCKET = os.path.join( 14 | os.path.dirname(__file__), "fixtures", "astraea-opendata" 15 | ) 16 | MCD43A4_SCENE = "MCD43A4.A2017200.h21v11.006.2017209030811" 17 | MOD11A1_SCENE = "MOD11A1.A2020250.h20v11.006.2020251085003" 18 | MYD11A1_SCENE = "MYD11A1.A2008110.h16v12.006.2015345131628" 19 | MOD13A1_SCENE = "MOD13A1.A2020049.h14v04.006.2020066002045" 20 | MYD13A1_SCENE = "MYD13A1.A2020153.h30v10.006.2020170024036" 21 | 22 | 23 | @pytest.fixture(autouse=True) 24 | def testing_env_var(monkeypatch): 25 | """Set fake env to make sure we don't hit AWS services.""" 26 | monkeypatch.setenv("AWS_ACCESS_KEY_ID", "jqt") 27 | monkeypatch.setenv("AWS_SECRET_ACCESS_KEY", "rde") 28 | monkeypatch.delenv("AWS_PROFILE", raising=False) 29 | monkeypatch.setenv("AWS_CONFIG_FILE", "/tmp/noconfigheere") 30 | monkeypatch.setenv("AWS_SHARED_CREDENTIALS_FILE", "/tmp/noconfighereeither") 31 | monkeypatch.setenv("GDAL_DISABLE_READDIR_ON_OPEN", "EMPTY_DIR") 32 | 33 | 34 | def mock_rasterio_open(band): 35 | """Mock rasterio Open.""" 36 | assert band.startswith("s3://astraea-opendata") 37 | band = band.replace("s3://astraea-opendata", MODIS_AST_BUCKET) 38 | return rasterio.open(band) 39 | 40 | 41 | @patch("rio_tiler.io.rasterio.rasterio") 42 | def test_AWS_MODISASTRAEAReader(rio): 43 | """Test MODIS (ASTRAEA) Reader product.""" 44 | rio.open = mock_rasterio_open 45 | 46 | with pytest.raises(InvalidMODISProduct): 47 | with MODISASTRAEAReader("MOD00A4.A2017006.h21v11.006.2017018074804"): 48 | pass 49 | 50 | with MODISASTRAEAReader(MCD43A4_SCENE) as modis: 51 | assert modis.minzoom == 4 52 | assert modis.maxzoom == 9 53 | assert modis.bands == ( 54 | "B01", 55 | "B01qa", 56 | "B02", 57 | "B02qa", 58 | "B03", 59 | "B03qa", 60 | "B04", 61 | "B04qa", 62 | "B05", 63 | "B05qa", 64 | "B06", 65 | "B06qa", 66 | "B07", 67 | "B07qa", 68 | ) 69 | 70 | assert modis._get_band_url("B1") == modis._get_band_url("B01") 71 | 72 | assert modis._get_band_url("B01") == ( 73 | "s3://astraea-opendata/MCD43A4.006/21/11/2017200/MCD43A4.A2017200.h21v11.006.2017209030811_B01.TIF" 74 | ) 75 | 76 | with MODISASTRAEAReader(MOD11A1_SCENE) as modis: 77 | assert modis.minzoom == 4 78 | assert modis.maxzoom == 9 79 | assert modis.bands == ( 80 | "B01", 81 | "B02", 82 | "B03", 83 | "B04", 84 | "B05", 85 | "B06", 86 | "B07", 87 | "B08", 88 | "B09", 89 | "B10", 90 | "B11", 91 | "B12", 92 | ) 93 | 94 | assert modis._get_band_url("B01") == ( 95 | "s3://astraea-opendata/MOD11A1.006/20/11/2020250/MOD11A1.A2020250.h20v11.006.2020251085003_LSTD_B01.TIF" 96 | ) 97 | 98 | with MODISASTRAEAReader(MYD11A1_SCENE) as modis: 99 | assert modis.minzoom == 4 100 | assert modis.maxzoom == 9 101 | assert modis.bands == ( 102 | "B01", 103 | "B02", 104 | "B03", 105 | "B04", 106 | "B05", 107 | "B06", 108 | "B07", 109 | "B08", 110 | "B09", 111 | "B10", 112 | "B11", 113 | "B12", 114 | ) 115 | 116 | assert modis._get_band_url("B01") == ( 117 | "s3://astraea-opendata/MYD11A1.006/16/12/2008110/MYD11A1.A2008110.h16v12.006.2015345131628_LSTD_B01.TIF" 118 | ) 119 | 120 | with MODISASTRAEAReader(MOD13A1_SCENE) as modis: 121 | assert modis.minzoom == 4 122 | assert modis.maxzoom == 9 123 | assert modis.bands == ( 124 | "B01", 125 | "B02", 126 | "B03", 127 | "B04", 128 | "B05", 129 | "B06", 130 | "B07", 131 | "B08", 132 | "B09", 133 | "B10", 134 | "B11", 135 | "B12", 136 | ) 137 | 138 | assert modis._get_band_url("B01") == ( 139 | "s3://astraea-opendata/MOD13A1.006/14/04/2020049/MOD13A1.A2020049.h14v04.006.2020066002045_NDVI_B01.TIF" 140 | ) 141 | 142 | with MODISASTRAEAReader(MYD13A1_SCENE) as modis: 143 | assert modis.scene_params.get("scene") == MYD13A1_SCENE 144 | assert len(modis.bounds) == 4 145 | assert modis.minzoom == 4 146 | assert modis.maxzoom == 9 147 | assert modis.bands == ( 148 | "B01", 149 | "B02", 150 | "B03", 151 | "B04", 152 | "B05", 153 | "B06", 154 | "B07", 155 | "B08", 156 | "B09", 157 | "B10", 158 | "B11", 159 | "B12", 160 | ) 161 | 162 | with pytest.raises(InvalidBandName): 163 | modis._get_band_url("granule") 164 | 165 | assert modis._get_band_url("B01") == ( 166 | "s3://astraea-opendata/MYD13A1.006/30/10/2020153/MYD13A1.A2020153.h30v10.006.2020170024036_NDVI_B01.TIF" 167 | ) 168 | 169 | metadata = modis.info(bands="B01") 170 | assert metadata.band_descriptions == [("B01", "500m 16 days NDVI")] 171 | 172 | with pytest.warns(UserWarning): 173 | stats = modis.statistics() 174 | assert list(stats) == list(modis.bands) 175 | 176 | stats = modis.statistics(bands="B05") 177 | assert len(stats.items()) == 1 178 | assert stats["B05"].percentile_2 179 | assert stats["B05"].percentile_98 180 | 181 | tile_z = 8 182 | tile_x = 219 183 | tile_y = 141 184 | data, mask = modis.tile(tile_x, tile_y, tile_z, bands="B01") 185 | assert data.shape == (1, 256, 256) 186 | assert mask.shape == (256, 256) 187 | --------------------------------------------------------------------------------