issue_comments: 385498531
This data as json
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/2042#issuecomment-385498531 | https://api.github.com/repos/pydata/xarray/issues/2042 | 385498531 | MDEyOklzc3VlQ29tbWVudDM4NTQ5ODUzMQ== | 601025 | 2018-04-30T19:09:41Z | 2018-04-30T19:09:41Z | NONE | @mrocklin gdal can read/write windows: ``` Read raster as arraysbanddataraster = raster.GetRasterBand(1) dataraster = banddataraster.ReadAsArray(xoff, yoff, xcount, ycount).astype(numpy.float) ``` from: https://pcjericks.github.io/py-gdalogr-cookbook/raster_layers.html Also see BandReadAsArray and BandWriteAsArray in http://gdal.org/python/osgeo.gdal_array-module.html (which appear to be a read/write gdal.Band.ReadAsArray method and gdal.Band.WriteArray method respectively). But there are some got'yas there in that GDAL as far as I recall is not thread safe. I wonder how you got that to work other than setting up a slave read process that handles all reads. |
{ "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
312203596 |