Skip to content

Commit

Permalink
Merge opengisch/qgis-swiss-locator/master
Browse files Browse the repository at this point in the history
  • Loading branch information
danjov authored Apr 27, 2021
2 parents 380489d + 41b11f6 commit 3dae8be
Show file tree
Hide file tree
Showing 13 changed files with 1,245 additions and 1,055 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/update-layers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@

name: Update Layers

on:
schedule:
# weekly
- cron: '0 0 * * 0'
push:
branches:
- master
paths:
- .github/workflows/update-layers.yml
workflow_dispatch:

jobs:
update-layers:
runs-on: ubuntu-latest

steps:
- name: Get source code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.8

- name: Update layers
run: |
cd swiss_locator/map_geo_admin
./download_layer_data.py
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
commit-message: update map.geo.admin.ch layers
title: Automated updates to map.geo.admin.ch layers
body:
branch: update-layers
8 changes: 0 additions & 8 deletions .tx/config

This file was deleted.

7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Similarly to the online geoportal [https://map.geo.admin.ch](https://map.geo.adm
* ZIP codes
* addresses
* cadastral parcels
* WMS layers, which can easily be added to the map
* WMS layers from Federal Geoportal (map.geo.admin.ch) or opendata.swiss, which can easily be added to the map
* features (search through features descriptions)


Expand All @@ -25,6 +25,7 @@ Configuration is achieved in the main application settings under the `locator` t
* enable or disable searches (locations, layers, features)
* customize prefixes, define if they are default filters (used without prefix)
* access to the configuration of the plugin
* include or exclude opendata.swiss data from layer searches

In the configuration of the plugin, further customization can be achieved:
* language definition (English, German, French, Italian, Rumantsch)
Expand All @@ -37,8 +38,8 @@ In the configuration of the plugin, further customization can be achieved:
Type the text to search in the locator bar.

If the result is a **WMS layer**, double-clicking on it will try to add it to the map.
It might not be possible since some layers are only visible in the geoportal.
In any case, a link will be shown to display the layer in the geoportal.
It might not be possible since some layers are only visible in the geoportal (map.geo.admin.ch).
In this case, a link will be shown to display the layer in the geoportal.

If the result is a **location** or **feature**,
double-clicking on it will move the map canvas to the result and highlight its position.
Expand Down
2 changes: 1 addition & 1 deletion swiss_locator/core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ def __init__(self):
self.add_setting(Bool("feature_search_restrict", Scope.Global, False))
self.add_setting(Stringlist("feature_search_layers_list", Scope.Global, None))


self.add_setting(Bool("layers_include_opendataswiss", Scope.Global, True))

390 changes: 201 additions & 189 deletions swiss_locator/map_geo_admin/layers_de.data

Large diffs are not rendered by default.

390 changes: 201 additions & 189 deletions swiss_locator/map_geo_admin/layers_en.data

Large diffs are not rendered by default.

394 changes: 203 additions & 191 deletions swiss_locator/map_geo_admin/layers_fr.data

Large diffs are not rendered by default.

390 changes: 201 additions & 189 deletions swiss_locator/map_geo_admin/layers_it.data

Large diffs are not rendered by default.

392 changes: 202 additions & 190 deletions swiss_locator/map_geo_admin/layers_rm.data

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions swiss_locator/metadata.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
[general]
name=Swiss Locator
qgisMinimumVersion=3.2
description=A locator filter for Swiss Geoportal (geo.admin.ch)
about=Search for locations, WMS layers of features in the whole Swiss Geoportal catalog
description=A locator filter for Swiss Geoportal (geo.admin.ch) and opendata.swiss resources
about=Search for locations, WMS layers of features in the whole Swiss Geoportal catalog as well as in opendata.swiss
version=dev
author=Denis Rouzaud
[email protected]

# Tags are comma separated with spaces allowed
tags=swiss, suisse, schweiz, locator, geoadmin, geoportal
tags=swiss, suisse, schweiz, locator, geoadmin, geoportal, opendata.swiss

tracker=https://github.com/opengisch/qgis-swiss-locator
homepage=https://github.com/opengisch/qgis-swiss-locator
Expand Down
268 changes: 178 additions & 90 deletions swiss_locator/swiss_locator_filter.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion swiss_locator/swiss_locator_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def __init__(self, iface: QgisInterface):
qgis_locale = QLocale(QSettings().value('locale/userLocale'))
locale_path = os.path.join(os.path.dirname(__file__), 'i18n')
self.translator = QTranslator()
self.translator.load(qgis_locale, 'swiss_locator', '_', locale_path)
self.translator.load(qgis_locale, 'qgis-swiss-locator', '_', locale_path)
QCoreApplication.installTranslator(self.translator)

self.locator_filters = {}
Expand Down
12 changes: 11 additions & 1 deletion swiss_locator/ui/config.ui
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,10 @@
<item row="1" column="1">
<widget class="QSpinBox" name="layers_limit"/>
</item>
<item row="2" column="0">
<item row="2" column="1">
<widget class="QCheckBox" name="layers_include_opendataswiss"/>
</item>
<item row="3" column="0">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
Expand All @@ -247,6 +250,13 @@
</property>
</spacer>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Include data from opendata.swiss</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
Expand Down

0 comments on commit 3dae8be

Please sign in to comment.