Friday, 1 April 2016

python - Performing a 'far analysis' using ArcGIS for Desktop?


I would like to perform an analysis that is the inverse of Near_analysis for ArcGIS. Instead of my result being NEAR_DIST and NEAR_FID, I'd like each feature to have a FAR_DIST and FAR_FID populated with the furthest feature information from a 'far feature'. I can do this with some scripting, but it would be slow, and involve iterating through each feature in a feature class and performing a Near_analysis on each, and picking the furthest distance.


Any other ideas? I'm ArcGIS 10.1 and proficient in python/arcpy.



Answer




If you have access to an ArcInfo license, you could use the Point Distance tool, which:



Determines the distances from input point features to all points in the near features.... The tool creates a table with distances between two sets of points. if the default search radius is used, distances from all input points to all near points are calculated. The output table can be quite large. For example, if both input and near features have 1,000 points each, then the output table can contain one million records.



Run this with no search radius, then filter to find the pairs with the greatest distance.


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...