speed of map generation
Ben Madin
ben at REMOTEINFORMATION.COM.AU
Mon Sep 11 17:26:45 PDT 2006
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
Out here, it pays to know...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060912/8befa0ae/attachment.htm>
More information about the MapServer-users
mailing list