[ka-Map-users] tileindexing and precache
Michelle Schulze
michelle at markschulze.net
Mon Feb 11 16:55:46 EST 2008
Hi list,
Perhaps since I have two different problems I should be posting more than
one message, but we'll start with this and see where it leads. I've been
working for the last several months on a map-based interface for a database
of geophysical data. The idea is for the user to view groups of surveys, by
vendor, on an interactive map and be able to click on an individual survey
to bring up a new page with information about vintage, data spacing, vendor
notes, etc. I chose kamaps as my interface because I'm new to open source
and not comfortable with a lot of programming.
My first question is about tileindexing. Though my maps cover North
America, the surveys I am displaying on the map (using shape files of
various vintages) can cover multiple territories/states down to only a few
counties. When I precache the tiles, some of the groups will end up
containing one or two images that contain anything along with thousands of
blank tiles. I'm not exactly sure how much of a performance issue this is,
but it just seems inefficient, so I looked around for solutions and ran
across TILEINDEX on the Mapserver website.
>From the information available, I believe the idea behind tileindex is that
for the indexed layers the index shapefile is loaded and only if the mbrs
from the index file are within the mapextents will the actual shape file be
called. I thought this might help when I run precache because I THOUGHT for
every tile, tile.php is calculating the extents for the tile and sending a
request to Mapserver for that extent/group, so since it wouldn't load the
shape file it wouldn't make the tile. Clearly I don't have a good
understanding of what is happening here, because I still end up with the
exact same number of tiles whether I use TILEINDEX or a straight DATA
configuration. Any suggestions here would be appreciated. I had also
hoped to use this tileindex to limit the legend entries based on the
viewport extents, but obviously Mapserver returns the layer legend
information whether or not it loads the data for that layer. If someone has
some ideas for this, I'd be thrilled to learn about them.
My second, more pressing problem regards precaching. I don't have any
reference to imageformat in my map files and I have the format set to PNG in
my config.php file. When I run precache.php on my files, it creates pngs. It
looks like init.php is supposed to default to whatever format is in the
config file, but when I run kamaps with the $tileSource = 'auto', it is
creating new tiles in a gif format and when I try to switch to $tileSource =
'cache', it just doesn't load at all. I cannot figure how which script is
setting the format to gif files. I prefer pngs, but I guess I can switch to
GIF in the config file if that's the only solution.
Thanks in advance for any advice you can offer.
Michelle Schulze
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/ka-map-users/attachments/20080211/f8599501/attachment.html
More information about the ka-Map-users
mailing list