[pgrouting-users] How to merge GPS traces which are close to each other

Stephen Woodbridge woodbri at swoodbridge.com
Wed Apr 2 10:05:48 PDT 2014

On 4/2/2014 12:16 PM, Raghavan Krishnasamylakshmanaperumal wrote:
> Hello Everyone,
> I have raw GPS points collected from runkeeper(runner/biker) traces.
>  From these points I am creating linestrings and on linestrings I am
> applying pgr_nodeNetwork to create the network edge table and then
>   using pgr_createTopology to build the topology with source and target
> information.
> How can I merge the gps traces which are close to each other, for
> example look at the picture which I have attached in which there are 3
> GPS traces(red,green,blue) which are close to each  and while forming
> the network graph I want these traces to be considered as a single
> trace(as shown in black color). It will be better to get the average of
> those 3 GPS traces to form a single GPS trace by this way I may get rid
> of the noise on the GPS traces obtained from runkeeper.
> Is there a function in pgRouting to make this possible?

No pgRouting does not have a function for this. While it would be 
useful, I think it falls more under PostGIS because this is a geometry 

I will also note that the problem is not well defined. Consider the case 
where you have an exit ramp the parallels the highway for some time 
before connecting to a cross road or veering away from the highway. In 
this case how does one determine where to make the intersection of the 
ramp and highway?

Ask the PostGIS list for some ideas. You might also ask GRASS GIS list 
they might have some tools for this.


More information about the Pgrouting-users mailing list