<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">G'day all,<DIV><BR class="khtml-block-placeholder"></DIV><DIV>We are generating a map showing relative densities in various polygons (worldwide adminstrative regions) of various commodities. This is being done using php-mapscript (4.8), by querying a SQL Server database, developing a range to code, and generating classes below. The shapefile does not have any of the data associated with it, only the id which matches up with that in the db.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>When we do this at a country level (242 countries) there is little trouble with speed - maybe a few seconds. </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>However, at the next level (3300 administrative regions) this is taking way too long. Through various testing, the only step that is taking longer than 1 second is the </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>$img = $map-&gt;draw();</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>step, which can take upwards of 15 seconds - very tedious for a user. (Originally we tried it using reprojection (to orthographic) it was routinely taking &gt; 3 minutes!, so sadly that has been dropped.)</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I accept that the shapefile is large (90MB), and some time will be required, but this seems way to long. if we don't try to colour the polygons, the map displays very fast.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I have attached the class definitions for a part of the mapfile which is generated. The CLASSITEM is the polygon id. Any suggestions??</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>CLASS</DIV><DIV>      NAME "&lt; 7040000 /sq km"</DIV><DIV>      EXPRESSION /^$/</DIV><DIV>      METADATA</DIV><DIV>      END</DIV><DIV>      STYLE</DIV><DIV>        ANGLE 360</DIV><DIV>        COLOR 0 204 51</DIV><DIV>        SYMBOL 0</DIV><DIV>      END</DIV><DIV>    END</DIV><DIV>    CLASS</DIV><DIV>      NAME "&lt; 5280000 /sq km"</DIV><DIV>      EXPRESSION /^157$/</DIV><DIV>      METADATA</DIV><DIV>      END</DIV><DIV>      STYLE</DIV><DIV>        ANGLE 360</DIV><DIV>        COLOR 0 153 102</DIV><DIV>        SYMBOL 0</DIV><DIV>      END</DIV><DIV>    END</DIV><DIV>    CLASS</DIV><DIV>      NAME "&lt; 3520000 /sq km"</DIV><DIV>      EXPRESSION /^158$|^162$|^163$/</DIV><DIV>      METADATA</DIV><DIV>      END</DIV><DIV>      STYLE</DIV><DIV>        ANGLE 360</DIV><DIV>        COLOR 0 102 153</DIV><DIV>        SYMBOL 0</DIV><DIV>      END</DIV><DIV>    END</DIV><DIV>    CLASS</DIV><DIV>      NAME "&lt; 1760000 /sq km"</DIV><DIV>      EXPRESSION /^156$|^160$|^161$/</DIV><DIV>      METADATA</DIV><DIV>      END</DIV><DIV>      STYLE</DIV><DIV>        ANGLE 360</DIV><DIV>        COLOR 0 51 204</DIV><DIV>        SYMBOL 0</DIV><DIV>      END</DIV><DIV>    END</DIV><DIV>    CLASS</DIV><DIV>      NAME " 0 "</DIV><DIV>      EXPRESSION /^$/</DIV><DIV>      METADATA</DIV><DIV>      END</DIV><DIV>      STYLE</DIV><DIV>        ANGLE 360</DIV><DIV>        COLOR 0 0 255</DIV><DIV>        SYMBOL 0</DIV><DIV>      END</DIV><DIV>    END</DIV><DIV>    CLASS</DIV><DIV>      NAME "No Data"</DIV><DIV>      EXPRESSION /^$/</DIV><DIV>      METADATA</DIV><DIV>      END</DIV><DIV>      STYLE</DIV><DIV>        ANGLE 360</DIV><DIV>        COLOR 255 250 205</DIV><DIV>        SYMBOL 0</DIV><DIV>      END</DIV><DIV>    END</DIV><DIV><BR class="khtml-block-placeholder"><DIV><BR class="khtml-block-placeholder"></DIV><DIV>cheers<SPAN class="Apple-tab-span" style="white-space:pre"></SPAN></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Ben<SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN></DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV>-- </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Ben Madin</DIV><DIV>REMOTE INFORMATION</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>t : 08 9192 5455</DIV><DIV>f : 08 9192 5535</DIV><DIV>m: 0448 887 220</DIV><DIV>Broome   WA   6725</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><A href="mailto:ben@remoteinformation.com.au">ben@remoteinformation.com.au</A></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                                                                </SPAN>Out here, it pays to know...</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR class="Apple-interchange-newline"></SPAN> </DIV><BR></DIV></BODY></HTML>