[Xastir-Dev] Prevent unnecessary Tiger Map fetches (fwd)

Curt Mills hacker at tc.fluke.com
Fri Oct 11 17:09:48 EDT 2002


Third try.  First two didn't make it to the list.


Subject: Prevent unnecessary Tiger Map fetches

In response to Gerry's new bug report, I think this is worthy of
some discussion on the mailing list as it could get quite involved
trying to come up with a reasonable solution:


Gerry Wheeler wrote:

> When Tiger Maps are enabled, Xastir will attempt to refetch the
> map even when not necessary.  For example, I had shapefile maps
> turned on, and I enabled Tiger maps.  After fetching the map, it
> was displayed under the shapefiles. So, I used the menu to turn
> off the shapefile maps. When I did, Xastir refetched the Tiger
> map, even though the view was the same as when it first fetched
> it. It should have been able to just reuse the current map,
> shouldn't it?


With the current setup, no.  It draws all of the maps (except
weather alerts) into the same pixmap.  When you turned off the
shapefiles it had to redraw the pixmap because it had been corrupted
by the shapefiles.

1) We could draw raster maps and vector maps into different pixmaps
but that would require quite a few changes to the code and more
memory.

2) We could snag the image file out of /var/tmp where it was put by
"wget", but with the current setup we might have fetched more than
one 'net map in sequence:  We use the same temporary filename each
time, so it could be problematic.  Perhaps we could specify a
storage location in the .geo file, and if the zoom/extents hadn't
changed since the last fetch, use that file?

3) We could draw internet maps and local maps into different
pixmaps.  That would require a bunch of code changes as well as
requiring us to order the map drawing with internet stuff first,
which might require drastic changes in how the map files are stored
on disk.

4) We could copy each internet map into a cache directory and save
the file extents/zoom level that we have for it.  We'd have to
change the code to look there first for internet maps, and it might
take a while to get bugs worked out of the new code to age things
out of the cache properly.  This could be a real headache.  Caching
seems simple, but isn't in practice.

-- 
Curt Mills, WE7U                    hacker_NO_SPAM_ at tc.fluke.com
Senior Methods Engineer/SysAdmin
"Lotto:    A tax on people who are bad at math!"
"Windows:  Microsoft's tax on computer illiterates!" -- WE7U
"The world DOES revolve around me:  I picked the coordinate system!"





More information about the Xastir-dev mailing list