[Xastir-Dev] Map Drawing Tweaks

Curt Mills, WE7U hacker at tc.fluke.com
Tue Jun 17 19:43:46 EDT 2003


On Tue, 17 Jun 2003, Chris Bell wrote:

> > Don't draw a map if its extents are less than 10% of the viewport in
> > either direction.
> >
> > Don't draw a map if the viewport is less than 10% of the map extents
> > in both directions.
>
> I experimented with this a while back for rasters, skipping maps that
> were "too far" from 1:1 pixel translations.  It was hard to tune the
> limits to get consistently good looking maps.  Basing the check on the
> extents might not work in some cases (compare a 320x320 jpg vs. a
> world shapefile) so it almost has to be per map.  Rasters are easy,
> since they have an inherent pixel scale that we can check.  Vectors
> are harder, how do you decide (other that the easy case of less that
> xx% of the viewport) on the feature size?  I like to have my world
> outline shapefile even when looking at close in details.

Yes.  I can see that.  I like having a world shapefile as well, and
the simple case of 5% or so does speed things up, but it gets rid of
large-scale vector maps at close-in zoom levels, which I don't want.

Perhaps this:  For vector maps, use the percentage value for cases
where the "map is small in comparison to the view", but skip the
check for "view small in comparison to the map".  For shapefiles,
they're pretty fast anyway when you're zoomed in.  It's the other
case, where you might have a lot of county road maps selected and
are zooming out, where you want to disable those maps at some point.

I suppose it's also useful at times to disable the world map when
you're looking at a county map coastline, but it's not as critical.
You could perhaps check to see if a more detailed vector map was
being used, and disable less detailed ones, but only if they're
significantly larger than the viewport?  That might be a level of
intelligence beyond what's needed here.


> Maybe a global per type (vector/raster) as a better compromise?  I
> found 3 was a reasonable raster limit (draw between 3:1 and 1:3 pixel
> scales).  I still have that patch saved away somewhere, so would be
> easy to add back in.

That seems to be a good measure of raster map usability.  I'd like
to see your patches.  Perhaps between yours for raster and the
vector limit I just described, Xastir might be much more usable with
a lot of maps selected.

-- 
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