Skip to content

Commit dfac196

Browse files
Rub21erictheise
andauthored
Update map-styles, iD editor, Imposm config and fix network:wikidata (#727)
* Addresses OpenHistoricalMap/issues#1312 w/map-styles-0.9.13 * Addresses OpenHistoricalMap/issues#1312 w/updated timeslider source * Update Imposm template and fix network:wikidata for routes (#724) * Change role for imposm in tiler db * Include network_wikidata for new import * Update branch to build docker image * Update values to deploy in production * Fix network:wikidata for routes * Fix docker container for imposm * id-v2.29.6 * OpenHistoricalMap/issues#1309: corrects spelling in prod template * Fix extra tags for nominatim (#728) --------- Co-authored-by: Eric Theise <erictheise@gmail.com>
1 parent 375c9a0 commit dfac196

10 files changed

Lines changed: 33 additions & 62 deletions

File tree

.github/workflows/chartpress.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
branches:
55
- 'main'
66
- 'staging'
7-
- 'tags_imposm'
7+
- 'pg_user'
88
jobs:
99
build:
1010
runs-on: ubuntu-22.04
@@ -71,7 +71,7 @@ jobs:
7171
OHM_SLACK_WEBHOOK_URL: ${{ secrets.OHM_SLACK_WEBHOOK_URL }}
7272
################ Staging secrets ################
7373
- name: Staging - substitute secrets
74-
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/tags_imposm'
74+
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/pg_user'
7575
uses: bluwy/substitute-string-action@v1
7676
with:
7777
_input-file: 'values.staging.template.yaml'
@@ -189,14 +189,14 @@ jobs:
189189
PRODUCTION_OPENSTREETMAP_AUTH_SECRET: ${{ secrets.PRODUCTION_OPENSTREETMAP_AUTH_SECRET }}
190190

191191
- name: AWS Credentials
192-
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/tags_imposm'
192+
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/pg_user'
193193
uses: aws-actions/configure-aws-credentials@v1
194194
with:
195195
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
196196
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
197197
aws-region: us-east-1
198198
- name: Setup Kubectl and Helm Dependencies
199-
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/tags_imposm'
199+
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/pg_user'
200200
run: |
201201
sudo pip install awscli --ignore-installed six
202202
sudo curl -L -o /usr/bin/kubectl https://amazon-eks.s3.us-west-2.amazonaws.com/1.17.7/2020-07-08/bin/linux/amd64/kubectl
@@ -210,22 +210,22 @@ jobs:
210210
helm version
211211
212212
- name: Update kube-config staging
213-
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/tags_imposm'
213+
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/pg_user'
214214
run: aws eks --region us-east-1 update-kubeconfig --name osmseed-staging
215215
- name: Update kube-config prod
216216
if: github.ref == 'refs/heads/main'
217217
run: aws eks --region us-east-1 update-kubeconfig --name osmseed-production-v2
218218
- name: Add Helm repository
219-
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/tags_imposm'
219+
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/pg_user'
220220
run: |
221221
helm repo add osm-seed https://osm-seed.github.io/osm-seed-chart/
222222
helm repo update
223223
- name: Install helm dependencies for
224-
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/tags_imposm'
224+
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/pg_user'
225225
run: cd ohm && helm dep up
226226
# Staging
227227
- name: Staging - helm deploy
228-
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/tags_imposm'
228+
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/pg_user'
229229
run: helm upgrade --install staging --wait ohm/ -f values.staging.yaml -f ohm/values.yaml
230230
# Production
231231
- name: Production - helm deploy

hetzner/nominatim/nominatim.base.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ services:
2020
NOMINATIM_ADDRESS_LEVEL_CONFIG_URL: https://raw.githubusercontent.com/OpenHistoricalMap/nominatim-ui/master/address-levels.json
2121
UPDATE_MODE: continuous
2222
IMPORT_STYLE: extratags
23-
EXTRA_TAGS: "start_date,start_date:edtf,end_date,end_date:edt"
23+
EXTRA_TAGS: "start_date,start_date:edtf,end_date,end_date:edtf"
2424
restart: always
2525
healthcheck:
2626
test: ["CMD-SHELL", "curl -f http://localhost:8080/status || exit 1"]

hetzner/tiler/tiler.production.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ services:
1717

1818
tiler_imposm:
1919
container_name: tiler_imposm
20-
image: ghcr.io/openhistoricalmap/tiler-imposm:0.0.1-0.dev.git.3323.haf36ae7d
20+
image: ghcr.io/openhistoricalmap/tiler-imposm:0.0.1-0.dev.git.3323.h6950acce
2121
volumes:
2222
- tiler_imposm_data:/mnt/data
2323
env_file:
@@ -137,10 +137,10 @@ services:
137137
volumes:
138138
tiler_pgdata:
139139
driver: local
140-
name: tiler_db_16_03
140+
name: tiler_db_17_03
141141
tiler_imposm_data:
142142
driver: local
143-
name: tiler_imposm_16_03
143+
name: tiler_imposm_17_03
144144

145145
networks:
146146
ohm_network:

images/tiler-imposm/config/imposm3.template.json

Lines changed: 2 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -89,51 +89,14 @@
8989
"traffic_signals",
9090
"traffic_signals:*",
9191
"button_operated",
92-
"sidewalk",
9392
"sidewalk:*",
94-
"parking",
9593
"parking:*",
9694
"lit",
9795
"smoothness",
9896
"direction",
99-
"ele",
100-
101-
"building",
102-
"natural",
103-
"landuse",
104-
"highway",
105-
"railway",
106-
"aeroway",
107-
"waterway",
108-
"barrier",
109-
"leisure",
110-
"historic",
111-
"man_made",
112-
"power",
113-
"military",
114-
"amenity",
115-
"place",
116-
"tourism",
117-
"shop",
118-
"craft",
119-
"boundary",
120-
"communication",
121-
"route",
122-
"start_date",
123-
"end_date",
124-
"name",
125-
"oneway",
126-
"bridge",
127-
"access",
128-
"service",
129-
"ford",
130-
"surface",
131-
"lanes",
132-
"maxspeed",
133-
"admin_level",
134-
"type"
97+
"ele"
13598
]
13699
},
137100
"generalized_tables": {},
138101
"tables": {}
139-
}
102+
}

images/tiler-imposm/config/layers/route_lines.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@
4747
"name": "network",
4848
"type": "string"
4949
},
50+
{
51+
"key": "network:wikidata",
52+
"name": "network_wikidata",
53+
"type": "string"
54+
},
5055
{
5156
"key": "direction",
5257
"name": "direction",

images/tiler-imposm/config/layers/route_multilines.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@
4747
"name": "network",
4848
"type": "string"
4949
},
50+
{
51+
"key": "network:wikidata",
52+
"name": "network_wikidata",
53+
"type": "string"
54+
},
5055
{
5156
"key": "direction",
5257
"name": "direction",

images/tiler-imposm/queries/ohm_mviews/routes_01_merge_by_date.sql

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ WITH union_sources AS (
118118
-- 1) From multi-lines (relations with members)
119119
SELECT
120120
member::bigint AS way_id,
121-
osm_id, name, type, route, ref, network, operator, direction, tags, geometry,
121+
osm_id, name, type, route, ref, network, network_wikidata, operator, direction, tags, geometry,
122122
start_decdate,
123123
end_decdate,
124124
me_highway AS highway
@@ -130,7 +130,7 @@ WITH union_sources AS (
130130
-- 2) From lines (direct way-based routes)
131131
SELECT
132132
osm_id::bigint AS way_id,
133-
osm_id, name, type, route, ref, network, operator, direction, tags, geometry,
133+
osm_id, name, type, route, ref, network, network_wikidata, operator, direction, tags, geometry,
134134
start_decdate,
135135
end_decdate,
136136
highway
@@ -160,6 +160,7 @@ data_for_null_dates AS (
160160
'ref', u.ref,
161161
'route', u.route,
162162
'network', u.network,
163+
'network:wikidata', u.network_wikidata,
163164
'name', u.name,
164165
'type', u.type,
165166
'operator', u.operator,
@@ -200,7 +201,7 @@ data_for_dated_ways AS (
200201
-- Relate active routes to each time segment
201202
SELECT
202203
s.way_id, s.seg_start, s.seg_end,
203-
u.osm_id, u.ref, u.route, u.network, u.name, u.type, u.operator, u.direction, u.tags, u.geometry, u.highway
204+
u.osm_id, u.ref, u.route, u.network, u.network_wikidata, u.name, u.type, u.operator, u.direction, u.tags, u.geometry, u.highway
204205
FROM segments s
205206
JOIN union_sources u
206207
ON u.way_id = s.way_id
@@ -232,6 +233,7 @@ data_for_dated_ways AS (
232233
'ref', ref,
233234
'route', route,
234235
'network', network,
236+
'network:wikidata', network_wikidata,
235237
'name', name,
236238
'type', type,
237239
'operator', operator,

images/tiler-imposm/scripts/setup_imposm_role.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,8 @@ BEGIN
1616
END
1717
\$\$;
1818
19-
-- Permissions
20-
GRANT ALL PRIVILEGES ON DATABASE $POSTGRES_DB TO imposm;
21-
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO imposm;
22-
GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO imposm;
23-
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL ON TABLES TO imposm;
24-
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL ON SEQUENCES TO imposm;
19+
-- Grant superuser to imposm so it has full permissions like postgres
20+
ALTER ROLE imposm SUPERUSER;
2521
2622
-- Session-level parameters (only apply to imposm connections, not Tegola)
2723
ALTER ROLE imposm IN DATABASE $POSTGRES_DB SET work_mem = '${IMPOSM_WORK_MEM:-1GB}';

images/web/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ RUN apt-get update && \
2424
&& apt-get clean && rm -rf /var/lib/apt/lists/*
2525

2626
# Download OHM Website using gitsha, faster than cloning
27-
ENV OPENHISTORICALMAP_WEBSITE_GITSHA=a53c1384ce78e7ce3c41e410e9ec61315f0afa93
27+
ENV OPENHISTORICALMAP_WEBSITE_GITSHA=7ad2415aef444aa98775b1a5a8e4cd5124b7b8a5
2828
ENV OHM_WEBSITE_URL=https://github.com/OpenHistoricalMap/ohm-website/archive/${OPENHISTORICALMAP_WEBSITE_GITSHA}.zip
2929
RUN rm -rf $workdir/* && curl -fsSL $OHM_WEBSITE_URL -o /tmp/ohm-website.zip && \
3030
unzip /tmp/ohm-website.zip -d /tmp && \

values.production.template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,7 @@ osm-seed:
870870
UPDATE_MODE: continuous
871871
OSMSEED_WEB_API_DOMAIN: www.openhistoricalmap.org
872872
IMPORT_STYLE: extratags
873-
EXTRA_TAGS: start_date,start_date:edtf,end_date,end_date:edt
873+
EXTRA_TAGS: start_date,start_date:edtf,end_date,end_date:edtf
874874
resources:
875875
enabled: false
876876
requests:

0 commit comments

Comments
 (0)