Is Spatial Join the correct tool here?

153
4
04-09-2018 11:44 AM
YuriAndrade
New Contributor

Hello community,

I have a feature layer (via_GNSS) that contains a bunch of points collected with a GPS:

Also, I have another layer (split_original) with many polylines connecting all of those points, creating a "path":

Here is the data view with these two layers activated:

 Like you can see, each polyline has two points that are associated with it. How can I "transfer" the attribute fields of each pair of points to its associated polyline? With Spatial Join, I could only manage to get two rows for each polyline, each one containing the attributes of one of the points. I would like to have ONE row for each polyline, but in that row I want information of both points. Is it possible through the Spatial Join tool? If it's not, how can I do that? Thanks everyone. 

Tags (1)
0 Kudos
4 Replies
DanPatterson_Retired
MVP Esteemed Contributor

Spatial join

http://pro.arcgis.com/en/pro-app/tool-reference/analysis/spatial-join.htm

perhaps you could try to join the polylines to the points, then save as a layer file (see the join options one-to-many) to get the polyline attributes into the point file.  If that is successful, then an attribute 'relate' will get the attributes associated with the original polyline file. 

There is only one-to-one or one-to-many for spatial joins, you want 'many-to-one' which isn't supported, so you will have to try the workaround or decide what information is critical.  

Alternately, you could reconfigure your table so produce segmented polylines from your input point sequence which would require a bit of coding

YuriAndrade
New Contributor

Thank you for the quick reply Dan.

The reason why I want that "many-to-one" tool, is because I want to create a new field and use the "field calculator" to operate data from both points. Is there any way to use field calculator to operate data from two different rows (without coding)? That would also solve my problem. Thank you.

0 Kudos
RobertBorchert
Frequent Contributor II

If the FIDS from one represented the other you could do a table join.  However, if it is as small as 235 you have shown it may be simpler and quicker to simply go through one at a time and copy and paste the attributes. if that is what you want to end up with.

Spatial join may end up with errors especially where the slope changes quite a bit.

0 Kudos
JohnSobetzer
Regular Contributor III