Wednesday, 5 August 2015

arcgis desktop - Reducing number of point features considering minimal distance and spatial distribution



I have a certain number of generated node features using FME 2016. They are coming as output of one FME workbench and actually representing characteristic points of underground cables. Total number of these points is several hundreds of thousands and, as you can imagine, they are unevenly distributed accross the area of the city.


My task is to reduce the number of points in the way that there are no two points on the distance less than 50 m. Points should be treated equally and they do not have assigned weights. Point features after reduction should be loaded into ESRI geodatabase.



What I can do is to take each of these points at the time and to remove all others in the circle of 50 meters. In that case my only requirement, that there are no two points on the distance less than 50 meters, will be fulfilled, but distribution of the points is in some areas very poor.


What I am thinking of, is there has to be some kind of comprehensive solution which will not analyze each point individually but complete set of features and result is best possible distribution of the points in complete area.


Don’t hesitate to advise me any kind of ESRI tool or even mathematical approach that you can think of, since as far as I see, we do not have built-in FME transformer which will do this job for me.


Current result Current result


Needed result Needed result



Answer



In FME, there are a few options you can use. But, if you want to group points within 50m here is one option:


Use a NeighborhoodAggregator transformer. This will group points within your tolerance. Connect that to a VertexCreator which will replace the aggregate with a single point.


I tried this out with 10,000 random points within a square 5km x 5km.


enter image description here



After running the workbench, it looks like this (grey is original 10,000 points and black is aggregate points):


enter image description here


Zooming in, you can see it has gathered points together (grey is original points, black is new points).


enter image description here


Note, the points are not the original points, but centroids of the aggregates.




Another method you may want to try is using a Snapper transformer. You can set a snapping tolerance which will snap points within your 50m tolerance. However, any points outside that tolerance won't be touched.


Here, red points are snapped, green points are untouched, and grey are original points. You can see that the grey points moved to where the red points are. Green points are spaced apart enough that they are not affected by the transformer.


enter image description here


Note, after you run this method, you'll have to process the snapped points to remove duplicates.



No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...