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-330909334,https://api.github.com/repos/pydata/xarray/issues/1582,330909334,MDEyOklzc3VlQ29tbWVudDMzMDkwOTMzNA==,2443309,2017-09-20T16:36:11Z,2018-03-16T18:48:46Z,MEMBER,"> I don't know what kind of data tags() might contain in general. I'm not opposed to decoding the values that are in tags as part of the rasterio backend. @maaleske, perhaps you can do some research to let us know what types of values the tags method is going to return. @fmaussion - I'm not entirely opposed to this. It may require a bit of effort to make sure modifying the file object as part of the public API doesn't do nasty things.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,259057144 https://github.com/pydata/xarray/issues/1582#issuecomment-334723412,https://api.github.com/repos/pydata/xarray/issues/1582,334723412,MDEyOklzc3VlQ29tbWVudDMzNDcyMzQxMg==,4414299,2017-10-06T10:55:27Z,2017-10-06T10:55:27Z,CONTRIBUTOR,"Had some more time to look at this. It seems rasterio just passes the the info returned by GDAL, since looking at the files using gdalinfo reveals exactly the same data (with only wavelengths parsed for each band, etc). Apparently gdalinfo can (since GDAL 1.11) also list the available metadata domains (namespaces) in the file, or output all the metadata given the domain 'all'. These don't seem yet to be implemented in rasterio.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,259057144 https://github.com/pydata/xarray/issues/1582#issuecomment-331010431,https://api.github.com/repos/pydata/xarray/issues/1582,331010431,MDEyOklzc3VlQ29tbWVudDMzMTAxMDQzMQ==,2443309,2017-09-20T23:39:15Z,2017-09-20T23:39:15Z,MEMBER,This is still a bit confusing. Maybe we should open a discussion/issue with the rasterio team. ,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,259057144 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](https://mapbox.github.io/rasterio/topics/tags.html) does not reveal much and points to the only slightly less unhelpful [GDAL data model documentation](http://www.gdal.org/gdal_datamodel.html). 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](http://www.gdal.org/frmt_various.html), 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 https://github.com/pydata/xarray/issues/1582#issuecomment-330783075,https://api.github.com/repos/pydata/xarray/issues/1582,330783075,MDEyOklzc3VlQ29tbWVudDMzMDc4MzA3NQ==,10050469,2017-09-20T08:30:49Z,2017-09-20T08:30:49Z,MEMBER,"Note that the rasterio object is available via the (undocumented) ``_file_obj`` attribute. So a quick workaround for you would simply be: ```python ds = xr.open_rasterio(file) ds._file_obj.tags() ``` This makes me wonder if it wouldn't be easier for xarray to make the ``file_obj`` public API and don't care about all the possible special cases... @shoyer @jhamman thoughts? ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,259057144