clustering points

Fawcett, David David.Fawcett at STATE.MN.US
Thu Apr 6 10:16:35 EDT 2006


You can see Schuyler's code working at:  http://mappinghacks.com/projects/gmaps/cluster.html

In the Google Maps Hacks book, Schuyler makes a pretty good case for why the tiling approach over K-means for on-the-fly mapping.  

That said, I know of one person doing K-means to cluster points.  This is implemented using PostGIS and Postgres-R.  Anyone, Bitner?!

David.

-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Schuyler Erle
Sent: Thursday, April 06, 2006 8:01 AM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] clustering points


* On  6-Apr-2006 at  2:57AM PDT, Heinz-Josef Lücking said:
> I?m looking for a solution or hints on clustering points depending on
> distance. I would like to have just one symbol with diferent sizes 
> depending on how many points are "behind" that symbol.

I did some experiments with this for Google Maps Hacks, and I found that the fastest way to do this for a map display is to imagine a grid over your map view such that each cell would have the display size of your marker icon. Assign each of your points to the grid cell that contains it.  Finally, for each grid cell that contains a point, display a marker on the map for that cell. The marker can vary based on the number of points the cell contains. 

SDE



More information about the mapserver-users mailing list