home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 823418135

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
823418135 MDU6SXNzdWU4MjM0MTgxMzU= 5005 Example documentation in open_rasterio 30908904 closed 0     2 2021-03-05T21:08:19Z 2021-03-15T15:56:21Z 2021-03-15T15:56:21Z CONTRIBUTOR      

This is my first time submitting an issue, so sorry if doing this wrong.

In the documentation for open_rasterio there's an example on how to generate 2D coordinates from a GeoTiff file using it:

https://github.com/pydata/xarray/blob/37522e991a32ee3c0ad1a5ff8afe8e3eb1885550/xarray/backends/rasterio_.py#L177-L181

However, this method does not really work because the da.attrs['transform'] attribute is not coded in the GDAL standard, but as affine.Affine expects directly (maybe it wasn't so in a previous version. So, at least for me (v0.16.2), getting the affine transformation right is done by simply replacing that line with the simpler:

transform = Affine(*da.attrs['transform'])

Again, sorry if this is not how this should be done, I just took a while to figure this out for my application and thought other people might benefit from it. If I can do something to fix it (if it's really broken) please let me know.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/5005/reactions",
    "total_count": 1,
    "+1": 1,
    "-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
  • 2 rows from issue in issue_comments
Powered by Datasette · Queries took 81.64ms · About: xarray-datasette