home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 330979614

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions performed_via_github_app issue
https://github.com/pydata/xarray/issues/1582#issuecomment-330979614 https://api.github.com/repos/pydata/xarray/issues/1582 330979614 MDEyOklzc3VlQ29tbWVudDMzMDk3OTYxNA== 4414299 2017-09-20T21:01:01Z 2017-09-20T21:15:41Z CONTRIBUTOR

@jhamman, I did some looking around. The rasterio documentation on tags does not reveal much and points to the only slightly less unhelpful GDAL data model documentation. There seem to be both namespaces containing file format specific data, and general namespaces which contain data parsed from the format specific namespaces. The format namespaces/domains are mentioned in the GDAL raster format documentation, but don't really tell much of the type of data stored.

For ENVI files, there seems to already be three different kinds of return values depending on the exact call:

  • tags() returns a dict full of strings created from the wavelength info in the header file: {'Band_1':'450 nm', 'Band_2':'452', ..., 'wavelength_units':'nm'}

  • tags(b) returns a dict containing the info for the band b in a slightly different format: {'wavelength':450.00, 'wavelength_units':'nm'}

  • tags(ns='ENVI') returns a dict of string values, containing all the fields in the header file in their original form: python {'Description':'file.dat', 'wavelength':'{450, 452, ...}', 'fwhm':'{3.0, 3.0, ...}', etc.}

  • Other namespaces I tried seemed to return only empty dicts (for the ENVI file).

It's a bit puzzling why only the wavelength information (and not even the corresponding FWHM info) is parsed to the default namespace, given that it's not listed as having any well defined semantics in the GDAL docs.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  259057144
Powered by Datasette · Queries took 0.889ms · About: xarray-datasette