[mapserver-users] shptree help

woodbri at swoodbridge.com woodbri at swoodbridge.com
Fri Aug 23 15:06:34 EDT 2002


On 22 Aug 2002 at 13:33, Eric L. Blevins wrote:

> I've been using mapserver for about 4 weeks now....
> I am wondering if using shptree would offer any performance increase for my
> particular setup.
> 
> Currently I have over 3000 shape files generated from TIGER data.
> The files are separated in directoreies by county and each county contains 3
> shape files where
> each shape file contains only the data needed to render a particular layer.

I have almost the same setup running at http://iMapTools.com/demos 
but I only have the eastern US loaded. You should have a shptree 
index for EVERY shape file under mapserver, this includes tileindex 
files. If you don't then mapserver has to brute force it and read 
every record even when it does not need them. It will be faster!

> Ex:
>     Directory OH/FranklinCounty   contains:
>         localroads.shp
>         primaryroads.shp
>         secondaryroads.shp

Given that these three files tend to cover the exact same spatical 
areas (with only minor variations) you could probably create only one 
tileindex instead of three which would also make things faster. I 
have created a custom tileindex that indexes the county directories 
as a single unit and then reference it on any layer that contains 
county data. For line and polygon data just use the default shptree 
options and for point data set the depth to between 8 and 12 should 
generate good results.

-Steve
> 
> I am using a separate tileindex for each layer.
> Ex:
>     localroadstile.shp
>     primaryroadstile.shp
>     secondaryroadstile.shp
> 
> Were running this on a Linux box with Intel hardware.
> 
> Would using shptree offer me any performance boost?
> Would it be useful to do shptree on the tileindexes?
> What would the correct command line options be for my particular setup?
> 
> You can see our mapserver here: http://mapserver.zhrodague.net/eblevins
> 
> Thanks all!
> Eric L. Blevins
> 
> 
> 
> 





More information about the mapserver-users mailing list