Separate Overlapping Points with Starburst Dispersion, Possible?

417
4
01-03-2024 10:27 AM
JonJones1
Occasional Contributor

Hello everyone,

I'm looking for way to separating overlapping points in a dataset.

Here's the context: I have about 13,000 points representing mine locations across the United States. However, around 4,500 of these points are not placed at the actual mine sites but at the center of the county where the majority of the mine is located. This was done when the precise location of the mine was unknown.

My task is to relocate these points to their accurate positions, based on local knowledge. The challenge arises with the overlapping points at the county centers, sometimes over 50 at a single location, making it difficult to select the correct one. I am envisioning a solution where points with identical coordinates could automatically spread out, ideally in a starburst pattern from the central point. This would make it easier to select, and then move each point to its true location.

I'm not looking for binning or grouping solutions, a true tool that moves points with identical lat and long position is desired. Does anyone know of a method that could achieve this?

0 Kudos
4 Replies
nabaz-gharib
Occasional Contributor
BobBooth1
Esri Contributor

It is possible to use Python to adjust the position of points. Look at the documentation for arcpy.da.UpdateCursor

https://pro.arcgis.com/en/pro-app/3.1/arcpy/data-access/updatecursor-class.htm

An UpdateCursor will respect a selection, so you could select a stack of points and run code to update their geometries using SHAPE@X and SHAPE@Y.

Reading Geometries:

https://pro.arcgis.com/en/pro-app/3.1/arcpy/get-started/reading-geometries.htm

Writing Geometries:

https://pro.arcgis.com/en/pro-app/3.1/arcpy/get-started/writing-geometries.htm

You could do this with the feature class on your map, and run the code in a Notebook in ArcGIS Pro.

The Count Overlapping features tool could help you find the locations where you have point stacks.

https://pro.arcgis.com/en/pro-app/latest/tool-reference/analysis/count-overlapping-features.htm

 

 

0 Kudos
BobBooth1
Esri Contributor

Here is an example of how you might go about it.

The feature layer myPoints on the map has a stack of points at Durham, NC (along with various other points at other cities).

Using the selection tool, I selected the stack of points. You can see in the attributes that there are several selected features.

In a Notebook in ArcGIS Pro, I specify the layer on the map I want to work with and assign it to the variable "fc".

I make a list of the fields I'm interested in using, SHAPE@X and SHAPE@Y.

I run a Search Cursor on the selection to print the coordinates. I also grab the coordinate values and assign them to variables to use later (when the loop stops, the values are those of the last point).

get_stack_of_points_selection_coordinates.png

In the next cell of I my notebook, I use an Update Cursor to move each of the points to make a diagonal line of points.

incrementally_move_points_away_from_stack.png

I take the starting values from the variables I grabbed for the coordinates in the previous cell.

In the cursor, I set row[0], the value of X coordinate, to the value of the X coordinate I grabbed before. Then I update that value by adding -0.0001 degrees (this data is in decimal degrees... if your data is in planar units you would add a planar distance, like 1 meter, or 10 feet).

I also do the same thing with the row[1] value, for the Y coordinate (adding a similar amount).

Then I update the row (the current feature in the cursor) to use the new values, and the loop happens again, for each of the selected features.

The result is a diagonal line of points starting at the original location.

This is a little dangerous, as it is altering your data. I would strongly recommend making a copy to test on. If you forget to select a specific stack of features and run the code, the code will run on all of the points in your feature class, and all 13K points (including good mine locations) will be rearranged into a nice line (and the code might fail when the values get too large).

It does show how you can manipulate point geometries with Python.

 

0 Kudos
Scott_Harris
Esri Regular Contributor

If I had this task, I'd probably use the Selection Chip to select a single point from the stack. 

  1. Activate the Select tool (the one embedded in the Move tool if you want to move a point immediately)
  2. Single click on the stack of points. The Selection Chip appears on the map near the points.
  3. Click the dropdown to reveal the list of stacked points. The label for each point will come from the Display Expression so change that to something that is unique about the points so you know which one to pick.
  4. Once you pick one from the list. Move it.
  5. Repeat.

Scott_Harris_0-1704385686555.png

Your idea of dispersing them is good too, but this might be another option to look into.

 

0 Kudos