Print

Print


https://esriaustraliatechblog.wordpress.com/2015/06/22/spatial-joins-hidden-trick-or-how-to-transfer-attribute-values-in-a-one-to-many-relationship/

 

Well hot dang I went looking for guidance on something completely different and found this little gem of an article that explains how it’s possible to transfer multiple  attributes with your delimiter of choice using a spatial join.  This would have been really helpful when checking our zoning vs assessed zoning, properties and structures in multiple flood zones and any other sort of overlay analysis.

(If anyone has any insight, I originally went looking for instructions on how to transfer existing attributes to domain attributes)

 

And if the link doesn’t work for you, I’ve copied the text below:

 

Spatial Join’s hidden trick or how to transfer attribute values in a One to Many relationship

 

From time to time, even the experienced GIS users (my 17 years in GIS allow me to call myself one) come across hidden tools and workflows that have existed in ArcGIS for Desktop for ages, but have never been used.

Recently, a couple of my clients asked me how to solve the following problem. Imagine you had a polygon feature class representing cadastral boundaries (i.e. properties) and another one representing zones (i.e. zoning). One property can fall within several adjacent zoning polygons, which effectively defines the cardinality (or the type of the relationships between features in both datasets) as One to Many (Properties to Zones).

The following simplified graphic illustrates the case (very schematically, I must add):

[log in to unmask]" alt="SpJoin_01">

What if you were provided with the task to transfer the attribute of the “Zone code” to the attribute table of the property boundaries?

Well, obviously some of the properties intersect two zones and in the real-world example they can intersect even more zones.

If you use the Spatial Join tool with the following parameters (even if you try to use both types of relationships available in the tool)

[log in to unmask]" alt="SpJoin_02">

You will end up with having multiple overlapping polygons:

[log in to unmask]" alt="SpJoin_03">

Overlay tools won’t be of help either. If you use Union, you will end up with even more polygons and you’ll get stuck trying to aggregate the resulting polygons using Dissolve (which won’t work because Zone is a text field and you can’t really use a text field in statistical calculations).

You can try Python and that’s what I was about to do; however, it turned out that the Spatial Join tool which I had been using for many years contains a hidden function. That function allows to list the attribute values from a particular field (of the feature class that you’re joining to the target layer) and enter them into a designated field using a user-defined delimiter.

So, this is how this works:

[log in to unmask]" alt="SpJoin_04">

 

[log in to unmask]" alt="SpJoin_05">

The resulting dataset should display zones that each of the property boundary polygons intersect, stored as text values separated by the delimiter of your choice.

[log in to unmask]" alt="SpJoin_06">

Little things like this can save you a lot of time that you could otherwise spend on writing python scripts or changing the attributes manually. I hope you will find this workflow useful.

This entry was posted in General and tagged ArcGIS Desktop, geoprocessing on June 22, 2015 by Ivan E..

About Ivan E.

Russia-born geographer with a degree in Cartography and GIS with a 18-year Esri-related experience. Had been working for Esri Russia (CIS) then moved to Australia to join Esri Australia as support trainer in the Professional services dept. Area of expertise: ArcGIS Desktop software, 3D modelling (CityEngine), cartography, remote sensing

 

 

 

Meg McGaffin

GIS Analyst

City of Milford, CT

203-783-3232

[log in to unmask]

CT GIS User Network

 

------------------------------------------------------------------------- This list (CTGIS-L) is an unmoderated discussion list for all CT GIS Users.

If you no longer wish to receive e-mail from this list, you can remove yourself by going to http://listserv.uconn.edu/ctgis-l.html