[Gdal-dev] gdaladdo and MapServer's OFFSITE parameter

Jeff McKenna jmckenna at dmsolutions.ca
Tue Jan 30 17:55:20 EST 2007


Through IRC (#gdal-dev on irc.freenode.net) Howard Butler solved my problem:

- i was using OFFSITE 0 0 0, and that value was apparently changing 
through gdaladdo's averaging
- so using 'gdaladdo -r nearest' resampling instead solved the problem

thanks hobu!

jeff



Jeff McKenna wrote:
> I have a test case that produces odd results:
> 
> I have 2 geotiffs that have to reproject, add overviews, and tile. Here 
> is what I found:
> 
> 1. raw data tiled looks fine: 
> http://www2.dmsolutions.ca/netbin/premiere/340401/original.gif
> 
> 2. reprojected with gdalwarp, overviews with gdaladdo, and tiled, shows 
> a sliver between the 2 images:
> 
>  > gdalwarp -s_srs EPSG:26916 -t_srs EPSG:102736 -of GTiff file1.tif 
> ./new/file1.tif
> 
> http://www2.dmsolutions.ca/netbin/premiere/340401/warped-with-overviews-no-offsite-sliver.gif 
> http://www2.dmsolutions.ca/netbin/premiere/340401/warped-with-overviews-no-offsite-zoomed-into-line.gif 
> 
> 
> 3. reprojected with gdalwarp, overviews with gdaladdo, tiled, using 
> OFFSITE in mapfile:
> 
>  > gdaladdo -r average ./new/file1.tif 2 4 8 16
> 
> thinner sliver still exists at full extents (and several zooms after 
> this): 
> http://www2.dmsolutions.ca/netbin/premiere/340401/warped-with-overviews-with-offsite-sliver.gif 
> 
> 
> sliver does not exist when zoomed far in: 
> http://www2.dmsolutions.ca/netbin/premiere/340401/warped-with-overviews-with-offsite-zoomed-into-line.gif 
> 
> 
> 4. reprojected with gdalwarp, without overviews, tiled, and using 
> OFFSITE in mapfile looks perfect:
> 
> http://www2.dmsolutions.ca/netbin/premiere/340401/warped-no-overviews-with-offsite.gif 
> 
> http://www2.dmsolutions.ca/netbin/premiere/340401/warped-no-overviews-with-offsite-zoomed-in.gif 
> 
> 
> ****
> 
> So there seems to be a problem with using gdaladdo and MapServer's 
> OFFSITE parameter.
> 
> Am I doing something wrong, or am I missing a commandline switch somewhere?
> 
> I have the 2 test images and test mapfile for whoever wants to try this 
> as well (I just can't distribute the images over this list).
> 
> thanks.
> 
> jeff
> 
> 


-- 
Jeff McKenna
DM Solutions Group Inc.
http://www.dmsolutions.ca



More information about the Gdal-dev mailing list