<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Tobi,<br>
<br>
&nbsp; The following documentation topics about raster might help :<br>
<br>
<a class="moz-txt-link-freetext" href="http://mapserver.org/input/raster.html#rasters-and-tile-indexing">http://mapserver.org/input/raster.html#rasters-and-tile-indexing</a><br>
<a class="moz-txt-link-freetext" href="http://mapserver.org/input/raster.html#raster-display-performance-tips">http://mapserver.org/input/raster.html#raster-display-performance-tips</a><br>
<br>
&nbsp; and about expressions :<br>
<br>
<a class="moz-txt-link-freetext" href="http://mapserver.org/mapfile/expressions.html">http://mapserver.org/mapfile/expressions.html</a><br>
<br>
&nbsp; The string comparison type is the fastest, so you could try define
more classes but using string comparison to see if it gets faster.&nbsp;
Also, a good performance tip is to put your most frequent classes types
on top first.&nbsp; For example, if 80% of your data has "pixel = -3" then
put it on top.<br>
<br>
Kind regards,<br>
<br>
Alexandre<br>
<br>
<br>
On 10-07-28 04:54 AM, Tobias Wei&szlig; wrote:
<blockquote cite="mid:4C4FF051.3060309@pik-potsdam.de" type="cite">
  <meta http-equiv="content-type"
 content="text/html; charset=ISO-8859-1">
  <font face="Tahoma">Hello list,<br>
  <br>
this is my first email to this list. I am working with MapServer,
OpenLayers &amp; TileCache for almost 1 year now and the tools are
really working great together, when everything is configured correctly
;-)<br>
  <br>
At the moment I&acute;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). </font><font
 face="Tahoma">I use TileCache to prerender maptiles for different zoom
levels that are later displayed in a web application using OpenLayers.<br>
  <br>
  </font><font face="Tahoma">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.<br>
  <br>
  </font>
  <pre wrap="">CLASS<span class="moz-txt-citetags">
  </span>EXPRESSION ([pixel] &gt;= -4 AND [pixel] &lt; -3)<span
 class="moz-txt-citetags">
    </span>STYLE
<span class="moz-txt-citetags"></span>        COLOR 69 117 180
<span class="moz-txt-citetags"></span>   END
<span class="moz-txt-citetags"></span>END
  </pre>
  <br>
  <font face="Tahoma">While working with shape files I haven&acute;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.<br>
  <br>
Can anybody give me a hint how I could improve this?<br>
  <br>
Best, Tobi<br>
  </font>
  <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
mapserver-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a>
  </pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">-- 
Alexandre Dub&eacute;
Mapgears
<a class="moz-txt-link-abbreviated" href="http://www.mapgears.com">www.mapgears.com</a>
</pre>
</body>
</html>