[Mapserver-users] Mapserver performance for large maps - suggestions?

Ed McNierney ed at topozone.com
Wed Jul 28 20:55:37 EDT 2004


Nick -

Remember that the way to speed up map rendering is to determine as
quickly as possible what data is NOT needed for the requested map.
Therefore, anything you can do to cause the largest portion of your data
to be left untouched is a good idea.

MapServer renders rectangular maps.  If you can organize your data into
sections that are rectangular (more or less) and at least minimally
overlapping, then many of those sections can be quickly discarded if
they're not needed.  For example, a data set covering the United States
might be organized by each state - one shapefile per state (let's
pretend there's only one layer).  Then a TILEINDEX that would compute
and store the bounding rectangles for each state would make it easy to
decide which states might possibly contribute to a given map request.
The bounding rectangles will overlap each other, but a request for a map
that covers, say, 200 miles square, will be able to quickly discard all
but the few states that could possibly contribute.

Please also remember that such techniques gain you nothing if you end up
drawing everything anyway.  So you will also want to organize your
layers into scale-dependent groups and avoid trying to draw every local
road in the country if you're looking for a map of the entire US.

The vmap0 data is naturally organized into relatively "friendly" chunks,
so I'd start by leaving it at that.  Don't merge, don't split.  My
friend Bob Frankston has long railed against "premature optimization" -
get it working first, then optimize.

	- Ed


Ed McNierney
President and Chief Mapmaker
TopoZone.com

> Hi,

> I'm installing and configuring Mapserver for use in a geo-located 
> photo album. I'm currently converting the vmap0 maps from their format

> into shapefiles with ogr2ogr so I can use them, and have a few 
> questions about how to obtain the best performance:
> - Should I merge all 4 regions of a particular layer into one file, or

> is there a benifit to keeping them seperate?
> - Am I likely to encounter performance issues with such large layers?
> (The largest will be ~500MB - though I may not use it - the average 
> probably around 30-60MB) If so, how can I improve performance? I'm 
> aware I should have lower detail maps for wider views, but what can I 
> do beyond that?
> - Will loading the maps into PostGIS give an improvement in
performance?
> I'd read somewhere that shapefiles are slightly faster than postgis 
> for simple geographical queries - is this the case for large amounts 
> of data such as this?
> - What other things can I do to improve performance considering the 
> amount of accessible map data?

> Thanks,

> Nick Johnson
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users



_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users




More information about the mapserver-users mailing list