home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 467735754

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
467735754 MDU6SXNzdWU0Njc3MzU3NTQ= 3108 Landsat Surface Reflectance bands have tricky metadata 'band' attribute 22258697 closed 0     3 2019-07-13T15:48:23Z 2019-07-16T15:47:26Z 2019-07-16T15:47:26Z NONE      

Code Sample, a copy-pastable example if possible

``` In [31]: band3 = xarray.open_rasterio("LT050320312005040601T1-SC20190418222326/LT05_L1TP_032031_20050 ...: 406_20160912_01_T1_sr_band3.tif")

In [32]: band3
Out[32]: <xarray.DataArray (band: 1, y: 7041, x: 7821)> [55067661 values with dtype=int16] Coordinates: * band (band) int64 1 * y (y) float64 4.732e+06 4.732e+06 4.732e+06 ... 4.521e+06 4.521e+06 * x (x) float64 6.129e+05 6.129e+05 6.13e+05 ... 8.475e+05 8.475e+05 Attributes: transform: (30.0, 0.0, 612885.0, 0.0, -30.0, 4732515.0) crs: +init=epsg:32613 res: (30.0, 30.0) is_tiled: 0 nodatavals: (-9999.0,) scales: (1.0,) offsets: (0.0,) descriptions: ('band 3 surface reflectance',)

In [33]: band3.band
Out[33]: <xarray.DataArray 'band' (band: 1)> array([1]) Coordinates: * band (band) int64 1

In [35]: band4
Out[35]: <xarray.DataArray (band: 1, y: 7041, x: 7821)> [55067661 values with dtype=int16] Coordinates: * band (band) int64 1 * y (y) float64 4.732e+06 4.732e+06 4.732e+06 ... 4.521e+06 4.521e+06 * x (x) float64 6.129e+05 6.129e+05 6.13e+05 ... 8.475e+05 8.475e+05 Attributes: transform: (30.0, 0.0, 612885.0, 0.0, -30.0, 4732515.0) crs: +init=epsg:32613 res: (30.0, 30.0) is_tiled: 0 nodatavals: (-9999.0,) scales: (1.0,) offsets: (0.0,) descriptions: ('band 4 surface reflectance',)

```

Problem description

Because each band file has the same band index of "1", concatenating on an index called "band" won't result in a dataset where you can subset bands with different indices.

I'm working on this at the scipy sprint, writing a new Landsat SR specific file opener and contacting the data provider to let them know that the metadata's band attribute should reflect the band number

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/3108/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed 13221727 issue

Links from other tables

  • 0 rows from issues_id in issues_labels
  • 3 rows from issue in issue_comments
Powered by Datasette · Queries took 0.551ms · About: xarray-datasette