[postgis-users] OT: Algorithm Suggestion

Antonello antonello.monetsen at gmail.com
Mon Mar 12 05:49:19 PDT 2007


I am not sure if I understood the problem at 100%, but I think your 
problem is not a geometric problem, but a symbolic representation problem:

I mean, in the postGis db and in the real work the building and the 
point that represent them, never overlap. But of course when you try to 
show them in a map and you zoom out, there is a zoom level that the 
point representation overlap others point just because the dimension of 
these points(in the map) are huge respect at real points.
In this cause, I usually play with scale: Suppose that you have two 
layers: one points that represent the different buildings, and other one 
that have a single point that represent the X neighborhood. Well my 
solution is: show buildings layer where for the zoom level there isn't 
any overlap. And you can show the neighborhood layer when you see that a 
x scale the point start to overlap.

I know that may be my solution is not what are you looking for, but I 
hope can help you.

Bye, bye Antonello

Abe Gillespie wrote:
> Hey all,
>
> This is definitely off topic so please ignore if you could care less.
> I'm not really sure where to go for this advice so PostGIS gets my
> abuse.  Sorry.
>
> I'm looking for a GIS algorithm (or an idea of an implementation) that
> clumps scattered, overlapping point data into simple clumps that do
> not overlap.
>
> For instance:
> Say we have a point for every building and house in a city.  Initially
> we start zoomed such that the city boundary is entirely in view.  At
> this view I'd like to have single non-overlapping points that
> represent clumps of buildings.  Now say a specific clump right
> downtown gets my attention.  I want to zoom in there and get a closer
> look.  As I zoom in the clumps break apart into new clumps.
> Eventually I'll zoom in enough to where the clump points are just each
> single building.
>
> At the most extreme zoomed-out level you'd see one single clump point
> representing every single building (imagine you're zoomed way WAY
> out).  At the most extreme zoomed-in level you'd have each individual
> building point.
>
> The biggest requirement here is having no points overlapping at any
> zoom level.  The exact placement of these clumps is not an issue
> though it should be roughly the average x,y of all the points the
> clump represents.
>
> Is there any algorithm in the GIS space that solves this problem?  It
> doesn't seem like a very unique problem, but I've never run across it.
> Perhaps even PostGIS can do this (though I'm really looking for a
> general solution)?
>
> Also, adding to the complexity is the fact that my point locations are
> dynamic.  So I couldn't just set up a set of layers for set zoom
> levels.  I.e. the algorithm would have to run every time the map is
> rendered.
>
> Thanks for your help / ideas!
> -Abe
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>




More information about the postgis-users mailing list