Count point that have matching attribute

504
3
07-15-2020 04:10 PM
KennyYue
New Contributor

I'm working with an asset with data that consist of polylines and points. There are a lot of points that are created after work orders from field workers. These point have the same Uid as the specific Line segment. Relationship between line and point are One-to-Many. They are not necessarily intersecting. I would to add a field to the polyline attribute table to show total count of these points are matching with the line Uid.Point and line illustration

Lines

object IdUid
1731000
2731001
3731002
4731003
5722000
6723000

Points

object IddateUid
16/4/2020731000
26/4/2020731002
36/12/2020731000
46/12/2020731003
56/12/2020722000
66/19/2020731000
76/19/2020731003
86/19/2020722000
96/27/2020731000
106/27/2020722000

Goal:

object IdUidcount
17310004
27310010
37310021
47310032
57220003
67230000
0 Kudos
3 Replies
DanPatterson
MVP Esteemed Contributor

Summarize Attributes—Help | Documentation 

are your UID data text (that look like numbers) or numbers?

Summary Statistics—Help | Documentation 

Counts for summaries.

Are you coding for this? or just looking for associated tools? since there are many other options that don't require an advanced license or limited output capabilities


... sort of retired...
KennyYue
New Contributor

Hi Dan, Thank you for your reply.

The UID data is in numeric. 

I'm looking for option out here. because the point features are actually from a feature service sourced from another platform. I checked your recommendation for using Summarize Attribute, it works well to generate a table and join back with the line feature using the UID.

Do you other suggestion in such situation?

0 Kudos
DanPatterson
MVP Esteemed Contributor

That workflow is fine.  If you were scripting you could exploit numpy to get the unique UID s and their counts and use

ExtendTable—Data Access module | Documentation 

to add the results back into the polyline featureclass as a permanent join. 


... sort of retired...