Select to view content in your preferred language

Spatial Join

661
4
02-25-2020 02:55 PM
DavidPike
MVP Frequent Contributor

I'm attempting to do a spatial join of polylines in desktop 10.4.1. 

The join is against itself to create a join count field for features within the same feature class. I.e. the target is itself. I just want each polygon segment to have a join count I dont really care if theres overlapping segments.

The problem is that I seem to be losing records even though I have 'keep all' specified and this is also the default.

Thanks for your time.

0 Kudos
4 Replies
BlakeTerhune
MVP Regular Contributor

Could you post a sample (or representation) of your data? Also, if all you want is a count of distinct values in a field, have you considered using the Frequency tool?

0 Kudos
DavidPike
MVP Frequent Contributor

Hi Blake thanks for your reply, unfortunately the dataset is at work.

I'm trying to count the number of exactly overlapping polyline geometries (road segments that have been crossed multiple times in a network analyst route) for some reason I get the correct join count appended but with missing rows. Keep all is enabled and an outer join.

I've got around this with a search cursor and geometry token but it seemed strange behaviour.

0 Kudos
BlakeTerhune
MVP Regular Contributor

Have you tried making a copy of the feature class to use in the spatial join instead of using the same input feature class twice?

0 Kudos
DavidPike
MVP Frequent Contributor

That is actually an obvious and very good idea I haven't tried. I'll see if it works tomorrow!

0 Kudos