Reprojecting with Gdalwarp vs native MapServer

Frank Warmerdam warmerdam at POBOX.COM
Wed Oct 11 10:52:56 EDT 2006


Jan Hartmann wrote:
> Hi,
> 
> I have noticed that reprojecting layers on the fly in MapServer is much 
> slower than creating a new file with gdalwarp and using that one in 
> MapServer. With a PHP-MapScript program MapServer took two to three 
> times as much time as gdalwarp, despite the fact that gdalwarp requires 
> an extra read/write operation to disk. Is it possible to let MapServer 
> use gdal's warping engine when gdal is available?

Jan,

Are you saying the time to run gdalwarp + mapserver from the result is shorter
than running letting mapserver do a reprojection from the source image?
Yikes!  This is very unexpected.

I would suggest you try running the mapserver with reprojection with the layer
debugging turned on. It will report some details about how much data is
actually read from disk, and that may give us a clue.

In general, the mapserver reprojection should be substantially faster than
gdalwarp and if it isn't the case there is some sort of problem in mapserver
we should fix.

PS. you might want to upgrade to a recent MapServer if you aren't using one
already.  There was a bad problem with gross-oversampling in the reprojection
code in some circumstances that was fixed a while ago (perhaps six months?)

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org



More information about the mapserver-users mailing list