2

I have a roadway network as a line feature and crashes as point features.

I need to count the number of points that lie between two intersections of roadways. The biggest problem is the road is also segmented and is not continuous throughout.

Please look at the below image:

Image 1 shows that I have to count points b/w two intersections. enter image description here

Image 2 shows roadway segments

enter image description here

  • What license level do you have? – Emil Brundage Dec 12 '19 at 20:12
  • @EmilBrundage I have advance license – Parag Gupta Dec 12 '19 at 20:22
  • Do line features always have end vertices at intersections? – Emil Brundage Dec 12 '19 at 22:17
  • @EmilBrundage Yes, Sir. – Parag Gupta Dec 12 '19 at 22:28
3

Your main goal is to create a single feature between intersections. Here's how to create single feature road features:

Perform an intersect on your road segments with output type set to POINT.

enter image description here

enter image description here

Add XY fields to your intersect points.

enter image description here

enter image description here

Dissolve points by POINT_X and POINT_Y fields. Use OBJECTID as a stats field, with stats type COUNT.

enter image description here

Select your stats field COUNT_OBJECTID < 3 to select non-intersection vertices. Start and editing session and delete these points, or use the Delete Features tool.

enter image description here

Dissolve your road segments into a single feature.

enter image description here

enter image description here

Split Lines at Points. You'll have single segments between intersections.

enter image description here

enter image description here

Now you just need to use a Spatial Join with your input feature class being your new lines and your join feature class being your crash points. You'll get a Join_Count field added which shows how many crashes were joined to each segment.

  • Thank you so much for giving a detailed methodology here. Building on this, I have two questions: 1) can I maintain the link ids of segments that were formed into one link. So if there were 4 segments that were converted to one, would it also have link ids of the four links that were contained into one? – Parag Gupta Dec 13 '19 at 14:30
  • 2) Each road segment has a traffic volume number. Can I calculate the mean of the volume and then populate the final link(converted into one final line) with the mean number? Thank you again for uploading a detailed methodology. – Parag Gupta Dec 13 '19 at 14:34
  • @ParagGupta These sound like different inquiries and should be asked as new questions. – Emil Brundage Dec 13 '19 at 16:50
  • Thank you so much for your help. Appreciate it. – Parag Gupta Dec 13 '19 at 19:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.