summaryrefslogtreecommitdiff
path: root/test/poi-service/README
blob: 5a1b8e000094763c5eaf8a68d4cbb6a61871c912 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
Release date of the file: 25-01-2016 
Status: OK

Project:
Search engine for Point Of Interest with a content access module mechanism to extend to additional sources of data
This project is one of the navigation-service common projects that implements the GENIVI navigation APIs.

More:
The project is made of four parts:
- poi-supplier that populates a sqlite3 based database from OSM data in xml format (you need -DWITH_DATABASE_SUPPLIER=ON)
- poi-server that implements the poi search API and access an embedded database
- poi-contentaccess-module that implements a content access module that access an additional database, and a simple HMI 
- poi-client that implements a client with a test HMI 
See also other navigation projects like navigation or proof of concepts implemented for traffic-info and positioning 

What is in:
This folder contains scripts for building poi-supplier, poi-contentaccess-module and poi-client, generating the databases and launching the whole stuff (build poi-server if necessary)
FYI: poi-server is located under ../../src/poi-service

Author: 
Philippe Colliot philippe.colliot@mpsa.com

License: 
See headers and LICENSE file (mainly MPL V2)

Test target: 
Ubuntu 14.04 LTS 32bits
Ubuntu 15.10 64bits

Qt version:
Qt5 (to get the version -> qtchooser -print-env, to set the version -> export QT-SELECT=<version>)

To get the code:
Code is part of the navigation-service repository, so you need to clone all:
git clone http://git.projects.genivi.org/lbs/navigation-service.git $WORKING-DIR
 
Important notice before building the POC:
# The software is using stream conversion, so please care if your local settings are right
# There could be a potential runtime error due to a wrong sql request (problem with the use of ',' in place of '.')
# so, if you enter 
locale | grep 'LC_NUMERIC' 
# you must get
LC_NUMERIC="en_US.UTF-8"

==========================================
Current versions of additional code 
==========================================
<current version of positioning> (git): 32f9e5ce48f76c5c9833dda0e1743ab8b45dc574

==========================================
How to get additional code 
==========================================
Get positioning:
git clone http://git.projects.genivi.org/lbs/positioning.git ./positioning
cd positioning
git checkout <current version of positioning>
cd ../

=============================================================================================
How-to for the proof of concept
=============================================================================================
(you're supposed to have got additional code before)

==========================================
All-in-one script (for paris area) 
==========================================
./rebuild_all.sh

==========================================
How-to step by step, with explanations
==========================================
---Create and enter the build folder---
mkdir ./build
cd build
cmake ../
make
cd ..

---Prepare the database and the configuration for a country---
NB: You need to build the poi-supplier first:
cd build
cmake -DWITH_DATABASE_SUPPLIER=ON ../
make
cd ..

---To generate the database for Paris---
./prepare -c paris

NB:
As examples, three databases can be generated for Paris, Tokyo and San-Diego
The input stuff is taken from the OSM, by using this site:
http://www.overpass-api.de

For instance, in Paris area, the bounding box used for the demo is
bbox=2.246304,48.814551,2.430325,48.901289
In case we want to get the hotels and the museums located inside the area defined, request is:
http://www.overpass-api.de/api/xapi?*[bbox=2.246304,48.814551,2.430325,48.901289][tourism=museum|hotel]
for the stations:
http://www.overpass-api.de/api/xapi?*[bbox=2.246304,48.814551,2.430325,48.901289][railway=station]
for the bicycle
http://www.overpass-api.de/api/xapi?*[bbox=2.246304,48.814551,2.430325,48.901289][shop=bicycle]
for the fuel stations
http://www.overpass-api.de/api/xapi?*[bbox=2.246304,48.814551,2.430325,48.901289][amenity=fuel]

For Tokyo, the bounding box is 139.691048,35.631628,139.832497,35.738153

NB: In case you get such error message during runtime:
D-Bus library appears to be incorrectly set up; failed to read machine uuid: Failed to open "/etc/machine-id": No such file or directory
You need to fix it by:
sudo su
dbus-uuidgen  > /etc/machine-id

==========================================
How To Run
==========================================
./run 

---Test sequence can be---
On main panel:
CREATE

On additional panel:
REGISTER
ADDandREG

On main panel
Categories
all categories with Radius set to 2000
bicycle with Radius set to 5000
replace 'enter text to search' with 'Saint'
SEARCH
You see FINISHED with 32 records
Result list
TOP/PREV/NEXT to watch the result
For a new search, click on CANCEL first
 
=============================================================================================
How to for the common api based proof of concept (for testing add/remove stuff into a database)
=============================================================================================
NB: You need CommonAPI 3.1.2 and Franca 0.9.1 installed 

==========================================
All-in-one script 
==========================================
./rebuild_all.sh -f

==========================================
How-to step by step, with explanations
==========================================
First you need to build the poi-manager-server, see the README in ../../src/poi-service

cd build

You need to pass as parameter to the cmake the link to your patched dbus library (required by CommonAPI)

cd build
cmake -DWITH_FRANCA_DBUS_INTERFACE=ON -DDBUS_LIB_PATH=yourPath -DCOMMONAPI_DBUS_TOOL_DIR=<common-api-dbus-tools folder> -DCOMMONAPI_TOOL_DIR=<common-api-tools folder> -DWITH_DEBUG=ON ../

make

==========================================
How To Run
==========================================
./run_capi
NB: the configuration file ./resource/commonapi-dbus.ini is copied into $HOME

---Test sequence can be---
NB: no DLT started

DLT| WARNING:   Loging disabled, FIFO /tmp/dlt cannot be opened with open()!
[CAPI][INFO] Using default binding 'dbus'
[CAPI][INFO] Using default shared library folder '/usr/local/lib/commonapi'
[CAPI][INFO] Using default configuration file '/etc/commonapi.ini'
[CAPI][DEBUG] Registering factory for binding=dbus
poi manager server started

DLT| WARNING:   Loging disabled, FIFO /tmp/dlt cannot be opened with open()!
[CAPI][INFO] Using default binding 'dbus'
[CAPI][INFO] Using default shared library folder '/usr/local/lib/commonapi'
[CAPI][INFO] Using default configuration file '/etc/commonapi.ini'
[CAPI][DEBUG] Registering factory for binding=dbus
poi manager client started
Version 1.0.0
Date 19-03-2015
languageCode: eng countryCode: USA scriptCode: Latn 
Configuration changed:  0
Change locales
languageCode: fra countryCode: FRA scriptCode: Latn 
id: 0 name: all categories top level: 1

Create category

Category 1 created
id: 0 name: all categories top level: 1
id: 1 name: recreation top level: 1

Create POI

POI 1 added

Search

Search state 1298
Result list size 1
POI id 1

Delete POI

POI 1 removed

Delete category

Category 1 removed
id: 0 name: all categories top level: 1

Exit
poi manager client closed
DLT| ERROR:     Lost log messages in user buffer when exiting: 2