Skip to content

Commit 1722fa2

Browse files
authored
Release v2.3.0
Improved point selecting algorithm (@wp99cp) Improved point naming algorithm (@wp99cp) New interactive map based on OpenLayers (@wp99cp) Fix compatibility issues with windows (@maede97) Multiple Bug fixes Merge pull request #88 from cevi/dev
2 parents d369e8d + c2ccd45 commit 1722fa2

File tree

115 files changed

+6771
-5724
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+6771
-5724
lines changed

.dockerignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Ignore everything
2+
*
3+
4+
# Allow files and directories
5+
!webinterface
6+
!.git/HEAD
7+
!.git/refs/heads/*
8+
9+
# Folders to ignore
10+
webinterface/node_modules/*
11+
webinterface/src/build.ts

.github/workflows/dev_build.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: DevBuild
2+
3+
on:
4+
push:
5+
branches:
6+
- 'dev'
7+
8+
env:
9+
ANGULAR_CONFIGURATION: dev_build
10+
11+
jobs:
12+
devBuild:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
17+
- name: Login to Docker Hub
18+
uses: docker/login-action@v2
19+
with:
20+
registry: registry.cevi.tools
21+
username: ${{ secrets.DOCKERHUB_USERNAME }}
22+
password: ${{ secrets.DOCKERHUB_TOKEN }}
23+
24+
- name: Build the stack
25+
run: docker-compose -f docker-compose.yml -f docker-compose.dev-build.yml build
26+
27+
- name: Push containers to registry
28+
run: docker-compose -f docker-compose.yml -f docker-compose.dev-build.yml push

.github/workflows/prod_build.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: DevBuild
2+
3+
on:
4+
push:
5+
branches:
6+
- 'master'
7+
8+
env:
9+
ANGULAR_CONFIGURATION: dev_build
10+
11+
jobs:
12+
devBuild:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
17+
- name: Login to Docker Hub
18+
uses: docker/login-action@v2
19+
with:
20+
registry: registry.cevi.tools
21+
username: ${{ secrets.DOCKERHUB_USERNAME }}
22+
password: ${{ secrets.DOCKERHUB_TOKEN }}
23+
24+
- name: Build the stack
25+
run: docker-compose --env-file prod.env up --build
26+
27+
- name: Push containers to registry
28+
run: docker-compose push

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
python_program/.idea
22
.idea
3-
python_program/automatic_walk_time_tables/res/swisstlm3d_2021-04_2056_5728.gdb
4-
python_program/automatic_walk_time_tables/res/swissnames3d_2021_2056.shp
3+
swiss_TLM_api/map_snipped.png
4+
swiss_TLM_api/index_cache/index_cache.tar.xz

docker-compose.dev-build.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
version: "3.9"
2+
3+
services:
4+
5+
awt-tile-cache:
6+
image: registry.cevi.tools/cevi/awt_tile-caching:dev
7+
8+
awt-mapfish:
9+
image: registry.cevi.tools/cevi/awt_mapfish:dev
10+
11+
awt-swiss-tml:
12+
image: registry.cevi.tools/cevi/awt_swiss-tml-api:dev
13+
14+
awt-backend:
15+
image: registry.cevi.tools/cevi/awt_backend:dev
16+
17+
awt-webinterface:
18+
image: registry.cevi.tools/cevi/awt_webinterface:dev
19+

docker-compose.yml

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,49 @@ version: "3.9"
22

33
services:
44

5-
mapfish:
5+
awt-tile-cache:
6+
image: registry.cevi.tools/cevi/awt_tile-caching:latest
7+
build: tile_caching
8+
9+
awt-mapfish:
10+
image: registry.cevi.tools/cevi/awt_mapfish:latest
611
build: pdf_map_export/.
712
ports:
813
- "8080:8080"
14+
depends_on:
15+
- awt-tile-cache
16+
17+
awt-swiss-tml:
18+
image: registry.cevi.tools/cevi/awt_swiss-tml-api:latest
19+
build:
20+
context: swiss_TLM_api/.
21+
ports:
22+
- "1848:1848"
23+
volumes:
24+
- ./swiss_TLM_api/resources:/app/resources
25+
- ./swiss_TLM_api/index_cache:/app/index_cache
926

10-
backend:
27+
awt-backend:
28+
image: registry.cevi.tools/cevi/awt_backend:latest
1129
build:
1230
context: python_program/.
1331
ports:
1432
- "5000:5000"
1533
depends_on:
16-
- mapfish
34+
- awt-mapfish
35+
- awt-swiss-tml
36+
environment:
37+
TZ: Europe/Zurich
1738

18-
webinterface:
39+
awt-webinterface:
40+
image: registry.cevi.tools/cevi/awt_webinterface:latest
1941
build:
20-
context: webinterface/.
42+
context: .
43+
dockerfile: webinterface/Dockerfile
2144
args:
2245
# By default, we build in development mode. You can change the build mode by specifying $ANGULAR_CONFIGURATION.
2346
- configuration=${ANGULAR_CONFIGURATION:-development}
2447
ports:
2548
- "80:80"
2649
depends_on:
27-
- backend
50+
- awt-backend

pdf_map_export/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM camptocamp/mapfish_print:latest
1+
FROM camptocamp/mapfish_print:3.28
22

33
# add our custom config files / report templates
44
COPY ./swisstopo_config /usr/local/tomcat/webapps/ROOT/print-apps/swisstopo

pdf_map_export/swisstopo_config/config.yaml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
proxies:
2+
- !proxy
3+
scheme: http
4+
host: awt-tile-cache
5+
port: 8080
6+
matchers:
7+
- !localMatch
8+
reject: true
9+
- !acceptAll { }
10+
111
templates:
212

313
#===========================================================================
@@ -7,8 +17,10 @@ templates:
717
reportTemplate: report.jrxml
818
attributes:
919

20+
scale: !string { }
21+
1022
map: !map
11-
maxDpi: 400
23+
maxDpi: 250
1224
width: 813
1325
height: 566
1426

@@ -65,5 +77,5 @@ templates:
6577
directory: '.'
6678
- !createMap { }
6779
- !createScalebar { }
68-
- !createNorthArrow {}
80+
- !createNorthArrow { }
6981

pdf_map_export/swisstopo_config/report.jrxml

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<!-- Created with Jaspersoft Studio version 6.17.0.final using JasperReports Library version 6.17.0-6d93193241dd8cc42629e188b94f9e0bc5722efd -->
2+
<!-- Created with Jaspersoft Studio version 6.20.0.final using JasperReports Library version 6.20.0-2bc7ab61c56f459e8176eb05c7705e145cd400ad -->
33
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports"
44
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
55
xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd"
66
name="report" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="814" leftMargin="14"
77
rightMargin="14" topMargin="14" bottomMargin="14" uuid="9a3e59f5-6675-48cf-ad74-9c42b5a5b290">
88
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.HorizontalRowLayout"/>
99
<property name="com.jaspersoft.studio.unit." value="pixel"/>
10-
<parameter name="mapSubReport" class="java.lang.String"/>
10+
<parameter name="mapSubReport" class="java.lang.String" isForPrompting="false"/>
11+
<parameter name="scale" class="java.lang.String"/>
1112
<parameter name="scalebarSubReport" class="java.lang.String"/>
1213
<parameter name="northArrowGraphic" class="java.lang.String"/>
1314
<title>
@@ -23,7 +24,7 @@
2324
<subreportExpression><![CDATA[$P{mapSubReport}]]></subreportExpression>
2425
</subreport>
2526
<rectangle>
26-
<reportElement x="600" y="518" width="210" height="45" forecolor="#FFFFFF"
27+
<reportElement x="600" y="515" width="210" height="45" forecolor="#FFFFFF"
2728
uuid="c9901651-0788-428f-b7a3-0f1623195781">
2829
<property name="com.jaspersoft.studio.unit.x" value="px"/>
2930
<property name="com.jaspersoft.studio.unit.width" value="px"/>
@@ -32,7 +33,7 @@
3233
</reportElement>
3334
</rectangle>
3435
<subreport>
35-
<reportElement x="605" y="523" width="200" height="25" uuid="fa145068-76a5-4834-98ed-ce65b1976b3d">
36+
<reportElement x="605" y="518" width="200" height="25" uuid="fa145068-76a5-4834-98ed-ce65b1976b3d">
3637
<property name="com.jaspersoft.studio.unit.height" value="px"/>
3738
<property name="com.jaspersoft.studio.unit.width" value="px"/>
3839
<property name="com.jaspersoft.studio.unit.x" value="px"/>
@@ -49,6 +50,17 @@
4950
</textElement>
5051
<text><![CDATA[https://disclaimer.admin.ch © swisstopo]]></text>
5152
</staticText>
53+
<textField>
54+
<reportElement x="605" y="537" width="200" height="16" uuid="a03c1801-86f0-4389-9fc7-3a5e6f7a30dc">
55+
<property name="com.jaspersoft.studio.unit.width" value="px"/>
56+
<property name="com.jaspersoft.studio.unit.x" value="px"/>
57+
</reportElement>
58+
<textElement textAlignment="Center" verticalAlignment="Middle">
59+
<font fontName="SansSerif" size="9"/>
60+
</textElement>
61+
<textFieldExpression>
62+
<![CDATA[$P{scale}]]></textFieldExpression>
63+
</textField>
5264
<image evaluationTime="Report">
5365
<reportElement x="10" y="10" width="280" height="39" uuid="e7375b56-57f5-4abb-8f88-45734b26ed1b"/>
5466
<imageExpression><![CDATA["cevi_logo.svg"]]></imageExpression>
@@ -60,10 +72,10 @@
6072
<property name="local_mesure_unitheight" value="pixel"/>
6173
<property name="com.jaspersoft.studio.unit.height" value="px"/>
6274
</reportElement>
63-
<imageExpression class="net.sf.jasperreports.engine.JRRenderable">
64-
<![CDATA[net.sf.jasperreports.renderers.BatikRenderer.getInstance(new java.io.File(new java.net.URI($P{northArrowGraphic})))]]>
65-
</imageExpression>
75+
<imageExpression>
76+
<![CDATA[net.sf.jasperreports.renderers.BatikRenderer.getInstance(new java.io.File(new java.net.URI($P{northArrowGraphic})))]]></imageExpression>
6677
</image>
78+
6779
</band>
6880
</title>
6981
</jasperReport>

pdf_map_export/test_query.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@
172172
"name": "selected track pois"
173173
},
174174
{
175-
"baseURL": "https://wmts100.geo.admin.ch/1.0.0/{Layer}/{style}/{Time}/{TileMatrixSet}/{TileMatrix}/{TileCol}/{TileRow}.jpeg",
175+
"baseURL": "https://wmts.geo.admin.ch/1.0.0/{Layer}/{style}/{Time}/{TileMatrixSet}/{TileMatrix}/{TileCol}/{TileRow}.jpeg",
176176
"dimensions": [
177177
"Time"
178178
],

0 commit comments

Comments
 (0)