Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am working on a project which requires real time map matching. I am currently using ArcGIS but not sure whether it will work.

Here is what happens with my system: the cell phones sent GPS fixes every five seconds to my server and I need to do real time map matching to snap the point on to one of the links of the map and store the matched points.

ArcGIS has a 'near' tool for snapping the point to nearest link. But the input to to the tool has to be a shape file for the points. I am wondering how I can deal with the real time data I get in ArcGIS. Creating a shape file for each point?

Any other suggestion for accomplish this work?

share|improve this question

Create a point feature from your GPS location (presumably stored as a table format file) using Make XY Event and Copy Features and then use this with the Near tool - or try the Spatial Join tool with the 'closest' option. You will likely want to store these intermediate features in a temporary/scratch workspace that can be deleted after obtaining the final output (which you could Append to your database).

share|improve this answer
Hi, Thanks you for your help. I did exactly the way you said and it is solved now. However, there is a new problem. The computation takes seven to ten seconds to print the final results for a point. But what I can developing is a real time application which is better to be controlled within at most 2 to 3 seconds. Is the import of Arcpy the problem since this is a large module? Could you please tell me where the problem is and any way to improve the system? (The whole system is in Java, The python module I developed will be called from the main codes) – user14631 Feb 2 '13 at 6:10
So It seems that the arcpy is imported every time. Is this where the problem is? Thanks. – user14631 Feb 2 '13 at 6:16
You're welcome to the first comment. As for your second comment, I recommend that you post a new question (perhaps with reference to this original one) about how to improve your code, along with the example code so we can all assess it better. – ccn Feb 2 '13 at 21:29

If a point is 'near' really depends on many things not just on the closest road but also on previous points. You can have a look into the algorithm and tools that I would use.

share|improve this answer

You're likely to run into computational bottlenecks and consistency problems with any package that doesn't have a proper routing or at the minimum a road network abstraction. If you are using OSM data for the road network, check TrackMatching from my profile. Check this thread map-matching algorithms.

share|improve this answer

There's a real-time map matching solution (however it's in Java not ArcGIS) that implements Hidden Markov Model map matching, see here:

It's quite robust and map matches GPS tracks to OpenStreetMap data, also in real-time (referred to as online map matching). Currently, it only supports map matching of vehicles moving along the road network. Maybe you can adapt it to what you need (if the question still bothers you). There will be very soon a real-time map matching stand-alone server, for now it's only a Java API for real-time map matching.

enter link description here

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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