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

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?

Thanks and Regards,
Raghavan KL

gps_traces.png

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 problem.

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.

-Steve

The openstreetmap community has also done some good practical work in this domain.

Best,
Steve

On Apr 2, 2014 1:09 PM, “Stephen Woodbridge” <woodbri@swoodbridge.com> wrote:

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 problem.

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.

-Steve


Pgrouting-users mailing list
Pgrouting-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-users

Thanks for the response. Sure I will check if openstreetmap or GRASS GIS and keep posted if I can solve this issue.

Thanks,
Raghavan

···

On Wed, Apr 2, 2014 at 2:39 PM, Stephen Mather <stephen@smathermather.com> wrote:

The openstreetmap community has also done some good practical work in this domain.

Best,
Steve

On Apr 2, 2014 1:09 PM, “Stephen Woodbridge” <woodbri@swoodbridge.com> wrote:

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 problem.

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.

-Steve


Pgrouting-users mailing list
Pgrouting-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-users


Pgrouting-users mailing list
Pgrouting-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-users


Thanks and Regards,
Raghavan KL