1

Red lines-street layer, blue lines- GPS lines of vehicles I have street line layer for a city. I also have a lines travelled by the vehicle, which was created from the GPS points collected in the study (OBVIOUSLY, the path of vehicles are not accurate, so they dont fall exactly in the road line). I want to know the number of times the road is traversed, or, i want to know the number of trips for any segment of road.

I am using Arc GIS. I do not have knowledge of python, but could learn and edit if there is code available for similar tasks.

For example, if one road segment between two blocks is used twice, then i want one column on attribute table of the road segment to have a value of 2.

  • Sorry this question is much too broad. If you hope to get any response you will need to get more specific about what you want. – Brad Nesom May 6 '15 at 21:11
  • Basically this is a duplicate of gis.stackexchange.com/questions/102639 You would first need to Snap a copy(!) of your GPS lines to your street lines though. – Chris W May 6 '15 at 21:29
  • Is it possible to snap the GPS lines to the street lines? I tried using SNAP function, but there is a error. – Droko May 6 '15 at 21:51
  • 1
    If there is an error then that precise error message would be useful to add into your question. – PolyGeo May 6 '15 at 22:04
  • In looking at the screenshot you've added, those GPS lines look to be fairly detailed (lots of vertices). You may first want to Generalize them before running Snap. I can't really address any problem with Snap unless I know what the specific error/result is. I should have mentioned it does require a Standard or Advanced license, so it won't work if you just have Basic. – Chris W May 6 '15 at 22:47
1

I'll assume your street line layer is already divided up into individual line segments. As I originally mentioned in a comment, those GPS tracks appear to be rather detailed and it might be worth Generalizing them as a first step. This should reduce processing times significantly, but you need to strike a balance between extraneous vertices and being able to preserve curves and such in your path.

The simplest solution is to Spatial Join your GPS track (join_features) to your line segments (target_features) using a one-to-many join operation and a within_a_distance match option using an appropriate distance. This should give you a new feature class that resembles your street lines but each segment will be duplicated once for every GPS track.

But because of the misalignment this method will produce false matches everywhere that an unused segment is within that distance - for example intersections you'll get both the streets that the GPS track follows as well as the other streets that meet at that intersection. (I think - not sure if within_a_distance looks at the entire feature, or if it will catch it if only a part of the feature is, but I suspect the latter). As a result you may need to do some cleanup of this resulting feature class to delete these extra segments. This could potentially be done by buffering a GPS track to a similar distance as used in the join, then using select by location to grab only line segments that are completely_within the buffer (or invert and delete the ones that aren't).

Once you have the proper street lines along the tracks, which have all been duplicated by the join, you can use the Summary Statistics tool with street line original segment ID as a CASE field, as I described at Counting traversed arcs on routes to write attributes using ArcGIS for Desktop?. The resulting table should have one row for each segment with a count of the number of duplicates, which is the number of tracks that traversed that segment.

If you need the GPS tracks to match up to the street lines exactly, I'll create another answer (or you could ask another question specifically on that) with details on Snap and using Intersect instead of a Spatial Join. That would eliminate the problems with crossing streets, but might be more work than the above method. Both end the same way - creating duplicate street line segments, once for each track that travels it, and then using Summary Statistics to get the traverse count.

  • This was very helpful. And I got what I was looking for, i.e. volume map for the entire area. However, the road network did not have some of the segments, which can be solved by looking for other street layer file. Thank you. – Droko May 8 '15 at 20:35
  • Another question. Can I join these GPS lines to the adjacent street layers after initial cleaning up of the data, so that these GPS lines will get the attribute of the street layers ? I am aware that this falls under the map matching problem, and there is some algorithms associated with it. And if the algorithm is availables, as mentioned in this question: gis.stackexchange.com/questions/19683/…, or any GIS techniques available ? – Droko May 8 '15 at 20:40
  • That would best be asked as a new question, but the short answer is a qualified yes. The GPS lines are one long line while street lines are a bunch of segments. If you break up the GPS lines into the same segments, you can transfer the attributes (that's what the spatial join does). And you can further refine those GPS lines to exactly match the street line geometry if you want to give up that positioning/speed granularity of detail. But you can't really give one long line the same attributes as all the little segments. Filtering sample noise and integrating data are two separate processes. – Chris W May 8 '15 at 21:14
0

You are using segments, so your road network must be divided into segments. If your network dataset is like many, it consists of many segments, with breakpoints where there are no intersections. You'll need to Dissolve your network, then Intersect it (with itself). That will create a points layer you can use to cut your networks into the segments you want.

Once you've done that, you could use ModelBuilder with an Iterator (by segment) to Buffer and Clip a Layer(must be a layer!) of your network. Presuming each of your paths (in blue) have a unique ID), you can then use Summary Statistics on each of the clips to summarize the number of trips along each segment. You can then Merge all the Summary Statistic into one table, and Join that back to your network, to symbolize and analyze.

There are doubtless more elegant ways to accomplish this, but this can be done without knowledge of Python, or tools outside the most basic ArcGIS license.

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.