Bug report #17526
Building virtual raster deforms whole raster in non native projection
|Affected QGIS version:||2.18.14||Regression?:||No|
|Operating System:||Windows 10 64||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||invalid|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||25423|
It seems the whole raster is divided into smaller rectangles which contract or expand (depending on N-S) by a row and a column of pixels. It occurs when ,,Build virtual raster" is chosen from Raster/ Miscellaneous/ menu. From ,,Processing Toolbox" ,,Build virtual raster" gives results the same as from menu Raster/ Miscellaneous/ Merge... which seemed nearly identical to source rasters. I've attached two reprojected SRTM DEM files. If there is no quick fix Raster/ Miscellaneous/ Build virtual raster should be disabled or some warning added.
#1 Updated by Giovanni Manghi about 3 years ago
- Status changed from Open to Feedback
I can't see absolutely any difference from the result obtained using the tool in Processing and in the "raster" menu: they both run the GDAL program "gdalbuildvrt", please compare the actual command parameters used by Processing and the tool in the "raster" menu.
#2 Updated by Pawel Stankiewicz about 3 years ago
I wrote about the difference between Toolbox and Raster menu, because in the Toolbox the option ,,Resolution" was switched on ,,Avarege" and I changed to ,,Highest", in the ,,Raster" menu this option was grayed, so I didn't bother. Can you see a difference in virtaul rasters after ,,Highest" and ,,Avareage" option? If yes I think the default option should be changed to ,,Heihest" resolution in Toolbox and Raster menu.
Now I don't know why I wrote a raster after ,,Merge" was OK because it seems like virtual raster after ,,Avaege" not like after ,,Highest" and source. I think I should write it on GDAL project.
#4 Updated by Giovanni Manghi about 3 years ago
Pawel Stankiewicz wrote:
Sorry for the waste of time. Choosing the highest resolution makes virtual raster near identical to source in one place but bigger deformation in another, so on average, the average is the best option.
Hi, I'm confused. Where is the issue (considering that the tool from "gdal tools" are to be considered unmaintained and obsolete)?
#5 Updated by Pawel Stankiewicz about 3 years ago
The issue is that in given area every time equal area projected grids will be slightly different after merging or virtualizing depending on size all source rasters, far away from this given area. This a natural consequence of different resolutions of equal area projected rasters in different latitudes. It has nothing to do with QGIS so the bug can be closed or deleted. I hope the best outcomes from centuries long considerations how to show a ball on paper was implemented. Although making a virtual raster with different resolutions (maintained from source rasters), could be a solution.
Where are ,,"gdal tools" to be considered unmaintained and obsolete"? This month come out 2.2.3. I don't know what one is used in standalone QGIS.