[josm-dev] JOSM Mappaint - major improvements
Frederik Ramm
frederik at remote.org
Tue Jan 13 12:54:05 GMT 2009
Hi,
Sascha Silbe wrote:
> That's to be expected. Even with a spatial index (AFAIK josm still
> doesn't use one yet), looking up the objects inside a give bounding box
> ("the view") is dependant on the total number of objects. For example, a
> 2D-PR-Tree lookup is about O(sqrt(n)) [1], with n being the total number
> of objects stored in the tree.
> If some genius invents a spatial index with lookup in O(1), I'm sure
> we'll hear about it. :)
It would be trivial to create a list of objects that are currently
visible, and renew this list each time the viewport changes. In this
case, the redrawing speed would be directly proportional to the number
(and complexity) of items in view, no matter how many objects are
loaded. Only viewport changes would require re-calculating the visible
objects list.
Bye
Frederik
More information about the josm-dev
mailing list