qissue-bot / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
http://qgis.org
GNU General Public License v2.0
0 stars 0 forks source link

Raster clipper: shifted results #3328

Closed qissue-bot closed 5 years ago

qissue-bot commented 5 years ago

Author Name: alobo - (alobo -) Original Redmine Issue: 3340, https://issues.qgis.org/issues/3340

Original Assignee: Giuseppe Sucameli


I think the way the area to be clipped is set in raster/clipper is wrong. Currently, for results to be correct, the area to be clipped must be coincident with pixel boundaries. In other words, the 4 corners must be pixel corners. If the corners of the defined area are within the pixel, the result is shifted, as it is not interpolated.

I think that if no interpolation is the goal, then the coordinates entered by the user should be moved to the closest pixel corners, and the user be warned. Then the clipping would be exact.

If floating clipping is the goal, then the user must enter the resolution of the new raster and interpolation must be performed.

Obviously having the option would be the best, but as the second option is more complicated, having the first one implemented first would make a lot of sense.

I've put a zipped file with a qgis project and layers to illustrate the problem here:

https://sites.google.com/site/filestemp2/home/clip_problem.zip

Agus

qissue-bot commented 5 years ago

Original Redmine Comment Author Name: Giuseppe Sucameli (Giuseppe Sucameli) Original Date: 2011-04-13T13:31:39.000Z


Done in commit:4d3cdeca (SVN r15699). Using translate instead of merge the corners of the extent are moved to pixels.