Create One to Many Relationship with Table and Parcel Polygon

189
7
Jump to solution
12-09-2022 05:45 AM
ABishop
Regular Contributor III

Hello Fellow GIS'ers,

Not sure if I am posting this in the right spot on the community site, but I have tried everything to make this work and to no avail.

I am in ArcGIS Pro 3.0.3 and I have a table and a polygon feature class in the same file geodatabase.  I want to join the table to the polygon feature class and create a one to many relationship.  Then, I would like to export the join or relationship to a new polygon or point feature class to be able to use the values as a label in my service.

Any ideas on how to accomplish this?  For context, below is a list of things I have tried thus far:

1. Join Field (this only joins to the first record of the one to many relationship from the table to the feature layer)

2. Add Join (this only gives me the option to keep all records in either the polygon or table, but not both and then there is no way to create a feature class for use in the label layer)

3. Add Relate (this is only a temporary relationship and there is no way to extract the data into a tangible feature class to use in label layer).

4. Create Relationship Class (this creates a relationship class but I didn't see a way to extract the relationship into a feature class to use in the label layer). 

Amanda Bishop, GISP
1 Solution

Accepted Solutions
ABishop
Regular Contributor III

Thank you @JoshKalov and @jcarlson 

I did go back to my first solution which was "Join Field", but added some extra steps to end up with a final result of a point feature class.

These are the steps I took:

1. Copied table for join to FGDB.

2. Copied polygon for join to FGDB.

3. Used "Feature to Point" to make the polygon feature class a point feature class then used "Add XY Coordinates" to add the X,Y fields to the point feature class.

3. Used "Join Field" to join the table to the point feature class (in that order to preserve the one to many relationship, doing the join the other way didn't preserve the one to many relationship, it simply joined the first record in the table).

4. Used "XY Table to Point" to create a feature class from the joined table w/ feature class (this gave me a point feature class to use in my service for labeling which preserved the one to many relationship).

 

Amanda

Amanda Bishop, GISP

View solution in original post

7 Replies
jcarlson
MVP Honored Contributor

I think you're on the right track with your first approaches. Consider a very simple example: 1 polygon and 2 associated rows.

jcarlson_0-1670595462427.png

If I use Join Field on these two tables, the output is close to what you want. It appears and behaves a bit strangely because of the multiple values in the standalone table, which you can see in the attribute table and the polygon labels.

jcarlson_1-1670595621417.png

On the one hand, the polygon layer only has a single objectid, and it is impossible to select one without selecting the other. But on the other hand, the table and labels show two distinct features. Pro will give you a little warning when you've got a layer that's in this state.

jcarlson_2-1670595696126.png

But the key here is that if you export the layer from this point, the output will be precisely what you are looking for.

jcarlson_3-1670595762547.png

I now have two distinct features in my output for each match in the initial join.

- Josh Carlson
Kendall County GIS
0 Kudos
ABishop
Regular Contributor III

Hello @jcarlson 

I appreciate the quick response.  In your join, are you using a table and a polygon?

Amanda Bishop, GISP
0 Kudos
jcarlson
MVP Honored Contributor

Yes. Polygon as the input table, standalone table as the "join table" when running the GP tool. But the order shouldn't matter in a case like this, I think.

- Josh Carlson
Kendall County GIS
0 Kudos
ABishop
Regular Contributor III

I did this and I am still getting the same result.  The Join Field with polygon to table is maintaining a one to one relationship, but preserves the feature class.  The Join Field with the table to polygon creates the one to many relationship, but does not preserve the feature class. ugh.

Amanda Bishop, GISP
0 Kudos
jcarlson
MVP Honored Contributor

Odd. Any chance you can upload copies of the layers, or is the info sensitive?

- Josh Carlson
Kendall County GIS
0 Kudos
JoshKalov
New Contributor III

Are you trying to join multiple table rows to a single polygon? Is your desired output having that polygon duplicated in your output feature class; one copy of the polygon for each table record it was joined to? If so, we have accomplished this using "Make Query Table". That will create the query table in memory but you can export it out as a feature class.

ABishop
Regular Contributor III

Thank you @JoshKalov and @jcarlson 

I did go back to my first solution which was "Join Field", but added some extra steps to end up with a final result of a point feature class.

These are the steps I took:

1. Copied table for join to FGDB.

2. Copied polygon for join to FGDB.

3. Used "Feature to Point" to make the polygon feature class a point feature class then used "Add XY Coordinates" to add the X,Y fields to the point feature class.

3. Used "Join Field" to join the table to the point feature class (in that order to preserve the one to many relationship, doing the join the other way didn't preserve the one to many relationship, it simply joined the first record in the table).

4. Used "XY Table to Point" to create a feature class from the joined table w/ feature class (this gave me a point feature class to use in my service for labeling which preserved the one to many relationship).

 

Amanda

Amanda Bishop, GISP