Hi Tobi,

  The following documentation topics about raster might help :

http://mapserver.org/input/raster.html#rasters-and-tile-indexing
http://mapserver.org/input/raster.html#raster-display-performance-tips

  and about expressions :

http://mapserver.org/mapfile/expressions.html

The string comparison type is the fastest, so you could try define more classes but using string comparison to see if it gets faster. Also, a good performance tip is to put your most frequent classes types on top first. For example, if 80% of your data has "pixel = -3" then put it on top.

Kind regards,

Alexandre


On 10-07-28 04:54 AM, Tobias Weiß wrote:
Hello list,

this is my first email to this list. I am working with MapServer, OpenLayers & TileCache for almost 1 year now and the tools are really working great together, when everything is configured correctly ;-)

At the moment I´m facing a performance problem with raster data that serves as input data to render my map tiles. The spatial resolution of this raster data is 720 (rows) x 360 (cols) and it is stored in a simple .txt file (The size of the file is around 2 MB). I use TileCache to prerender maptiles for different zoom levels that are later displayed in a web application using OpenLayers.

I discovered, that the rendering speed of MapServer seems to mainly depend on how many different classes I define within my mapfile, meaning how many expressions MapServer has to evaluate during the rendering process. Without any classes MapServer the rendering speed is really fast, the more classes I use the slower it gets. With e.g. 10 different classes defining 10 different styles / pixel colors the rendering time for one tile can increase up to 60 sec.

CLASS
   EXPRESSION ([pixel]>= -4 AND [pixel]<  -3)
     STYLE
        COLOR 69 117 180
    END
END
While working with shape files I haven´t had this problems and prerendering map tiles was really fast. With raster data the rendering time for one map and 5 different zoom levels can take up to several hours and almost overburdens my CPU.

Can anybody give me a hint how I could improve this?

Best, Tobi


_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users


--
Alexandre Dubé
Mapgears
www.mapgears.com

_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to