Opened 13 years ago

Last modified 13 years ago

#3790 new bug

OTF Raster Reprojection error

Reported by: davecollett Owned by: rblazek
Priority: major: does not work as expected Milestone: Version 1.7.0
Component: Rasters Version: Trunk
Keywords: Cc:
Must Fix for Release: Yes Platform: All
Platform Version: Awaiting user input: no

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.

Attachments (4)

xdrg25069b.zip (167.1 KB ) - added by davecollett 13 years ago.
Zip file containing example raster.
Repro_error_3.gif (38.3 KB ) - added by davecollett 13 years ago.
Screenshot of error #3
Repro_error_2.gif (35.6 KB ) - added by davecollett 13 years ago.
Screenshot of error #2
Repro_error_1.gif (50.4 KB ) - added by davecollett 13 years ago.
Screenshot of error

Download all attachments as: .zip

Change History (7)

by davecollett, 13 years ago

Attachment: xdrg25069b.zip added

Zip file containing example raster.

by davecollett, 13 years ago

Attachment: Repro_error_3.gif added

Screenshot of error #3

by davecollett, 13 years ago

Attachment: Repro_error_2.gif added

Screenshot of error #2

by davecollett, 13 years ago

Attachment: Repro_error_1.gif added

Screenshot of error

comment:1 by lutra, 13 years ago

Owner: changed from nobody to rblazek
Platform: WindowsAll

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() );

comment:2 by lutra, 13 years ago

Platform Version: Windows XP

comment:3 by lutra, 13 years ago

Odd, using trunk (same revision r15861) 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

Note: See TracTickets for help on using tickets.