Attributes in tile indexes?

Stephen Woodbridge woodbri at SWOODBRIDGE.COM
Sat Apr 21 08:15:24 EDT 2007


Jeff,

This should just work. There is nothing special you should have to do. I 
do it all the time with my mapfiles. I use shp2tile to break mine up but 
that should not make a difference.

First I would try changing your layer to use just one of the smaller 
shape files without the tileindex and see if that works and that you can 
display the labels.

You might also want to post info about what OS, version of mapserver, 
and the LAYER block in question.

-Steve W

Jeff Dege wrote:
> I have a shape file that's too big to draw maps with - takes far too
> long.
> 
> In an attempt to speed things up, I split it into 16 smaller shapefiles,
> using:
> 
>    ogr2ogr -f "ESRI Shapefile" -spat xmin ymin xmax ymax newXX.shp
> old.shp
> 
> Then did a shptree on each of these new files, then a shptinidex to
> create a single tile index shapefile on them, and tried to build a map.
> 
> It works fine, so long as I don't try to display labels.  But if I do, I
> get errors:
> 
>    msDBFGetItemIndex(): Item 'NAME' not found.
> 
> Where "NAME" is the attribute I'm trying to use for the label.  It looks
> like the tileindex shapefile doesn't expose the attributes of the
> underlying shape tiles.  I've done an ogrinfo on the shapefiles that I'd
> generated, and the attributes are there.
> 
> Can I expose the attributes through the tileindex?
> 
> How?



More information about the mapserver-users mailing list