tile index for large amount of shp

Stephen Woodbridge woodbri at SWOODBRIDGE.COM
Sun Jul 9 06:09:34 PDT 2006


Hi Giuseppe,

Yes, a tileindex is exactly what you need here. It will improve 
performance and significantly reduce your mapfile layers.

Try this:

ls map*-streets.shp > streets.in
tile4ms streets.in streets-idx
shptree streets-idx

and in your mapfile replace ALL you map*-streets layers with a single

Layer
name ...
tileindex "streets-idx"
# no data statement
....
end

Do the same for the other layers. So you have a tileindex for each 
theme. And make sure all files have .qix spatial indexes for performance

for x in *.shp ; do shptree $x ; done

And enjoy :)

There is one caveat and that is the all map*-streets.shp files must have 
the same attributes defined for a given tileindex and the attributes 
must be in the same order within the files.

-SteveW

Giuseppe De Rossi wrote:
> Hi,
> I need some kind explanations about  tile index technique. At the moment I
> have about 750 layers as shp file. they are organized as:
> 
> map1-streets.shp
> map1-rivers.shp
> map1-particels.shp
> ...
> map1-referencedPointsN.shp
> ...
> ...
> mapN-streets.shp
> mapN-rivers.shp
> ...
> mapN-referencedPointsN.shp
> 
> Some are polygons type, some are lines and some are text and points.
> The user can visualize one layer and turn it on or off  by using both the
> location : map1-particels and the theme: particel-map1. The real number of
> differen theme-layer is 
> 
> I've two oreder of problems , the maximum number of layers and the
> performance.
> could be  the first problem resolved by tile index tecnique ? can I improve
> the perfomance too without recompiling mapserve ?
> can I apply this tech into my problem ? what are the single steps of
> procedure ?
> 
> I appraciete any info and suggestion.
> 
> thanks in advance and best regards
> 
> 
> Giu.
> 
> 
> 
>  
>  --
>  Email.it, the professional e-mail, gratis per te: http://www.email.it/f
>  
>  Sponsor:
>  Ti piace la chitarra? Impara a suonarla senza fatica ed evitando tutti gli
> errori, con l'aiuto di un maestro professionista
>  Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=5144&d=20060709
> 



More information about the MapServer-users mailing list