Top Banner
1 Open Web Processing Services for Improving Accuracy of GPS tracks by Filtering and Map-Matching Xianfeng Song @ GUCAS, Venkatesh Raghavan @ OCU Daisuke Yoshida @ OCU 2009.10.21
32

1 Open Web Processing Services for Improving Accuracy of GPS tracks by Filtering and Map-Matching Xianfeng Song @ GUCAS, Venkatesh Raghavan @ OCU Daisuke.

Dec 16, 2015

Download

Documents

Shamar Sneary
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 1 Open Web Processing Services for Improving Accuracy of GPS tracks by Filtering and Map-Matching Xianfeng Song @ GUCAS, Venkatesh Raghavan @ OCU Daisuke.

1

Open Web Processing Services for Improving Accuracy of GPS tracks by

Filtering and Map-Matching

Xianfeng Song @ GUCAS, Venkatesh Raghavan @ OCU

Daisuke Yoshida @ OCU

2009.10.21

Page 2: 1 Open Web Processing Services for Improving Accuracy of GPS tracks by Filtering and Map-Matching Xianfeng Song @ GUCAS, Venkatesh Raghavan @ OCU Daisuke.

2

1 Introduction

Background

Inexpensive Collection of Position Information– Compact lightweight GPS receivers

– Cell phones and personal digital assistants

Open Data for Road Network– Google Maps, Open Street Map

– Local (OSAKA WMS MAP)

Application of GPS Position Data– Navigation, POI collection / registration

– Road Network Updating, … …

Page 3: 1 Open Web Processing Services for Improving Accuracy of GPS tracks by Filtering and Map-Matching Xianfeng Song @ GUCAS, Venkatesh Raghavan @ OCU Daisuke.

3

Key Questions for normal users ?

GPS Position Point Accuracy– GPS Receivers

– Geometrical Effects of Geo-environment (urban canyons)

Free Services for Data Improvement– Online services available

(more displaying, less processing)

– Free tools not enough, post-processing or assisted GPS is needed (processing tools + road network dataset)

Page 4: 1 Open Web Processing Services for Improving Accuracy of GPS tracks by Filtering and Map-Matching Xianfeng Song @ GUCAS, Venkatesh Raghavan @ OCU Daisuke.

4

Objective

Developing open geo-processing services to

support co-registering the vehicle GPS traces with

road network, based on open GIS standards and

open source geospatial software.

Page 5: 1 Open Web Processing Services for Improving Accuracy of GPS tracks by Filtering and Map-Matching Xianfeng Song @ GUCAS, Venkatesh Raghavan @ OCU Daisuke.

5

2 Methods

2.1 GPS Track Data Processing Workflow

FILTERING

MATCHINGOUTPUT

INPUT

Geographic Links between traces and road paths

Algorithm based on Hausdorff DistanceAlgorithm based on Frechet Distance, introducing road connectivity

Line Generalization

Douglas-Peucker algorithm with different distance measures

Primary Filters

PDOP,Fix Type,Satellite Number, ...

Advanced Filters

Velocity, Heading,Annular Velocity, ...

Vehicle GPS Track Logging Data

Page 6: 1 Open Web Processing Services for Improving Accuracy of GPS tracks by Filtering and Map-Matching Xianfeng Song @ GUCAS, Venkatesh Raghavan @ OCU Daisuke.

6

2.2 Position Points Filtering

1) Fixmode

×not Fixed

√ 2D

√ 3D

2) HDOP (iBlue747)

CEP = 3, (95%)

2DRMS = 1.2 * HDOP * CEP

???

Page 7: 1 Open Web Processing Services for Improving Accuracy of GPS tracks by Filtering and Map-Matching Xianfeng Song @ GUCAS, Venkatesh Raghavan @ OCU Daisuke.

7

http://en.wikipedia.org/wiki/Circular_error_probable

Conversion between CEP, RMS, 2DRMS, and R95While 50% is a very common definition for CEP, the circle dimension can be defined for percentages. Approximate formulas are available to convert the distributions along the two axes into the equivalent circle radius for the specified percentage.

Accuracy MeasureProbability (%)

Root mean squared (RMS) 63 to 68

Circular error probability (CEP) 50

Twice the distance root mean square (2DRMS) 95 to 98

95% radius (R95) 95

From/to CEP RMS R95 2DRMS

CEP - 1.2 2.1 2.4

RMS 0.83 - 1.7 2.0

R95 0.48 0.59 - 1.2

2DRMS 0.42 0.5 0.83 -

Page 8: 1 Open Web Processing Services for Improving Accuracy of GPS tracks by Filtering and Map-Matching Xianfeng Song @ GUCAS, Venkatesh Raghavan @ OCU Daisuke.

8

3) Velocity

1

3

4

5

6

7

8

2

1

3 5

6

7

8

2

1max

1

, 60 /i i

i i

p pv v km ht t

Page 9: 1 Open Web Processing Services for Improving Accuracy of GPS tracks by Filtering and Map-Matching Xianfeng Song @ GUCAS, Venkatesh Raghavan @ OCU Daisuke.

9

2.3 Trajectory Simplification by Douglas-Peuker Mehtod

Page 10: 1 Open Web Processing Services for Improving Accuracy of GPS tracks by Filtering and Map-Matching Xianfeng Song @ GUCAS, Venkatesh Raghavan @ OCU Daisuke.

10

Page 11: 1 Open Web Processing Services for Improving Accuracy of GPS tracks by Filtering and Map-Matching Xianfeng Song @ GUCAS, Venkatesh Raghavan @ OCU Daisuke.

11

2.4 Road Matching

1) Hausdorff Distance

Given two curves A = {a1, a2, …, am} and B = {b1, b2, …, bn}, the length-weighed Hausdorff distance from A to B, H(A,B), is approximately calculated as follows.

Where, di is the shortest distance from the ith vertex ai to the curve B, u(ai,ai+1) is the length of segment (ai,ai+1), R is the total length of the curve A.

1H( , ) = ( ) / 2, 1, 2, ...,i i iA B r d d i m-1

( , ), 1, 2, ..., mi id d a B i

11

( , ), ( , ), 1, 2, ..., m -1i i

i i i

u a ar R u a a i

R

Page 12: 1 Open Web Processing Services for Improving Accuracy of GPS tracks by Filtering and Map-Matching Xianfeng Song @ GUCAS, Venkatesh Raghavan @ OCU Daisuke.

12

Page 13: 1 Open Web Processing Services for Improving Accuracy of GPS tracks by Filtering and Map-Matching Xianfeng Song @ GUCAS, Venkatesh Raghavan @ OCU Daisuke.

13

2) Frechet Distance

Given two curves P = P(n), 0 ≤ n ≤ N and Q = Q (m) with 0 ≤ m ≤ M. P(n) refers to a given position on the curve, with P(0) referring to the first vertex of the curve and P(N) referring to its last vertex. The sequential position of a vertex on a curve can be expressed as a function of time t with 0 ≤ t ≤ 1 by using two continuous and increasing function α(t) and β(t), where α(0) = 0, α(1) = N, β(0) = 0 and β(1) = M, therefore a position on the curve as a function of time is given by P(α(t)) and Q(β(t)).

A matching between P and Q is simply a pair of monotone reparametrizations (α, β) of P and Q respectively, where the point P(α(t)) is matched to the point Q(β(t)). Mathematically, the Frechet distance between two curves is defined as (Thomas Eiter and Heikki Mannila, 1994)

Page 14: 1 Open Web Processing Services for Improving Accuracy of GPS tracks by Filtering and Map-Matching Xianfeng Song @ GUCAS, Venkatesh Raghavan @ OCU Daisuke.

14

Where d(P(α(t)), Q(β(t))) is the Euclidian distance between two

points P(α(t)) and Q(β(t)). For every possible function α(t) and β(t)

at time t, there is the largest distance, and the Frechet distance

should be the minimal one found among these maximum

distances.

[0,1] [0,N] [0,1][0,1] [0,M]

( , ) min {max ( ( ( )), ( ( )))}F tP Q d P t Q t

Page 15: 1 Open Web Processing Services for Improving Accuracy of GPS tracks by Filtering and Map-Matching Xianfeng Song @ GUCAS, Venkatesh Raghavan @ OCU Daisuke.

15

ε

α

vj

vi

sij

sij

0

0

1 2 p - 1α

p

1FDj

FDi

G

n

o

m

l

i

j

k

Ln

Ll

Li

Lk

Lj

Rj

Rk

Ri

Rm

Rl

Ro

Rn

FDj

FDk

FDi

FDl

FDl,n

FDi,l

FDk,i

FDj,i

(a) Frechet free space diagram

(b) Frechet free space surface (Source: Alt 2004)

Page 16: 1 Open Web Processing Services for Improving Accuracy of GPS tracks by Filtering and Map-Matching Xianfeng Song @ GUCAS, Venkatesh Raghavan @ OCU Daisuke.

16

Page 17: 1 Open Web Processing Services for Improving Accuracy of GPS tracks by Filtering and Map-Matching Xianfeng Song @ GUCAS, Venkatesh Raghavan @ OCU Daisuke.

17

3 Implementation

3.1 System

Framework

OpenLayersApachePyWPS

ApacheCGI-BIN

AddingDeletingListing

Trajectory Management

filteringmatchingwkt formatting

Co-registry Process

traj. catalogue

position points

road network

PostgreSQL

Google MapAPI

MapserverWMS

DATABASEWEB SERVERBROWSER

Page 18: 1 Open Web Processing Services for Improving Accuracy of GPS tracks by Filtering and Map-Matching Xianfeng Song @ GUCAS, Venkatesh Raghavan @ OCU Daisuke.

18

3.2 Database Management

Trajectory Catalogue:

Field | Type | Description--------+-----------+------------------------- tid | integer | Trajectory ID t0 | timestamp | the time of first point t1 | timestamp | the time of last point gps | text | GPS type

1) Database Structure

Page 19: 1 Open Web Processing Services for Improving Accuracy of GPS tracks by Filtering and Map-Matching Xianfeng Song @ GUCAS, Venkatesh Raghavan @ OCU Daisuke.

19

GPS Position Points Database :

Field | Type | Description-----------+-----------+---------------------------------- time | timestamp | position time lat | double | latitude lon | double | longitude fixmode | integer | the mode of positioning pdop | double | position dilution of precision hdop | double | horizontal dilution of precision … … | … … | … … -----------+-----------+---------------------------------- tid | integer | which trajectory the point belongs to filter | integer | by which filter the point was removed

Page 20: 1 Open Web Processing Services for Improving Accuracy of GPS tracks by Filtering and Map-Matching Xianfeng Song @ GUCAS, Venkatesh Raghavan @ OCU Daisuke.

20

OSAKA Road Network : Field | Type | Description------------+----------+---------------------- gid | integer | road id name | text | road name kokubango | bigint | encoding … … | … … | … … ------------+----------+---------------------- source | bigint | road from-node id target | bigint | road to-node id length | numeric | road length reverse_co | numeric | to_cost | numeric |------------+----------+---------------------- the_geom | geometry | road linearstring geometry

Page 21: 1 Open Web Processing Services for Improving Accuracy of GPS tracks by Filtering and Map-Matching Xianfeng Song @ GUCAS, Venkatesh Raghavan @ OCU Daisuke.

21

2) Database Program

Adding

uploading gps track data into position point

database, meanwhile adding one new trajectory

into Trajectory Catalogue

Deleting

removing the trajectory from catalogue,

meanwhile deleting its associate position points

Listing

listing the available trajectories in the

catalogue

Page 22: 1 Open Web Processing Services for Improving Accuracy of GPS tracks by Filtering and Map-Matching Xianfeng Song @ GUCAS, Venkatesh Raghavan @ OCU Daisuke.

22

3.3 PyWPS Processes - gpsnx_process

Pgdb - operating postgresql/postgis

Shapely - buffer generation

output by wkt format

networkx - graph based topology analysis

Matplotlib - plot figure

Python (source code about 1400 lines)

Page 23: 1 Open Web Processing Services for Improving Accuracy of GPS tracks by Filtering and Map-Matching Xianfeng Song @ GUCAS, Venkatesh Raghavan @ OCU Daisuke.

23

http://wgrass.media.osaka-cu.ac.jp/cgi-bin/wps3.py?

service=wps&Version=1.0.0&Request=Execute&

Identifier=gpsnx_process&

DataInputs=track=9;

fixmode=2;hdop=2;

velocity=60.0;

dp=5.0;

mt=hd;

rawpnt=1;dptrj=1;mtrds=1

Page 24: 1 Open Web Processing Services for Improving Accuracy of GPS tracks by Filtering and Map-Matching Xianfeng Song @ GUCAS, Venkatesh Raghavan @ OCU Daisuke.

24

Page 25: 1 Open Web Processing Services for Improving Accuracy of GPS tracks by Filtering and Map-Matching Xianfeng Song @ GUCAS, Venkatesh Raghavan @ OCU Daisuke.

25

3.4 Demo

Page 26: 1 Open Web Processing Services for Improving Accuracy of GPS tracks by Filtering and Map-Matching Xianfeng Song @ GUCAS, Venkatesh Raghavan @ OCU Daisuke.

26

Page 27: 1 Open Web Processing Services for Improving Accuracy of GPS tracks by Filtering and Map-Matching Xianfeng Song @ GUCAS, Venkatesh Raghavan @ OCU Daisuke.

27

Page 28: 1 Open Web Processing Services for Improving Accuracy of GPS tracks by Filtering and Map-Matching Xianfeng Song @ GUCAS, Venkatesh Raghavan @ OCU Daisuke.

28

Page 29: 1 Open Web Processing Services for Improving Accuracy of GPS tracks by Filtering and Map-Matching Xianfeng Song @ GUCAS, Venkatesh Raghavan @ OCU Daisuke.

29

Page 30: 1 Open Web Processing Services for Improving Accuracy of GPS tracks by Filtering and Map-Matching Xianfeng Song @ GUCAS, Venkatesh Raghavan @ OCU Daisuke.

30

4 Summary

• Geoprocessing services for accuracy enhancement and map matching

of GPS traces were implemented using the OSGeo stack.

• Map matching algorithms for vehicle tracking data are implemented

using the PyWPS.

• Track-logs stored in the PostgreSQL/PostGIS enable handling of large

volume data of road network.

• Openlayers client is used to visualize the processing results.

• Potential uses for better road navigation, map making and development

of POI-DB using low-cost GPS devices.

• Plans to integrate algorithm in the ZOO-OWS Platform to provide ZOO-

LBS support.

Page 31: 1 Open Web Processing Services for Improving Accuracy of GPS tracks by Filtering and Map-Matching Xianfeng Song @ GUCAS, Venkatesh Raghavan @ OCU Daisuke.

31

As a part of the core processes of map matching in PyWPS, specific

filters of GPS tracks, related to vehicle motion characteristics, are

first applied to produce high quality vehicle trajectories. Secondly,

advanced curve-to-curve distance measurement algorithms –

Hausdorff distance and Frechet distance are implemented in Python

to perform map matching of road network. The system has been

tested under dense urban road network conditions in Osaka City in

Japan. The results of the experiments suggest that the Web

Services are effective for retrieval of the paths from urban street

network and accurate matching of tracking data form low-cost GPS

tracking devices. The services implemented as a part of this

research will be not only useful for vehicle tracking but also for

automated update of road network and in improving quality of

community driven geo-data collection initiatives such as the Open

Street Map.

Page 32: 1 Open Web Processing Services for Improving Accuracy of GPS tracks by Filtering and Map-Matching Xianfeng Song @ GUCAS, Venkatesh Raghavan @ OCU Daisuke.

32