Join attributes from a table is not working

360
4
08-19-2021 07:05 AM
SongWang
New Contributor II

Hello everyone! I am having a problem that never occurred to me before and it has been a couple of days that I have not found a way to address this. 

I have a layer with vertices (XY coordinates included). I would like to join this layer with a CSV file with most of the vertices in the layer included by x-coordinate using "join attributes from a table". For example, by using the "join function", the records in the layer with an X-coordinate of 4266546.39997 should be merging with the records in the CSV file with an X-coordinate of 4266546.39997. In the past, I do not have this issue and the join process went smoothly. And I am pretty sure that there should not be vertices with exact same XY coordinates in the layer file. But recently, I have tried multiple times and still, no matches were found by joining the layer file with the CSV file.   

I would appreciate it if anyone can share your experience on this, which has been confusing me for days.

Thank you!

 

Tags (2)
0 Kudos
4 Replies
JoeBorgione
MVP Esteemed Contributor

Personally, I would convert the csv to an ArcGIS table and then try your join.  My guess is the csv has the x and or y coordinates as text instead of double or whatever your layer has them in.  See this similar post.

That should just about do it....
SongWang
New Contributor II

Thank you for the suggestion! I will try this.

Actually, I may have changed the XY coordinates to text in the CSV file. But when I upload the CSV file to ArcGIS, they are still double. So I might ignore this issue, too. I will check on this.

0 Kudos
DanPatterson
MVP Esteemed Contributor

Joining on a double field is going to be a problem unless you round/truncate to an exact number of decimal places.  A better safer way is to use text or integer fields for joining.  You would be advised to provide an index field to your csv to match the OBJECTID field of the gdb table you are trying to join to.


... sort of retired...
JoeBorgione
MVP Esteemed Contributor

Hadn't even thought about that!

That should just about do it....
0 Kudos