can not get tileindex working

Bart van den Eijnden BEN at SYNCERA-ITSOLUTIONS.NL
Mon Sep 5 05:57:01 EDT 2005


First of all, assuming you are on windows, ogrtindex should be called in a loop:

for %i in (*.shp) do ogrtindex %i mytileindex.shp

Qix is a quadtree spatial index format which Mapserver uses for shapefiles, and yes you should use it, as it will make rendering smaller areas from the shapefile a lot faster. Create the indexes with shptree.

Hope this helps.

Best regards,
Bart

Bart van den Eijnden
Syncera IT Solutions
Postbus 270
2600 AG  DELFT

tel.nr.: 015-7512436
email: BEN at Syncera-ITSolutions.nl

>>> Xin <crazygecko at GMAIL.COM> 09/05/05 11:50 am >>>
Hi list,

I've searched the archives endlessly, and though there's been alot of posts 
on this I still can't seem to get the hang of it.

I'm trying to index my shapefiles, as I've been told this will give it a 
performance boost. All my data are all in one directory, and they're roughly 
half a gig in size. It is operating rather slowly at the moment, taking a 
few seconds to display all the layers.

This is how I initially tried to use tile index on my data:
ogrtindex *.shp tileindex.shp # to index all my shapefiles
in the map file, add below to every layer:
TILEINDEX "tileindex.shp,0" # and remove DATA tag

This doesn't work!

I've since read you have to group different types together into one index 
file. i.e. all the POINTS in one, LINES in another etc. So you would have 
say 4 tile index files, each corresponding to each type. Then would I use 
these filenames, i.e. TILEINDEX "pointindex.shp". Is this the right way, 
anyway to automated? And what are shptree used for?

I tried to use imaptools.com <http://imaptools.com>'s shp2tile, but the 
library it depends on(shapelib) wouldn't compile.

One last question. What's qix and should I use it?

Thank you inadvance for your help.

Regards,
Xin



More information about the mapserver-users mailing list