-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reproject and crop are not commutative #135
Comments
Thanks a lot for the good bug report @jmarintur! Could you please give the output of |
This is it: Thanks @Juanlu001 ! |
It is expected that shapes in these cases are different (at least from code perspective). Let's see what is happening. First case (crop first): 1 roi.envelope.get_bounds(self.crs) is called inside crop here Result image in the second case (reproject first): |
Thanks @drnextgis! I have a couple of questions:
|
In the first case I perform crop and then reproject:
raster.crop(roi.envelope).reproject(dst_crs=WEB_MERCATOR_CRS).save(output_raster)
In the second case I reproject and then I crop:
raster.reproject(dst_crs=WEB_MERCATOR_CRS).crop(roi.envelope).save(output_raster)
The resulting images when I visualize them using Qgis 2.14.11-Essen look like this:
And
I am using a Sentinel-2 image Band 02 and tile T18HXB and the following roi:
Thanks for your support.
The text was updated successfully, but these errors were encountered: