home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

5 rows where issue = 259057144 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: created_at (date), updated_at (date)

user 3

  • jhamman 2
  • maaleske 2
  • fmaussion 1

author_association 2

  • MEMBER 3
  • CONTRIBUTOR 2

issue 1

  • Rasterio tags are not accessible through open_rasterio · 5 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
330909334 https://github.com/pydata/xarray/issues/1582#issuecomment-330909334 https://api.github.com/repos/pydata/xarray/issues/1582 MDEyOklzc3VlQ29tbWVudDMzMDkwOTMzNA== jhamman 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
}
  Rasterio tags are not accessible through open_rasterio 259057144
334723412 https://github.com/pydata/xarray/issues/1582#issuecomment-334723412 https://api.github.com/repos/pydata/xarray/issues/1582 MDEyOklzc3VlQ29tbWVudDMzNDcyMzQxMg== maaleske 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
}
  Rasterio tags are not accessible through open_rasterio 259057144
331010431 https://github.com/pydata/xarray/issues/1582#issuecomment-331010431 https://api.github.com/repos/pydata/xarray/issues/1582 MDEyOklzc3VlQ29tbWVudDMzMTAxMDQzMQ== jhamman 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
}
  Rasterio tags are not accessible through open_rasterio 259057144
330979614 https://github.com/pydata/xarray/issues/1582#issuecomment-330979614 https://api.github.com/repos/pydata/xarray/issues/1582 MDEyOklzc3VlQ29tbWVudDMzMDk3OTYxNA== maaleske 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
}
  Rasterio tags are not accessible through open_rasterio 259057144
330783075 https://github.com/pydata/xarray/issues/1582#issuecomment-330783075 https://api.github.com/repos/pydata/xarray/issues/1582 MDEyOklzc3VlQ29tbWVudDMzMDc4MzA3NQ== fmaussion 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
}
  Rasterio tags are not accessible through open_rasterio 259057144

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
);
CREATE INDEX [idx_issue_comments_issue]
    ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
    ON [issue_comments] ([user]);
Powered by Datasette · Queries took 881.251ms · About: xarray-datasette