[GIS] How to cluster XY point data? (ArcGIS 9.3)

arcgis-9.3clusteringmarkerssymbology

I have a whole bunch of icons displaying on a map, I want these clustered together as was suggested to me for a different question here… ArcGIS 9.3. How do I increase Picture Marker Symbol performance?

A link to an example was provided but I'm not really sure where to begin. I'll preface this by saying I'm a programmer way before I'm a gis person.

What I want to know, in total noob terms, is how can I cluster my icons for XY events on the map?

Thanks!

EDIT: Forgot to mention, this is for a C# web ADF GIS portal… If it makes any difference.

Is this even possible? I can't seem to find anything for doing this with 9.3 adf.

Best Answer

A fairly simple way is to snap the events to a grid. It's fast enough that potentially you can do it dynamically.

You can snap the points by means of a few simple computations before creating the events. Decide on the grid's origin and mesh size, using the same coordinate system as the (X, Y) values you have. Let the origin have coordinates (Ox, Oy) and suppose its mesh is c (the distance between neighboring points along the grid's basic directions). Large values of c will create large clusters, at the cost of potentially moving some points large distances (up to c*Sqrt(1/2)). Exploit the flexibility to choose c by finding a value that accomplishes the tradeoff you want between positional accuracy on the map and simplicity.

Calculate

I = {(X - Ox)/c}

J = {(Y - Oy)/c}

Then compute

U = I * c + Ox

V = J * c + Oy.

The braces "{}" mean "round to the nearest whole number." (You could do these calculations in two steps, rather than four, but we will see below that I and J have additional uses.)

After completing the calculation, designate (U, V) as the event coordinates instead of (X, Y). That takes care of the clustering.

In addition you want to winnow the records so there is a single point marker for each unique value of (U, V). Accomplish this by summarizing on (U, V) and basing the point events on that summary. I recall that ArcGIS is limited to summaries on a single physical field. You can create a field corresponding to (U, V) for this purpose with a computation like

Id = I + 10000*J

The value of 10000 only needs to be larger than the total number of (invisible) rows covering your data in the grid.

Related Question