Bug report #9413

Misalignment after raster clipping

Added by Pascal Fust almost 11 years ago. Updated over 10 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:GDAL Tools
Affected QGIS version:2.0.1 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:worksforme
Crashes QGIS or corrupts data:No Copied to github as #:18008

Description

After clipping of a raster with a vector mask layer using the "gdalwarp -q -cutline" function, the clipped raster shows a misalignment with regard to the original raster. Using the same coordinate systems for all involved datasets (EPSG 4326: WGS84), the observed misalignment is around a quarter of the raster cell size. The same procedure with the same datasets in ArcGIS does not result in such a misalignment. The bug has been observed on the current version of QGIS Desktop 2.0.1 with GDAL/OGR 1.10.0

History

#1 Updated by Giovanni Manghi almost 11 years ago

  • OS version deleted (2.0.1)
  • Status changed from Open to Feedback
  • Target version set to Future Release - High Priority
  • Operating System deleted (QGIS Desktop on Linux)

Does it happens if you launch the command (that shows in the bottom of the clip tool dialog) from the command line?

If yes then it can be a gdal issue, not a qgis one, or maybe it is just matter of tuning/adding a parameter.

Please try and report back.

#2 Updated by Etienne Tourigny almost 11 years ago

Probably needs an argument like -tap

#3 Updated by Giovanni Manghi almost 11 years ago

Etienne Tourigny wrote:

Probably needs an argument like -tap

interesting, what others tools (if any) would benefit from this parameter?

Anyway I just tested on qgis master with a raster and a mask both in WGS84 and the result has no shift.

So... can you teste qgis master and/or attach your data? Thanks.

#4 Updated by Etienne Tourigny almost 11 years ago

Giovanni Manghi wrote:

interesting, what others tools (if any) would benefit from this parameter?

Only gdalwarp uses the -tap parameter (AFAIK). I use this when confronted with alignment problems (using gdal only).

#5 Updated by Giovanni Manghi over 10 years ago

  • Resolution set to worksforme
  • Status changed from Feedback to Closed

closing for lack of feedback.

Also available in: Atom PDF