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 454337592,MDExOlB1bGxSZXF1ZXN0Mjg2ODA4NzM0,3013,Add `scales` attributes to Dataset created in open_rasterio (#3012),191850,closed,0,,,11,2019-06-10T19:40:05Z,2019-07-10T16:09:30Z,2019-07-10T16:00:50Z,CONTRIBUTOR,,0,pydata/xarray/pulls/3013," - [X] Closes #3012 - [X] Tests ~added~ edited - [x] Fully documented, including `whats-new.rst` for all changes and `api.rst` for new API ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/3013/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 454335138,MDU6SXNzdWU0NTQzMzUxMzg=,3012,"rasterio.open exposes the GeoTIFF scales attribute, but xarray.open_rasterio not",191850,closed,0,,,0,2019-06-10T19:34:18Z,2019-07-10T16:00:50Z,2019-07-10T16:00:50Z,CONTRIBUTOR,,,,"#### Code Sample, a copy-pastable example if possible ```python >> import xarray as xr >> from pprint import pprint >> arr = xr.open_rasterio('example.tif') >> pprint(arr) [84914192 values with dtype=uint16] Coordinates: * band (band) int64 1 2 * y (y) float64 -17.18 -17.18 -17.18 -17.19 ... -23.58 -23.58 -23.58 * x (x) float64 -52.23 -52.23 -52.23 -52.23 ... -46.99 -46.99 -46.99 Attributes: transform: (0.0008888888888890009, 0.0, -52.22933333332605, 0.0, -0.000... crs: +init=epsg:4326 res: (0.0008888888888890009, 0.0008888888888890009) is_tiled: 1 nodatavals: (65535.0, 65535.0) ``` Would be nice if it had the `scales` attribute. #### Problem description rasterio.open exposes the GeoTIFF scales attribute, but xarray not. ```python >> import rasterio >> rarr = rasterio.open('example.tif') >> print(rarr.scales) (0.001, 0.001) ``` #### Expected Output ```python >> import xarray as xr >> from pprint import pprint >> arr = xr.open_rasterio('example.tif') >> pprint(arr) [84914192 values with dtype=uint16] Coordinates: * band (band) int64 1 2 * y (y) float64 -17.18 -17.18 -17.18 -17.19 ... -23.58 -23.58 -23.58 * x (x) float64 -52.23 -52.23 -52.23 -52.23 ... -46.99 -46.99 -46.99 Attributes: transform: (0.0008888888888890009, 0.0, -52.22933333332605, 0.0, -0.000... crs: +init=epsg:4326 res: (0.0008888888888890009, 0.0008888888888890009) is_tiled: 1 nodatavals: (65535.0, 65535.0) scales: (0.001, 0.001) ``` #### xarray version ```python xr.__version__ == '0.12.1' ``` ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/3012/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue