[mapserver-users] Thousands of layers?

Stephen Woodbridge woodbri at swoodbridge.com
Thu May 2 12:20:22 EDT 2002


James,

No, no, no - you don't need to do this! you are using it all wrong way.
The feature that allows you to over come this is tile indexes.

I have have the same setup and only one layer defined for ALL streets in
all 2300 counties.

you keep each county in its own directory and then build a tile index of
all the directories. and then put a shptree spatial index on the
tileindex and finally reference the tileindex in your mapfile for the
layer you want to define.

-Steve Woodbridge

James Jefferson wrote:
> 
> Hello everyone,
> 
> I've been using mapserver for about a year now and one of the problems I've
> struggled with is making a detailed map of the United States - down to the
> street level.
> 
> I have Shapefiles generated from the 1997 TIGER, broken down by county. I've
> noticed in the mapserver documentation that there is a limit of 50 layers per
> mapfile (incidentally, the define in map.h is set to 100). There are a few
> thousand counties in the US, and consquently I think I need a approximately
> 20,000 shapefiles to represent the different layers for each county.
> 
> If I recompile mapserver with MS_MAXLAYERS set higher, how will that affect
> performance? Looking at source it appears that the MS_MAXLAYERS is just used
> to allocate memory for each layer. How does mapserver decide what maps to
> load? I'm assuming it uses the bounding boxes associated with each shapefile
> to determine what file to load? If so, are those read each time mapserver is
> invoxed, or can it have a index file?
> 
> Is anybody else using mapserver for this scale? Advice? Am I on the right
> track at all?
> 
> Thanks,
> 
> -James Jefferson
> Winona, Minnesota



More information about the mapserver-users mailing list