RE: decluttering

From: Mark Bucciarelli <mark.bucciarelli@peregrine.com>
Date: Fri Jul 06 2001 - 11:19:26 EDT

Hi Tennessee,

Here's my recollection of how decluttering works. The display area
is broken up into a big grid; this is the "matrix." When you ask
the declutter matrix to place a label at a certain point, it calculates
which cell grid the xy point falls into, and then looks up to see if
this cell is already occupied. If it isn't, it returns the point
and marks the cell as taken.

If it is occupied, then things get more interesting. The program starts
spiralling out from this point--picture a box centered at the point.
This box has four sides and four corners. So in the first cycle, the
algorithm looks at these eight cells. As soon as it finds an open cell,
it marks it as used and returns a new point that is in that cell.

If the first cycle doesn't find an open cell, it expands the "radius"
of search and tries again. The FastDeclutterMatrix class drastically
limits the number of cycles the algorithm performs.

I think there are some other technical details like using font metrics
to mark a bunch of cells for long labels and how the map decides on
what the matrix cell size should be.

Also, there is some commented out code in the library that allowed
the graphic objects to take up cells. The BBN-NT developer thought
it presumptuous to assume that a user would want graphics to use up
grid cells as well as labels, as the map would get less label text
this way.

Hope that helps.

--
Mark Bucciarelli    Peregrine Systems, Inc.       R&D, Boston
(413) 253-0020      mbucciarelli@peregrine.com    Yahoo: m_bucciarelli
http://www.peregrine.com 
> -----Original Message-----
> From: Tennessee Leeuwenburg [mailto:t.leeuwenburg@bom.gov.au]
> Sent: Thursday, July 05, 2001 9:19 PM
> To: openmap-users@bbn.com
> Subject: decluttering
> 
> 
> Hi,
> 
> I'm looking at the decluttering in openmap. It seems a bit 
> slow, even when 
> I don't have all that many data points. I was wondering how the 
> decluttering worked, and whether it would be worthwhile 
> trying to make the 
> algorithm a bit more efficient?
> 
> -T
> ==============================================
> This email contains information which may be useful. The views
> expressed within may or may not be the views of the author.
> ==============================================
> 
> -Tennessee Leeuwenburg, Silver Stream Pty Ltd
> 0418 300 881
> 
> --
> [To unsubscribe to this list send an email to "majdart@bbn.com"
> with the following text in the BODY of the message 
> "unsubscribe openmap-users"]
> 
--
[To unsubscribe to this list send an email to "majdart@bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Fri Jul 6 11:21:50 2001

This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:31 EDT