Friday 31 August 2018

arcgis desktop - Get max value from multiple points surrounding buildings


I have a series of building represented as polygons. Surrounding these buildings I have multiple points with heights associated with them. What I am trying to do is identify all the points that are within 2 meters of each building and assign the maximum value from those points to the building polygon. The image below show what I am trying to achieve. I think I should be using spatial join, but not sure how to get the maximum values from a group of points.



enter image description here



Answer



This can be accomplished directly with the Spatial Join, though note you need to use the actual GP tool, not just right-click layer and choose joins.


Your parameters will be: target Features buildings, join features points, join operation one_to_one, set field mapping (see below), match_option within a distance of, search radius 2m


Field mapping is the key option. In that box you'll see a list of the fields that will be present in the output. One should be your value field from the points. Right-click it, choose Merge Rule, and select Maximum.


enter image description here


Because you are doing a spatial join, have chosen the one_to_one option (which means there can be only one match in the results), yet there are multiple points that will match each polygon, the Field Map lets you specify how this will be handled. It will look at all of the matching points (per the match option) and the output field will hold whatever modification of value you choose - it could sum them all, take the min/max, give you a count, etc.


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