Opened 18 years ago
Closed 14 years ago
#1715 closed defect (worksforme)
Line pattern in image mosaic when reprojecting
Reported by: | Owned by: | warmerdam | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | MapServer CGI | Version: | 4.8 |
Severity: | normal | Keywords: | |
Cc: |
Description (last modified by )
Creating a mosaic from seamless tiled images creates a regular pattern of lines in the background color along the edges of the images. This only happens if the image is requested in a projection other than the source projection. Further: 1. only versions 4.8.x of mapserver are affected (4.6.1 works fine) 2. the pattern is only visible at certain combinations of image resolution, map extent and map size. Regarding 1: The gdal version is different (1.2 vs. 1.3). Maybe this is somehow related. Regarding 2: It seems that the effect preferably occurs if the images are scaled down.
Attachments (1)
Change History (7)
by , 18 years ago
comment:2 by , 18 years ago
I have established that this problem was introduced with the fix for Bug 1493 related to excessive oversampling of data for reprojection. Rolling back mapresample.c to Rev 1.61 undoes the problem. ... digging further to see what ought to be done.
comment:3 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
OK, I have determined that the problem relates to the calculation: nLoadImgXSize = (int) MAX(1,(sSrcExtent.maxx - sSrcExtent.minx) * (dfNominalCellSize / sDummyMap.cellsize)); nLoadImgYSize = (int) MAX(1,(sSrcExtent.maxy - sSrcExtent.miny) * (dfNominalCellSize / sDummyMap.cellsize)); There is round off implicit in this, which can result in the dummy map not having quite the full extents of the original source raster. The fix is to recompute a cellsize to ensure it relates to the full source image extents. sDummyMap.cellsize = ((sSrcExtent.maxx - sSrcExtent.minx) * dfNominalCellSize) / nLoadImgXSize; This fixes things in the demonstration example. I think this problem could also occur in MapServer 4.6, but it was much less common due to the oversampling mentioned in bug 1493. I will apply this fix in 4.9 and 4.8-branch, so it should appear in mapserver 4.8.2.
comment:4 by , 18 years ago
I finally managed to upgrade to mapserver 4.8.3 and tested the fix for this bug. Generally the line patterns appear less frequent. For example, the test case I submitted works fine now. However, in some situations there are still patterns visible. If it is of any help, I would prepare a new test case. Thanks for any help.
comment:5 by , 18 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Dirk, If you prepare another test case I'll take a look. It may be that there isn't much I can do practically to deal with it, but I'd like to verify that I understand what is going on.
comment:6 by , 14 years ago
Description: | modified (diff) |
---|---|
Resolution: | → worksforme |
Status: | reopened → closed |
No new test case was offered, so I'm closing this as works for me. I'll look into it if a demonstration is offered.
Note:
See TracTickets
for help on using tickets.
test case for the bug