Skip to content

Commit c12b2a8

Browse files
dr0ilod
authored andcommitted
Initial landing for lobid-organisations
See hbz/lobid-organisations#419.
1 parent 10ecbb7 commit c12b2a8

File tree

5 files changed

+335
-0
lines changed

5 files changed

+335
-0
lines changed

projects/lobid_DACH/.env

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
COMPOSE_PROJECT_NAME=pelias
2+
DOCKER_USER=1000
3+
DATA_DIR=/data/

projects/lobid_DACH/README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
2+
# lobid organisations
3+
4+
This project is configured to download(well, partly)/prepare/build a complete Pelias installation for https://lobid.org/organisations.
5+
6+
See https://github.com/hbz/lobid-organisations/issues/419.
7+
8+
Atm not all queries result accurate data, so there is room for proper configuration and data input.
9+
10+
# Setup
11+
12+
Please refer to the instructions at https://github.com/pelias/docker in order to install and configure your docker environment.
13+
14+
The minimum configuration required in order to run this project are [installing prerequisites](https://github.com/pelias/docker#prerequisites), [install the pelias command](https://github.com/pelias/docker#installing-the-pelias-command) and [configure the environment](https://github.com/pelias/docker#configure-environment).
15+
16+
Please ensure that's all working fine before continuing.
17+
18+
# Run a Build
19+
20+
To run a complete build, execute the following commands:
21+
22+
```bash
23+
pelias compose down # if it was up before
24+
pelias compose pull
25+
pelias elastic start
26+
pelias elastic wait
27+
pelias elastic create
28+
pelias download all
29+
pelias prepare all
30+
pelias import all
31+
pelias compose up
32+
pelias compose ps # check all instances
33+
pelias test run
34+
```
35+
36+
# Make an Example Query
37+
38+
Residing in the hbz subnet, you can now make queries against this Pelias build.
39+
The following query is an example resulting not very accurate data:
40+
41+
* @curl "http://gaia.hbz-nrw.de:4000/v1/search?layers=address&text=Juelicherstrasse%206,%2050674%20Koeln" |jq .@
42+
43+
Inaccurate data can be identified when `confidence` is equal or less than `0.6`.
44+
45+
In contrast, the following query results accurate geo data:
46+
47+
* @curl "http://gaia.hbz-nrw.de:4000/v1/search?layers=address&text=Gleueler%20Str.%2050%2050931%20Koeln" |jq .@
48+
49+
See that `confidence` has a value of `0.8`.
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
version: '3'
2+
networks:
3+
default:
4+
driver: bridge
5+
services:
6+
libpostal:
7+
image: pelias/libpostal-service
8+
container_name: pelias_libpostal
9+
user: "${DOCKER_USER}"
10+
restart: always
11+
ports: [ "4400:4400" ]
12+
schema:
13+
image: pelias/schema:master
14+
container_name: pelias_schema
15+
user: "${DOCKER_USER}"
16+
volumes:
17+
- "./pelias.json:/code/pelias.json"
18+
api:
19+
image: pelias/api:master
20+
container_name: pelias_api
21+
user: "${DOCKER_USER}"
22+
restart: always
23+
environment: [ "PORT=4000" ]
24+
ports: [ "4000:4000" ]
25+
volumes:
26+
- "./pelias.json:/code/pelias.json"
27+
placeholder:
28+
image: pelias/placeholder:master
29+
container_name: pelias_placeholder
30+
user: "${DOCKER_USER}"
31+
restart: always
32+
environment: [ "PORT=4100" ]
33+
ports: [ "4100:4100" ]
34+
volumes:
35+
- "./pelias.json:/code/pelias.json"
36+
- "${DATA_DIR}:/data"
37+
- "./blacklist/:/data/blacklist"
38+
whosonfirst:
39+
image: pelias/whosonfirst:master
40+
container_name: pelias_whosonfirst
41+
user: "${DOCKER_USER}"
42+
volumes:
43+
- "./pelias.json:/code/pelias.json"
44+
- "${DATA_DIR}:/data"
45+
- "./blacklist/:/data/blacklist"
46+
openstreetmap:
47+
image: pelias/openstreetmap:master
48+
container_name: pelias_openstreetmap
49+
user: "${DOCKER_USER}"
50+
volumes:
51+
- "./pelias.json:/code/pelias.json"
52+
- "${DATA_DIR}:/data"
53+
- "./blacklist/:/data/blacklist"
54+
openaddresses:
55+
image: pelias/openaddresses:master
56+
container_name: pelias_openaddresses
57+
user: "${DOCKER_USER}"
58+
volumes:
59+
- "./pelias.json:/code/pelias.json"
60+
- "${DATA_DIR}:/data"
61+
- "./blacklist/:/data/blacklist"
62+
transit:
63+
image: pelias/transit:master
64+
container_name: pelias_transit
65+
user: "${DOCKER_USER}"
66+
volumes:
67+
- "./pelias.json:/code/pelias.json"
68+
- "${DATA_DIR}:/data"
69+
geonames:
70+
image: pelias/geonames:master
71+
container_name: pelias_geonames
72+
user: "${DOCKER_USER}"
73+
volumes:
74+
- "./pelias.json:/code/pelias.json"
75+
- "${DATA_DIR}:/data"
76+
- "./blacklist/:/data/blacklist"
77+
csv-importer:
78+
image: pelias/csv-importer:master
79+
container_name: pelias_csv_importer
80+
user: "${DOCKER_USER}"
81+
volumes:
82+
- "./pelias.json:/code/pelias.json"
83+
- "${DATA_DIR}:/data"
84+
- "./blacklist/:/data/blacklist"
85+
polylines:
86+
image: pelias/polylines:master
87+
container_name: pelias_polylines
88+
user: "${DOCKER_USER}"
89+
volumes:
90+
- "./pelias.json:/code/pelias.json"
91+
- "${DATA_DIR}:/data"
92+
interpolation:
93+
image: pelias/interpolation:master
94+
container_name: pelias_interpolation
95+
user: "${DOCKER_USER}"
96+
restart: always
97+
environment: [ "PORT=4300" ]
98+
ports: [ "4300:4300" ]
99+
volumes:
100+
- "./pelias.json:/code/pelias.json"
101+
- "${DATA_DIR}:/data"
102+
pip:
103+
image: pelias/pip-service:master
104+
container_name: pelias_pip-service
105+
user: "${DOCKER_USER}"
106+
restart: always
107+
environment: [ "PORT=4200" ]
108+
ports: [ "4200:4200" ]
109+
volumes:
110+
- "./pelias.json:/code/pelias.json"
111+
- "${DATA_DIR}:/data"
112+
elasticsearch:
113+
image: pelias/elasticsearch:5.6.12
114+
container_name: pelias_elasticsearch
115+
user: "${DOCKER_USER}"
116+
restart: always
117+
ports: [ "9200:9200", "9300:9300" ]
118+
volumes:
119+
- "${DATA_DIR}/elasticsearch:/usr/share/elasticsearch/data"
120+
ulimits:
121+
memlock:
122+
soft: -1
123+
hard: -1
124+
nofile:
125+
soft: 65536
126+
hard: 65536
127+
cap_add: [ "IPC_LOCK" ]
128+
fuzzy-tester:
129+
image: pelias/fuzzy-tester:master
130+
container_name: pelias_fuzzy_tester
131+
user: "${DOCKER_USER}"
132+
restart: "no"
133+
command: "--help"
134+
volumes:
135+
- "./pelias.json:/code/pelias.json"
136+
- "./test_cases:/code/pelias/fuzzy-tester/test_cases"

projects/lobid_DACH/pelias.json

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
{
2+
"logger": {
3+
"level": "info",
4+
"timestamp": false
5+
},
6+
"esclient": {
7+
"apiVersion": "5.6",
8+
"hosts": [
9+
{ "host": "elasticsearch" }
10+
]
11+
},
12+
"elasticsearch": {
13+
"settings": {
14+
"index": {
15+
"refresh_interval": "100s",
16+
"number_of_replicas": "0",
17+
"number_of_shards": "1"
18+
}
19+
}
20+
},
21+
"acceptance-tests": {
22+
"endpoints": {
23+
"docker": "http://api:4000/v1/"
24+
}
25+
},
26+
"api": {
27+
"textAnalyzer": "libpostal",
28+
"services": {
29+
"placeholder": { "url": "http://placeholder:4100" },
30+
"pip": { "url": "http://pip:4200" },
31+
"interpolation": { "url": "http://interpolation:4300" },
32+
"libpostal": { "url": "http://libpostal:4400" }
33+
},
34+
"defaultParameters": {
35+
"focus.point.lat": 50.938356,
36+
"focus.point.lon": 6.95428
37+
}
38+
},
39+
"imports": {
40+
"adminLookup": {
41+
"enabled": true
42+
},
43+
"geonames": {
44+
"datapath": "/data/geonames",
45+
"countryCode": "de"
46+
},
47+
"openstreetmap": {
48+
"leveldbpath": "/tmp",
49+
"datapath": "/data/openstreetmap",
50+
"import": [{
51+
"filename": "switzerland-latest.osm.pbf",
52+
"filename": "austria-latest.osm.pbf",
53+
"filename": "germany-latest.osm.pbf"
54+
}]
55+
},
56+
"openaddresses": {
57+
"datapath": "/data/openaddresses",
58+
"files": [
59+
"/de/berlin.csv",
60+
"/de/he/city_of_frankfurtammain.csv",
61+
"/de/hh/statewide.csv",
62+
"/de/ni/bentheim.csv",
63+
"/de/nw/city_of_cologne.csv",
64+
"/de/nw/city_of_wesel.csv",
65+
"/de/nw/city_of_wuppertal.csv",
66+
"/de/nw/kreis_viersen.csv",
67+
"/de/nw/statewide.csv",
68+
"/de/sn/statewide.csv",
69+
"/de/th/statewide.csv",
70+
"/at/31254.csv",
71+
"/at/31255.csv",
72+
"/at/31256.csv",
73+
"/at/city_of_vienna.csv",
74+
"/at/tirol.csv"
75+
]
76+
},
77+
"polyline": {
78+
"datapath": "/data/polylines",
79+
"files": ["extract.0sv"]
80+
},
81+
"whosonfirst": {
82+
"datapath": "/data/whosonfirst/",
83+
"importVenues": false,
84+
"importPostalcodes": true
85+
},
86+
"interpolation": {
87+
"datapath": "/data/interpolation/"
88+
}
89+
}
90+
}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"name" : "/v1/search",
3+
"tests" : [
4+
{
5+
"status" : "fail",
6+
"in" : {
7+
"layers" : "address",
8+
"text" : "Juelicher Str. 6 50674 Koeln"
9+
},
10+
"id" : 1,
11+
"expected" : {
12+
"geometry" : {
13+
"coordinates" : [
14+
6.93549,
15+
50.93410
16+
]
17+
},
18+
"properties" : {
19+
"name" : "cologne",
20+
"region" : "Nordrhein-Westfalen"
21+
}
22+
}
23+
},
24+
{
25+
"status" : "pass",
26+
"in" : {
27+
"layers" : "address",
28+
"text" : "Gleueler Str. 50 50931 Koeln"
29+
},
30+
"id" : 1,
31+
"expected" : {
32+
"geometry" : {
33+
"coordinates" : [
34+
6.9165482,
35+
50.9259726
36+
]
37+
},
38+
"properties" : {
39+
"name" : "GLEUELER STRAE 50",
40+
"region" : "Nordrhein-Westfalen"
41+
}
42+
}
43+
}
44+
45+
],
46+
"description" : "addresses in Germany",
47+
"normalizers" : {
48+
"name" : [
49+
"toUpperCase",
50+
"removeOrdinals",
51+
"stripPunctuation",
52+
"abbreviateDirectionals",
53+
"abbreviateStreetSuffixes"
54+
]
55+
},
56+
"priorityThresh" : 1
57+
}

0 commit comments

Comments
 (0)