Saturday, 9 September 2017

arcgis desktop - Aggregating multiple layers while preserving values using ArcMap?


I am using ArcMap 10.5 to display the distribution of Revenues by Region, for each product I have defined.


Each product has a layer of its own consisting of a collection of polygons, and each polygon contains attribute fields for revenues over a period of 10 years (e.g. Revenues2005, Revenues2006, etc)


I am trying to create a kind of cumulative heatmap.


For example, let's take two polygons with the following fields, each in a separate layer, but that overlap exactly:


Layer1


Rev1 | Rev2 | Rev3


5000 | 6000 | 7000


And



Layer2


Rev1 | Rev2 | Rev3


1000 | 2000 | 2500


Would it be possible to combine the above layers, such that when the polygons overlap, I would obtain a new layer with a polygon of the following attributes:


Layer3


Rev1 | Rev2 | Rev3


6000 | 8000 | 9500


So far the (tedious) solution I found is to combine the fields pairwise and use a python script to add the revenues for each year one by one.



Answer



Turned out the issue was due to using the Join functionality available through the context menu.



For the above to work the fields in the different layers need to be of the same nomenclature, and joined using the "Field Join" method, which is a permanent join. The excel file itself should be exported to DBF before the join procedure to avoid errors.


Once this is the case, merge the layers to be aggregated together, then create a separate layer which will hold the aggregate values.


Use the spatial join tool, while setting the appropriate merge rules (sum, average, etc), on the newly created layer and the layer resulting from the merge.


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