Date
1 - 4 of 4
window from_bounds behaviour
Hi all: first off, kudos to the rasterio project, very well done! Using 1.1.2 I'm getting some weird behaviour when trying to create a window from bounding coordinates.
Any idea what I am doing wrong here? Thanks ..Tom P.S. aside: The pygeoapi project is implementing the OGC API - Coverages specification and will be using rasterio as the default coverage provider. |
|
Dion Häfner <dion.haefner@...>
Hey Tom,
rasterio windows are constructed at a specific resolution, so you need to supply a transform to use. It is usually easiest to use the transform of the raster you want to use the window on. So something like this should work: ... window = rasterio.windows.from_bounds(import rasterio, rasterio.windows ... -150, 40, -45, 90, transform=src.transform ... ) ... data = src.read(window=window) Hope that helps. Dion On 08/01/2020 23.49, Tom Kralidis via Groups.Io wrote: Hi all: first off, kudos to the rasterio project, very well done! |
|
Hi Dion: thanks for the info. Should |
|
Sean Gillies
Hi Tom, Thanks for bringing this up and for joining us here. I've made an issue here: https://github.com/mapbox/rasterio/issues/1857. Happy New Year! On Thu, Jan 9, 2020 at 4:53 AM Tom Kralidis <tom.kralidis@...> wrote:
--
Sean Gillies |
|