speed of map generation

Manfred Meier m.meier at SPIEKERMANN.DE
Wed Sep 13 00:10:45 EDT 2006


Hello,

>> This is being 
>> done using php-mapscript (4.8), by querying a SQL Server database, 
there were some mails a few weeks ago about speed and database 
connections on this list. Look for: "performance with different data 
formats" (date: about Aug, 20-23). Perhaps this applies to your problem too.

>> if we don't try to colour the 
>> polygons, the map displays very fast.
Could you put for a test the data into the dbf file of this layer? It 
would be interesting to see if there a difference in speed when not 
using a database connection.

>>       EXPRESSION /^158$|^162$|^163$/
I don't think, that your problem with speed is because of your regular 
exp. But since you have only a few classes, could you add a new field to 
the database with a number from 1..n corresponding to your classen and 
use this number field as CLASSITEM? Only to see if there is a difference.

Manfred



Ben Madin schrieb:

> G'day all,
> 
> 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.
> 
> When we do this at a country level (242 countries) there is little 
> trouble with speed - maybe a few seconds. 
> 
> 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 
> 
> $img = $map->draw();
> 
> 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 > 3 minutes!, so sadly that has been dropped.)
> 
> 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.
> 
> I have attached the class definitions for a part of the mapfile which is 
> generated. The CLASSITEM is the polygon id. Any suggestions??
> 
> CLASS
>       NAME "< 7040000 /sq km"
>       EXPRESSION /^$/
>       METADATA
>       END
>       STYLE
>         ANGLE 360
>         COLOR 0 204 51
>         SYMBOL 0
>       END
>     END
>     CLASS
>       NAME "< 5280000 /sq km"
>       EXPRESSION /^157$/
>       METADATA
>       END
>       STYLE
>         ANGLE 360
>         COLOR 0 153 102
>         SYMBOL 0
>       END
>     END
>     CLASS
>       NAME "< 3520000 /sq km"
>       EXPRESSION /^158$|^162$|^163$/
>       METADATA
>       END
>       STYLE
>         ANGLE 360
>         COLOR 0 102 153
>         SYMBOL 0
>       END
>     END
>     CLASS
>       NAME "< 1760000 /sq km"
>       EXPRESSION /^156$|^160$|^161$/
>       METADATA
>       END
>       STYLE
>         ANGLE 360
>         COLOR 0 51 204
>         SYMBOL 0
>       END
>     END
>     CLASS
>       NAME " 0 "
>       EXPRESSION /^$/
>       METADATA
>       END
>       STYLE
>         ANGLE 360
>         COLOR 0 0 255
>         SYMBOL 0
>       END
>     END
>     CLASS
>       NAME "No Data"
>       EXPRESSION /^$/
>       METADATA
>       END
>       STYLE
>         ANGLE 360
>         COLOR 255 250 205
>         SYMBOL 0
>       END
>     END
> 
> 
> cheers
> 
> Ben
> 
> 
> -- 
> 
> Ben Madin
> REMOTE INFORMATION
> 
> t : 08 9192 5455
> f : 08 9192 5535
> m: 0448 887 220
> Broome   WA   6725
> 
> ben at remoteinformation.com.au <mailto:ben at remoteinformation.com.au>
> 
> 
> 
> 
> 
> Out here, it pays to know...
> 
> 
> 
> 
> 
> 
> 



More information about the mapserver-users mailing list