Bug report #3790

OTF Raster Reprojection artifacts (at some scales)

Added by davecollett - almost 13 years ago. Updated over 11 years ago.

Status:Closed
Priority:Low
Assignee:-
Category:Rasters
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed
Crashes QGIS or corrupts data:No Copied to github as #:13848

Description

Appears to reproject layers into the correct place, however the representation of the right-hand part of each raster appears to copy the pixels across the screen.
This appears to affect all raster layers when the OTF reprojection is turned on, even if the layers are already in the final projection.
Have tried with rasters in Lambert Conformal Conic, Polar Stereographic and Transverse Mercator, and all produce this error.

Using Trunk release r15861.

See new description below.

xdrg25069b.zip - Zip file containing example raster. (167 KB) davecollett -, 2011-05-02 05:05 PM

Repro_error_3.gif - Screenshot of error #3 (38.3 KB) davecollett -, 2011-05-02 05:06 PM

Repro_error_2.gif - Screenshot of error #2 (35.6 KB) davecollett -, 2011-05-02 05:06 PM

Repro_error_1.gif - Screenshot of error (50.4 KB) davecollett -, 2011-05-02 05:07 PM

Bug_3790.qgs (37.3 KB) Thaddeus -, 2011-10-07 07:49 PM

Bug_3790_1.png (111 KB) Thaddeus -, 2011-10-07 07:50 PM

Bug_3790_2.png (101 KB) Thaddeus -, 2011-10-07 07:50 PM

Bug_3790_3.png (109 KB) Thaddeus -, 2011-10-07 07:50 PM

Bug_3790_4.png (178 KB) Thaddeus -, 2011-10-07 07:51 PM

History

#1 Updated by Giovanni Manghi almost 13 years ago

it is confirmed by many, also on Linux.

Radim has already proposed a patch, that would be useful to test

--- src/core/qgsrasterprojector.cpp     (revision 15861)
+++ src/core/qgsrasterprojector.cpp     (working copy)
@@ -130,7 +130,7 @@
   mSrcExtent = [[QgsRectangle]]( myPoint.x(), myPoint.y(), myPoint.x(),
myPoint.y() );
   for ( int i = 0; i < mCPRows; i++ )
   {
-    for ( int j = 1; j < mCPCols - 1; j++ )
+    for ( int j = 0; j < mCPCols; j++ )
     {
       myPoint = mCPMatrix[i][j];
       mSrcExtent.combineExtentWith( myPoint.x(), myPoint.y() );

#2 Updated by Giovanni Manghi almost 13 years ago

Odd, using trunk (same revision ) on both linux and windows I can reproduce the artifacts only under linux. On Windows it works fine

using this raster (epsg 3003)

https://int.faunalia.it/~paolo/dtm.tar.gz

and reprojecting it in epsg 4326

#3 Updated by Giovanni Manghi over 12 years ago

  • Status changed from Open to Feedback
  • Pull Request or Patch supplied set to No
  • Assignee deleted (Redmine Admin)
  • Target version deleted (Version 1.7.0)

This issue seems gone. Tested on both Windows and Linux using trunk. Please leave feedback.

#4 Updated by Thaddeus - over 12 years ago

I tried real hard to upset QGIS selecting all kind of reprojections and color map settings, but it did pretty good: I'm unable to replicate this projection artifact under win2k/QGIS1.7.1 and Ububtu10.10/QGIS1.7.0.

I did manage however to create some errors and "screen" artifacts as seen on screenshots --artifacts created by using zoom full or layer extend. Those line-looking artifacts have a kind random behavior when changing the numeric scale number by a small amount, 1, 5 or so. Also, the Identify tool and Value Plugin report "Out of Extent"/"No features" right on top of the reprojected data?

The included QGS file uses the data files found above on this bug report page.

#5 Updated by Thaddeus - over 12 years ago

#6 Updated by Thaddeus - over 12 years ago

#7 Updated by Thaddeus - over 12 years ago

#8 Updated by Thaddeus - over 12 years ago

#9 Updated by Thaddeus - over 12 years ago

I fotgot to mention the strange no data data value (-340282346638528859811704183484516925440.000000) on the *.ADF files: the data type is 4-byte float, so there is something fishy with that.

#10 Updated by Giovanni Manghi over 12 years ago

I did manage however to create some errors and "screen" artifacts as seen on screenshots --artifacts created by using zoom full or layer extend. Those line-looking artifacts have a kind random behavior when changing the numeric scale number by a small amount, 1, 5 or so.

I can't make to replicate this artifacts at any scale with any tool.

Also, the Identify tool and Value Plugin report "Out of Extent"/"No features" right on top of the reprojected data?

The identify tool works fine (for me) on reprojected rasters, the value tool plugin was recently updated to work also with reprojected rasters.

#11 Updated by Giovanni Manghi over 12 years ago

  • Target version set to Version 1.7.4

#12 Updated by Giovanni Manghi about 12 years ago

  • Crashes QGIS or corrupts data set to No
  • Status changed from Feedback to Open
  • Operating System deleted (All)
  • Status info deleted (0)
  • Affected QGIS version set to master
  • Subject changed from OTF Raster Reprojection error to OTF Raster Reprojection artifacts (at some scales)

New description

The problem described originally is definitely gone.

The problem described in #3790-4

is still there. Initially seemed to be a problem when doing some "strange" reprojection, but at the end it is possible to have artifacts also when doing a perfectly legit reprojection. Example:

take one of the layers available here (EPSG 3003, Italy)

https://int.faunalia.it/~paolo/dtm.tar.gz

and reprojected them in EPSG in EPSG 32632 /UTM for Italy), the result is similar to

https://issues.qgis.org/attachments/3473/Bug_3790_1.png

oddly, it is not easy to see these artifacts as they show only at certain scales.

Tested on QGIS master.

#13 Updated by Paolo Cavallini about 12 years ago

  • Target version changed from Version 1.7.4 to Version 1.8.0

#14 Updated by Paolo Cavallini over 11 years ago

  • Target version changed from Version 1.8.0 to Version 2.0.0

#15 Updated by Giovanni Manghi over 11 years ago

  • Status changed from Open to Closed
  • Resolution set to fixed

This issue seems definitely gone, at least on QGIS master. Please reopen if necessary.

Also available in: Atom PDF