[Mapserver-users] sample of flash using mapserver

Jan Hartmann j.l.h.hartmann at UVA.NL
Thu Oct 12 10:32:31 EDT 2006


Hi Frank,

I tested this out in MapServer verion 4.10.0 with a Mercator raster map. 
  I reprojected it to LatLong (epsg:4326) and to the Dutch projection 
system (epsg:28992). In the first case MapServer reprojects three to 
four times as fast as gdalwarp, in the second case three to four times 
as "SLOW".  Here are the results of one test run, in wall clock seconds. 
  The original map is 512*768 pixels wide and covers Western Europe.

1) original without reprojection:       0.017639

2) projected to epsg:4326 (MapServer):  0.023224
3) projected to epsg:4326 (Gdal):       0.083969

4) projected to epsg:28992 (MapServer): 0.839865   <-------------
5) projected to epsg:28992 (Gdal):      0.261295

Note also that Gdal itself takes three times as much time for projecting 
from Mercator to RD, compared to projecting from Mercator to LatLong. 
Should this really be so expensive?

The LOG entries for 1), 2) and 4 are:

Thu Oct 12 16:11:09 2006,1191,145.100.29.221,test,3,157762.000000 
6229494.000000 1094582.000000 7166314.000000,-1.000000 -1.000000,,normal 
execution
Thu Oct 12 16:11:09 2006,1192,145.100.29.221,test,3,157762.000000 
6229494.000000 1094582.000000 7166314.000000,-1.000000 -1.000000,,normal 
execution
Thu Oct 12 16:11:20 2006,1193,145.100.29.221,test,3,2.812499 48.729965 
8.437498 54.354965,-1.000000 -1.000000,,normal execution
Thu Oct 12 16:11:20 2006,1194,145.100.29.221,test,3,2.812499 48.729965 
8.437498 54.354965,-1.000000 -1.000000,,normal execution
Thu Oct 12 16:11:31 2006,1195,145.100.29.221,test,3,-131782.000000 
106545.000000 452170.000000 690497.000000,-1.000000 -1.000000,,normal 
execution
Thu Oct 12 16:11:32 2006,1196,145.100.29.221,test,3,-131782.000000 
106545.000000 452170.000000 690497.000000,-1.000000 -1.000000,,normal 
execution

Jan



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?)



More information about the mapserver-users mailing list