Tile metadata in the GetCapabilities file

Please enter here to ask a question about any NASA Science related topics!
Post Reply
kdpenner
Posts: 2
Joined: Thu Jun 10, 2021 12:40 pm America/New_York

Tile metadata in the GetCapabilities file

by kdpenner » Thu Jun 10, 2021 1:13 pm America/New_York

I emailed support and thought I'd post here as well.

I'm learning the basics of querying a WMTS server. There is a python library to do this but there must've been server side changes, as a query that once worked:

https://gitc.earthdata.nasa.gov/wmts/ep ... image/jpeg

is broken.

Take the Landsat_WELD_CorrectedReflectance_TrueColor_Global_Annual image. I want to extract a region around some lon, lat. My understanding is that I need to determine the tile matrix, tile row, and tile col containing the lon and lat. For that I need the pixel scale (arcsec probably?) and tile dimensions. First question: where are these data?

I've parsed the GetCapabilities file.
>>> import requests
>>> from xml.etree import ElementTree
>>> xml_url = ("https://gibs.earthdata.nasa.gov/wmts/ep ... est/1.0.0/"
"WMTSCapabilities.xml")
>>> resp = requests.get(xml_url)
>>> xml = ElementTree.fromstring(resp.content)
>>> contents = xml[-2]
>>> layer = contents.findall(".//*[.='Landsat_WELD_CorrectedReflectance_TrueColor_Global_Annual']..")[0]

Section 6.1 of the WMTS implementation standard has that TileMatrixSetLink has most (all?) of the parameters I need to determine which tiles to get. But the GetCapabilities file has only the pixel scale in meters:

>>> layer[5][0].tag
'{http://www.opengis.net/wmts/1.0}TileMatrixSet'
>>> layer[5][0].text
'31.25m'
>>> layer[5][0].attrib
{}


Are the metadata supposed to be there?

I have other questions but I'll pose those later.

Tags:

kdpenner
Posts: 2
Joined: Thu Jun 10, 2021 12:40 pm America/New_York

Re: Tile metadata in the GetCapabilities file

by kdpenner » Fri Jun 11, 2021 9:36 am America/New_York

I figured it out. The data model is that TileMatrixSetLink points to the TileMatrixSet for 31.25m. TileMatrixSet lives in the Contents element.

Still, the Landsat data for tile matrices 5 and above are broken.

LP DAAC - jwilson
User Services
User Services
Posts: 47
Joined: Mon Sep 30, 2019 12:39 pm America/New_York
Answers: 1

Re: Tile metadata in the GetCapabilities file

by LP DAAC - jwilson » Tue Jun 22, 2021 1:10 pm America/New_York

We have reached out to a Subject Matter Expert for any further guidance.

mwong4
Posts: 1
Joined: Fri Feb 28, 2020 3:43 pm America/New_York

Re: Tile metadata in the GetCapabilities file

by mwong4 » Wed Jul 07, 2021 3:42 pm America/New_York

This is a known issue with a recent release of our software. Instead of returning an "empty tile" JPG/PNG when there is no data visualized in the requested tile, a 404 is returned. Below, you can see this request work for the 0/0/0 tile.

https://gibs.earthdata.nasa.gov/wmts/ep ... image/jpeg

It just so happens that the z/y/x tile you are requesting has no data. We are working a solution presently, though a 404 response may still occur in some instances (e.g. if an invalid date is requested). So, handling 404s is recommended.

Post Reply