halfway working (verknüpfte checkboxen)
This commit is contained in:
commit
a93c9a520f
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
/.venv/
|
||||
/basemap/
|
||||
/resources.py
|
||||
244
Makefile
Normal file
244
Makefile
Normal file
@ -0,0 +1,244 @@
|
||||
#/***************************************************************************
|
||||
# Pegelonline
|
||||
#
|
||||
# BlaBlaBla
|
||||
# -------------------
|
||||
# begin : 2025-09-26
|
||||
# git sha : $Format:%H$
|
||||
# copyright : (C) 2025 by Katrin Haßel
|
||||
# email : s6kathom@uni-trier.de
|
||||
# ***************************************************************************/
|
||||
#
|
||||
#/***************************************************************************
|
||||
# * *
|
||||
# * This program is free software; you can redistribute it and/or modify *
|
||||
# * it under the terms of the GNU General Public License as published by *
|
||||
# * the Free Software Foundation; either version 2 of the License, or *
|
||||
# * (at your option) any later version. *
|
||||
# * *
|
||||
# ***************************************************************************/
|
||||
|
||||
#################################################
|
||||
# Edit the following to match your sources lists
|
||||
#################################################
|
||||
|
||||
|
||||
#Add iso code for any locales you want to support here (space separated)
|
||||
# default is no locales
|
||||
# LOCALES = af
|
||||
LOCALES =
|
||||
|
||||
# If locales are enabled, set the name of the lrelease binary on your system. If
|
||||
# you have trouble compiling the translations, you may have to specify the full path to
|
||||
# lrelease
|
||||
#LRELEASE = lrelease
|
||||
#LRELEASE = lrelease-qt4
|
||||
|
||||
|
||||
# translation
|
||||
SOURCES = \
|
||||
__init__.py \
|
||||
pegelonline.py pegelonline_dockwidget.py
|
||||
|
||||
PLUGINNAME = pegelonline
|
||||
|
||||
PY_FILES = \
|
||||
__init__.py \
|
||||
pegelonline.py pegelonline_dockwidget.py
|
||||
|
||||
UI_FILES = pegelonline_dockwidget_base.ui
|
||||
|
||||
EXTRAS = metadata.txt icon.png
|
||||
|
||||
EXTRA_DIRS =
|
||||
|
||||
COMPILED_RESOURCE_FILES = resources.py
|
||||
|
||||
PEP8EXCLUDE=pydev,resources.py,conf.py,third_party,ui
|
||||
|
||||
# QGISDIR points to the location where your plugin should be installed.
|
||||
# This varies by platform, relative to your HOME directory:
|
||||
# * Linux:
|
||||
# .local/share/QGIS/QGIS3/profiles/default/python/plugins/
|
||||
# * Mac OS X:
|
||||
# Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins
|
||||
# * Windows:
|
||||
# AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins'
|
||||
|
||||
QGISDIR=/home/patrick/.local/share/QGIS/QGIS3/profiles/default/python/plugins/
|
||||
|
||||
#################################################
|
||||
# Normally you would not need to edit below here
|
||||
#################################################
|
||||
|
||||
HELP = help/build/html
|
||||
|
||||
PLUGIN_UPLOAD = $(c)/plugin_upload.py
|
||||
|
||||
RESOURCE_SRC=$(shell grep '^ *<file' resources.qrc | sed 's@</file>@@g;s/.*>//g' | tr '\n' ' ')
|
||||
|
||||
.PHONY: default
|
||||
default:
|
||||
@echo While you can use make to build and deploy your plugin, pb_tool
|
||||
@echo is a much better solution.
|
||||
@echo A Python script, pb_tool provides platform independent management of
|
||||
@echo your plugins and runs anywhere.
|
||||
@echo You can install pb_tool using: pip install pb_tool
|
||||
@echo See https://g-sherman.github.io/plugin_build_tool/ for info.
|
||||
|
||||
compile: $(COMPILED_RESOURCE_FILES)
|
||||
|
||||
%.py : %.qrc $(RESOURCES_SRC)
|
||||
pyrcc5 -o $*.py $<
|
||||
|
||||
%.qm : %.ts
|
||||
$(LRELEASE) $<
|
||||
|
||||
test: compile transcompile
|
||||
@echo
|
||||
@echo "----------------------"
|
||||
@echo "Regression Test Suite"
|
||||
@echo "----------------------"
|
||||
|
||||
@# Preceding dash means that make will continue in case of errors
|
||||
@-export PYTHONPATH=`pwd`:$(PYTHONPATH); \
|
||||
export QGIS_DEBUG=0; \
|
||||
export QGIS_LOG_FILE=/dev/null; \
|
||||
nosetests -v --with-id --with-coverage --cover-package=. \
|
||||
3>&1 1>&2 2>&3 3>&- || true
|
||||
@echo "----------------------"
|
||||
@echo "If you get a 'no module named qgis.core error, try sourcing"
|
||||
@echo "the helper script we have provided first then run make test."
|
||||
@echo "e.g. source run-env-linux.sh <path to qgis install>; make test"
|
||||
@echo "----------------------"
|
||||
|
||||
deploy: compile doc transcompile
|
||||
@echo
|
||||
@echo "------------------------------------------"
|
||||
@echo "Deploying plugin to your .qgis2 directory."
|
||||
@echo "------------------------------------------"
|
||||
# The deploy target only works on unix like operating system where
|
||||
# the Python plugin directory is located at:
|
||||
# $HOME/$(QGISDIR)/python/plugins
|
||||
mkdir -p $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)
|
||||
cp -vf $(PY_FILES) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)
|
||||
cp -vf $(UI_FILES) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)
|
||||
cp -vf $(COMPILED_RESOURCE_FILES) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)
|
||||
cp -vf $(EXTRAS) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)
|
||||
cp -vfr i18n $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)
|
||||
cp -vfr $(HELP) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)/help
|
||||
# Copy extra directories if any
|
||||
(foreach EXTRA_DIR,(EXTRA_DIRS), cp -R (EXTRA_DIR) (HOME)/(QGISDIR)/python/plugins/(PLUGINNAME)/;)
|
||||
|
||||
|
||||
# The dclean target removes compiled python files from plugin directory
|
||||
# also deletes any .git entry
|
||||
dclean:
|
||||
@echo
|
||||
@echo "-----------------------------------"
|
||||
@echo "Removing any compiled python files."
|
||||
@echo "-----------------------------------"
|
||||
find $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME) -iname "*.pyc" -delete
|
||||
find $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME) -iname ".git" -prune -exec rm -Rf {} \;
|
||||
|
||||
|
||||
derase:
|
||||
@echo
|
||||
@echo "-------------------------"
|
||||
@echo "Removing deployed plugin."
|
||||
@echo "-------------------------"
|
||||
rm -Rf $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)
|
||||
|
||||
zip: deploy dclean
|
||||
@echo
|
||||
@echo "---------------------------"
|
||||
@echo "Creating plugin zip bundle."
|
||||
@echo "---------------------------"
|
||||
# The zip target deploys the plugin and creates a zip file with the deployed
|
||||
# content. You can then upload the zip file on http://plugins.qgis.org
|
||||
rm -f $(PLUGINNAME).zip
|
||||
cd $(HOME)/$(QGISDIR)/python/plugins; zip -9r $(CURDIR)/$(PLUGINNAME).zip $(PLUGINNAME)
|
||||
|
||||
package: compile
|
||||
# Create a zip package of the plugin named $(PLUGINNAME).zip.
|
||||
# This requires use of git (your plugin development directory must be a
|
||||
# git repository).
|
||||
# To use, pass a valid commit or tag as follows:
|
||||
# make package VERSION=Version_0.3.2
|
||||
@echo
|
||||
@echo "------------------------------------"
|
||||
@echo "Exporting plugin to zip package. "
|
||||
@echo "------------------------------------"
|
||||
rm -f $(PLUGINNAME).zip
|
||||
git archive --prefix=$(PLUGINNAME)/ -o $(PLUGINNAME).zip $(VERSION)
|
||||
echo "Created package: $(PLUGINNAME).zip"
|
||||
|
||||
upload: zip
|
||||
@echo
|
||||
@echo "-------------------------------------"
|
||||
@echo "Uploading plugin to QGIS Plugin repo."
|
||||
@echo "-------------------------------------"
|
||||
$(PLUGIN_UPLOAD) $(PLUGINNAME).zip
|
||||
|
||||
transup:
|
||||
@echo
|
||||
@echo "------------------------------------------------"
|
||||
@echo "Updating translation files with any new strings."
|
||||
@echo "------------------------------------------------"
|
||||
@chmod +x scripts/update-strings.sh
|
||||
@scripts/update-strings.sh $(LOCALES)
|
||||
|
||||
transcompile:
|
||||
@echo
|
||||
@echo "----------------------------------------"
|
||||
@echo "Compiled translation files to .qm files."
|
||||
@echo "----------------------------------------"
|
||||
@chmod +x scripts/compile-strings.sh
|
||||
@scripts/compile-strings.sh $(LRELEASE) $(LOCALES)
|
||||
|
||||
transclean:
|
||||
@echo
|
||||
@echo "------------------------------------"
|
||||
@echo "Removing compiled translation files."
|
||||
@echo "------------------------------------"
|
||||
rm -f i18n/*.qm
|
||||
|
||||
clean:
|
||||
@echo
|
||||
@echo "------------------------------------"
|
||||
@echo "Removing uic and rcc generated files"
|
||||
@echo "------------------------------------"
|
||||
rm $(COMPILED_UI_FILES) $(COMPILED_RESOURCE_FILES)
|
||||
|
||||
doc:
|
||||
@echo
|
||||
@echo "------------------------------------"
|
||||
@echo "Building documentation using sphinx."
|
||||
@echo "------------------------------------"
|
||||
cd help; make html
|
||||
|
||||
pylint:
|
||||
@echo
|
||||
@echo "-----------------"
|
||||
@echo "Pylint violations"
|
||||
@echo "-----------------"
|
||||
@pylint --reports=n --rcfile=pylintrc . || true
|
||||
@echo
|
||||
@echo "----------------------"
|
||||
@echo "If you get a 'no module named qgis.core' error, try sourcing"
|
||||
@echo "the helper script we have provided first then run make pylint."
|
||||
@echo "e.g. source run-env-linux.sh <path to qgis install>; make pylint"
|
||||
@echo "----------------------"
|
||||
|
||||
|
||||
# Run pep8 style checking
|
||||
#http://pypi.python.org/pypi/pep8
|
||||
pep8:
|
||||
@echo
|
||||
@echo "-----------"
|
||||
@echo "PEP8 issues"
|
||||
@echo "-----------"
|
||||
@pep8 --repeat --ignore=E203,E121,E122,E123,E124,E125,E126,E127,E128 --exclude $(PEP8EXCLUDE) . || true
|
||||
@echo "-----------"
|
||||
@echo "Ignored in PEP8 check:"
|
||||
@echo $(PEP8EXCLUDE)
|
||||
42
README.html
Normal file
42
README.html
Normal file
@ -0,0 +1,42 @@
|
||||
<html>
|
||||
<body>
|
||||
<h3>Plugin Builder Results</h3>
|
||||
|
||||
Congratulations! You just built a plugin for QGIS!<br/><br />
|
||||
|
||||
<div id='help' style='font-size:.9em;'>
|
||||
Your plugin <b>Pegelonline</b> was created in:<br>
|
||||
<b>/home/patrick/PycharmProjects/pegelonline</b>
|
||||
<p>
|
||||
Your QGIS plugin directory is located at:<br>
|
||||
<b>/home/patrick/.local/share/QGIS/QGIS3/profiles/default/python/plugins</b>
|
||||
<p>
|
||||
<h3>What's Next</h3>
|
||||
<ol>
|
||||
<li>In your plugin directory, compile the resources file using pyrcc5 (simply run <b>make</b> if you have automake or use <b>pb_tool</b>)
|
||||
<li>Test the generated sources using <b>make test</b> (or run tests from your IDE)
|
||||
<li>Copy the entire directory containing your new plugin to the QGIS plugin directory (see Notes below)
|
||||
<li>Test the plugin by enabling it in the QGIS plugin manager
|
||||
<li>Customize it by editing the implementation file <b>pegelonline.py</b>
|
||||
<li>Create your own custom icon, replacing the default <b>icon.png</b>
|
||||
<li>Modify your user interface by opening <b>pegelonline_dockwidget_base.ui</b> in Qt Designer
|
||||
</ol>
|
||||
Notes:
|
||||
<ul>
|
||||
<li>You can use the <b>Makefile</b> to compile and deploy when you
|
||||
make changes. This requires GNU make (gmake). The Makefile is ready to use, however you
|
||||
will have to edit it to add addional Python source files, dialogs, and translations.
|
||||
<li>You can also use <b>pb_tool</b> to compile and deploy your plugin. Tweak the <i>pb_tool.cfg</i> file included with your plugin as you add files. Install <b>pb_tool</b> using
|
||||
<i>pip</i> or <i>easy_install</i>. See <b>http://loc8.cc/pb_tool</b> for more information.
|
||||
</ul>
|
||||
</div>
|
||||
<div style='font-size:.9em;'>
|
||||
<p>
|
||||
For information on writing PyQGIS code, see <b>http://loc8.cc/pyqgis_resources</b> for a list of resources.
|
||||
</p>
|
||||
</div>
|
||||
<p>
|
||||
©2011-2018 GeoApt LLC - geoapt.com
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
32
README.txt
Normal file
32
README.txt
Normal file
@ -0,0 +1,32 @@
|
||||
Plugin Builder Results
|
||||
|
||||
Your plugin Pegelonline was created in:
|
||||
/home/patrick/PycharmProjects/pegelonline
|
||||
|
||||
Your QGIS plugin directory is located at:
|
||||
/home/patrick/.local/share/QGIS/QGIS3/profiles/default/python/plugins
|
||||
|
||||
What's Next:
|
||||
|
||||
* Copy the entire directory containing your new plugin to the QGIS plugin
|
||||
directory
|
||||
|
||||
* Compile the resources file using pyrcc5
|
||||
|
||||
* Run the tests (``make test``)
|
||||
|
||||
* Test the plugin by enabling it in the QGIS plugin manager
|
||||
|
||||
* Customize it by editing the implementation file: ``pegelonline.py``
|
||||
|
||||
* Create your own custom icon, replacing the default icon.png
|
||||
|
||||
* Modify your user interface by opening Pegelonline_dockwidget_base.ui in Qt Designer
|
||||
|
||||
* You can use the Makefile to compile your Ui and resource files when
|
||||
you make changes. This requires GNU make (gmake)
|
||||
|
||||
For more information, see the PyQGIS Developer Cookbook at:
|
||||
http://www.qgis.org/pyqgis-cookbook/index.html
|
||||
|
||||
(C) 2011-2018 GeoApt LLC - geoapt.com
|
||||
36
__init__.py
Normal file
36
__init__.py
Normal file
@ -0,0 +1,36 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
/***************************************************************************
|
||||
Pegelonline
|
||||
A QGIS plugin
|
||||
Lädt Daten von Pegelonline, bereitet sie für QGIS auf und stellt sie grafisch dar.
|
||||
Generated by Plugin Builder: http://g-sherman.github.io/Qgis-Plugin-Builder/
|
||||
-------------------
|
||||
begin : 2025-09-26
|
||||
copyright : (C) 2025 by Katrin Haßel
|
||||
email : s6kathom@uni-trier.de
|
||||
git sha : $Format:%H$
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
This script initializes the plugin, making it known to QGIS.
|
||||
"""
|
||||
|
||||
|
||||
# noinspection PyPep8Naming
|
||||
def classFactory(iface): # pylint: disable=invalid-name
|
||||
"""Load Pegelonline class from file Pegelonline.
|
||||
|
||||
:param iface: A QGIS interface instance.
|
||||
:type iface: QgsInterface
|
||||
"""
|
||||
#
|
||||
from .pegelonline import Pegelonline
|
||||
return Pegelonline(iface)
|
||||
47
metadata.txt
Normal file
47
metadata.txt
Normal file
@ -0,0 +1,47 @@
|
||||
# This file contains metadata for your plugin.
|
||||
|
||||
# This file should be included when you package your plugin.# Mandatory items:
|
||||
|
||||
[general]
|
||||
name=Pegelonline
|
||||
qgisMinimumVersion=3.0
|
||||
description=Lädt Daten von Pegelonline, bereitet sie für QGIS auf und stellt sie grafisch dar.
|
||||
version=0.1
|
||||
author=Katrin Haßel
|
||||
email=s6kathom@uni-trier.de
|
||||
|
||||
about=Lädt Daten von Pegelonline, bereitet sie für QGIS auf und stellt sie grafisch dar.
|
||||
|
||||
tracker=http://bugs
|
||||
repository=http://repo
|
||||
# End of mandatory metadata
|
||||
|
||||
# Recommended items:
|
||||
|
||||
hasProcessingProvider=no
|
||||
# Uncomment the following line and add your changelog:
|
||||
# changelog=
|
||||
|
||||
# Tags are comma separated with spaces allowed
|
||||
tags=python
|
||||
|
||||
homepage=http://homepage
|
||||
category=Plugins
|
||||
icon=icon.png
|
||||
# experimental flag
|
||||
experimental=False
|
||||
|
||||
# deprecated flag (applies to the whole plugin, not just a single version)
|
||||
deprecated=False
|
||||
|
||||
# Since QGIS 3.8, a comma separated list of plugins to be installed
|
||||
# (or upgraded) can be specified.
|
||||
# Check the documentation for more information.
|
||||
# plugin_dependencies=
|
||||
|
||||
Category of the plugin: Raster, Vector, Database or Web
|
||||
# category=
|
||||
|
||||
# If the plugin can run on QGIS Server.
|
||||
server=False
|
||||
|
||||
80
pb_tool.cfg
Normal file
80
pb_tool.cfg
Normal file
@ -0,0 +1,80 @@
|
||||
#/***************************************************************************
|
||||
# Pegelonline
|
||||
#
|
||||
# Configuration file for plugin builder tool (pb_tool)
|
||||
# Generated by Plugin Builder: http://g-sherman.github.io/Qgis-Plugin-Builder/
|
||||
# -------------------
|
||||
# begin : 2025-09-26
|
||||
# copyright : (C) 2025 by Katrin Haßel
|
||||
# email : s6kathom@uni-trier.de
|
||||
# ***************************************************************************/
|
||||
#
|
||||
#/***************************************************************************
|
||||
# * *
|
||||
# * This program is free software; you can redistribute it and/or modify *
|
||||
# * it under the terms of the GNU General Public License as published by *
|
||||
# * the Free Software Foundation; either version 2 of the License, or *
|
||||
# * (at your option) any later version. *
|
||||
# * *
|
||||
# ***************************************************************************/
|
||||
#
|
||||
#
|
||||
# You can install pb_tool using:
|
||||
# pip install http://geoapt.net/files/pb_tool.zip
|
||||
#
|
||||
# Consider doing your development (and install of pb_tool) in a virtualenv.
|
||||
#
|
||||
# For details on setting up and using pb_tool, see:
|
||||
# http://g-sherman.github.io/plugin_build_tool/
|
||||
#
|
||||
# Issues and pull requests here:
|
||||
# https://github.com/g-sherman/plugin_build_tool:
|
||||
#
|
||||
# Sane defaults for your plugin generated by the Plugin Builder are
|
||||
# already set below.
|
||||
#
|
||||
# As you add Python source files and UI files to your plugin, add
|
||||
# them to the appropriate [files] section below.
|
||||
|
||||
[plugin]
|
||||
# Name of the plugin. This is the name of the directory that will
|
||||
# be created in .qgis2/python/plugins
|
||||
name: pegelonline
|
||||
|
||||
# Full path to where you want your plugin directory copied. If empty,
|
||||
# the QGIS default path will be used. Don't include the plugin name in
|
||||
# the path.
|
||||
plugin_path:/home/patrick/.local/share/QGIS/QGIS3/profiles/default/python/plugins
|
||||
|
||||
[files]
|
||||
# Python files that should be deployed with the plugin
|
||||
python_files: __init__.py pegelonline.py pegelonline_dockwidget.py po_runner.py poGraph2.py
|
||||
|
||||
# The main dialog file that is loaded (not compiled)
|
||||
main_dialog: pegelonline_dockwidget_base.ui
|
||||
|
||||
# Other ui files for dialogs you create (these will be compiled)
|
||||
compiled_ui_files:
|
||||
|
||||
# Resource file(s) that will be compiled
|
||||
resource_files: resources.qrc
|
||||
|
||||
# Other files required for the plugin
|
||||
extras: metadata.txt icon.png
|
||||
|
||||
# Other directories to be deployed with the plugin.
|
||||
# These must be subdirectories under the plugin directory
|
||||
extra_dirs: pomodules basemap
|
||||
|
||||
# ISO code(s) for any locales (translations), separated by spaces.
|
||||
# Corresponding .ts files must exist in the i18n directory
|
||||
locales:
|
||||
|
||||
[help]
|
||||
# the built help directory that should be deployed with the plugin
|
||||
dir: help/build/html
|
||||
# the name of the directory to target in the deployed plugin
|
||||
target: help
|
||||
|
||||
|
||||
|
||||
225
pegelonline.py
Normal file
225
pegelonline.py
Normal file
@ -0,0 +1,225 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
/***************************************************************************
|
||||
Pegelonline
|
||||
A QGIS plugin
|
||||
Lädt Daten von Pegelonline, bereitet sie für QGIS auf und stellt sie grafisch dar.
|
||||
Generated by Plugin Builder: http://g-sherman.github.io/Qgis-Plugin-Builder/
|
||||
-------------------
|
||||
begin : 2025-09-26
|
||||
git sha : $Format:%H$
|
||||
copyright : (C) 2025 by Katrin Haßel
|
||||
email : s6kathom@uni-trier.de
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
"""
|
||||
import os.path
|
||||
|
||||
from qgis.PyQt.QtCore import QSettings, QTranslator, QCoreApplication, Qt
|
||||
from qgis.PyQt.QtGui import QIcon
|
||||
from qgis.PyQt.QtWidgets import QAction
|
||||
|
||||
from .pegelonline_dockwidget import PegelonlineDockWidget
|
||||
from .po_runner import PoRunner
|
||||
|
||||
|
||||
class Pegelonline:
|
||||
"""QGIS Plugin Implementation."""
|
||||
|
||||
def __init__(self, iface):
|
||||
"""Constructor.
|
||||
|
||||
:param iface: An interface instance that will be passed to this class
|
||||
which provides the hook by which you can manipulate the QGIS
|
||||
application at run time.
|
||||
:type iface: QgsInterface
|
||||
"""
|
||||
# Save reference to the QGIS interface
|
||||
self.iface = iface
|
||||
|
||||
# initialize plugin directory
|
||||
self.plugin_dir = os.path.dirname(__file__)
|
||||
|
||||
# initialize locale
|
||||
locale = QSettings().value('locale/userLocale')[0:2]
|
||||
locale_path = os.path.join(
|
||||
self.plugin_dir,
|
||||
'i18n',
|
||||
'Pegelonline_{}.qm'.format(locale))
|
||||
|
||||
if os.path.exists(locale_path):
|
||||
self.translator = QTranslator()
|
||||
self.translator.load(locale_path)
|
||||
QCoreApplication.installTranslator(self.translator)
|
||||
|
||||
# Declare instance attributes
|
||||
self.actions = []
|
||||
self.menu = self.tr(u'&Pegelonline')
|
||||
# TODO: We are going to let the user set this up in a future iteration
|
||||
self.toolbar = self.iface.addToolBar(u'Pegelonline')
|
||||
self.toolbar.setObjectName(u'Pegelonline')
|
||||
|
||||
# print "** INITIALIZING Pegelonline"
|
||||
|
||||
self.pluginIsActive = False
|
||||
self.dockwidget = None
|
||||
|
||||
# noinspection PyMethodMayBeStatic
|
||||
def tr(self, message):
|
||||
"""Get the translation for a string using Qt translation API.
|
||||
|
||||
We implement this ourselves since we do not inherit QObject.
|
||||
|
||||
:param message: String for translation.
|
||||
:type message: str, QString
|
||||
|
||||
:returns: Translated version of message.
|
||||
:rtype: QString
|
||||
"""
|
||||
# noinspection PyTypeChecker,PyArgumentList,PyCallByClass
|
||||
return QCoreApplication.translate('Pegelonline', message)
|
||||
|
||||
def add_action(
|
||||
self,
|
||||
icon_path,
|
||||
text,
|
||||
callback,
|
||||
enabled_flag=True,
|
||||
add_to_menu=True,
|
||||
add_to_toolbar=True,
|
||||
status_tip=None,
|
||||
whats_this=None,
|
||||
parent=None):
|
||||
"""Add a toolbar icon to the toolbar.
|
||||
|
||||
:param icon_path: Path to the icon for this action. Can be a resource
|
||||
path (e.g. ':/plugins/foo/bar.png') or a normal file system path.
|
||||
:type icon_path: str
|
||||
|
||||
:param text: Text that should be shown in menu items for this action.
|
||||
:type text: str
|
||||
|
||||
:param callback: Function to be called when the action is triggered.
|
||||
:type callback: function
|
||||
|
||||
:param enabled_flag: A flag indicating if the action should be enabled
|
||||
by default. Defaults to True.
|
||||
:type enabled_flag: bool
|
||||
|
||||
:param add_to_menu: Flag indicating whether the action should also
|
||||
be added to the menu. Defaults to True.
|
||||
:type add_to_menu: bool
|
||||
|
||||
:param add_to_toolbar: Flag indicating whether the action should also
|
||||
be added to the toolbar. Defaults to True.
|
||||
:type add_to_toolbar: bool
|
||||
|
||||
:param status_tip: Optional text to show in a popup when mouse pointer
|
||||
hovers over the action.
|
||||
:type status_tip: str
|
||||
|
||||
:param parent: Parent widget for the new action. Defaults None.
|
||||
:type parent: QWidget
|
||||
|
||||
:param whats_this: Optional text to show in the status bar when the
|
||||
mouse pointer hovers over the action.
|
||||
|
||||
:returns: The action that was created. Note that the action is also
|
||||
added to self.actions list.
|
||||
:rtype: QAction
|
||||
"""
|
||||
|
||||
icon = QIcon(icon_path)
|
||||
action = QAction(icon, text, parent)
|
||||
action.triggered.connect(callback)
|
||||
action.setEnabled(enabled_flag)
|
||||
|
||||
if status_tip is not None:
|
||||
action.setStatusTip(status_tip)
|
||||
|
||||
if whats_this is not None:
|
||||
action.setWhatsThis(whats_this)
|
||||
|
||||
if add_to_toolbar:
|
||||
self.toolbar.addAction(action)
|
||||
|
||||
if add_to_menu:
|
||||
self.iface.addPluginToMenu(
|
||||
self.menu,
|
||||
action)
|
||||
|
||||
self.actions.append(action)
|
||||
|
||||
return action
|
||||
|
||||
def initGui(self):
|
||||
"""Create the menu entries and toolbar icons inside the QGIS GUI."""
|
||||
|
||||
icon_path = ':/plugins/pegelonline/icon.png'
|
||||
self.add_action(
|
||||
icon_path,
|
||||
text=self.tr(u'Pegelonline'),
|
||||
callback=self.run,
|
||||
parent=self.iface.mainWindow())
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
def onClosePlugin(self):
|
||||
"""Cleanup necessary items here when plugin dockwidget is closed"""
|
||||
|
||||
# print "** CLOSING Pegelonline"
|
||||
|
||||
# disconnects
|
||||
self.dockwidget.closingPlugin.disconnect(self.onClosePlugin)
|
||||
|
||||
# remove this statement if dockwidget is to remain
|
||||
# for reuse if plugin is reopened
|
||||
# Commented next statement since it causes QGIS crashe
|
||||
# when closing the docked window:
|
||||
# self.dockwidget = None
|
||||
|
||||
self.pluginIsActive = False
|
||||
|
||||
def unload(self):
|
||||
"""Removes the plugin menu item and icon from QGIS GUI."""
|
||||
|
||||
# print "** UNLOAD Pegelonline"
|
||||
|
||||
for action in self.actions:
|
||||
self.iface.removePluginMenu(
|
||||
self.tr(u'&Pegelonline'),
|
||||
action)
|
||||
self.iface.removeToolBarIcon(action)
|
||||
# remove the toolbar
|
||||
del self.toolbar
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
def run(self):
|
||||
"""Run method that loads and starts the plugin"""
|
||||
|
||||
if not self.pluginIsActive:
|
||||
self.pluginIsActive = True
|
||||
|
||||
print("** STARTING Pegelonline")
|
||||
|
||||
if self.dockwidget == None:
|
||||
# Create the dockwidget (after translation) and keep reference
|
||||
self.dockwidget = PegelonlineDockWidget()
|
||||
self.runner = PoRunner(self.dockwidget, self.iface)
|
||||
|
||||
# connect to provide cleanup on closing of dockwidget
|
||||
self.dockwidget.closingPlugin.connect(self.onClosePlugin)
|
||||
|
||||
# show the dockwidget
|
||||
# TODO: fix to allow choice of dock location
|
||||
self.iface.addDockWidget(Qt.LeftDockWidgetArea, self.dockwidget)
|
||||
self.dockwidget.show()
|
||||
48
pegelonline_dockwidget.py
Normal file
48
pegelonline_dockwidget.py
Normal file
@ -0,0 +1,48 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
/***************************************************************************
|
||||
PegelonlineDockWidget
|
||||
A QGIS plugin
|
||||
Lädt Daten von Pegelonline, bereitet sie für QGIS auf und stellt sie grafisch dar.
|
||||
Generated by Plugin Builder: http://g-sherman.github.io/Qgis-Plugin-Builder/
|
||||
-------------------
|
||||
begin : 2025-09-26
|
||||
git sha : $Format:%H$
|
||||
copyright : (C) 2025 by Katrin Haßel
|
||||
email : s6kathom@uni-trier.de
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
from qgis.PyQt import QtWidgets, uic
|
||||
from qgis.PyQt.QtCore import pyqtSignal
|
||||
|
||||
FORM_CLASS, _ = uic.loadUiType(os.path.join(os.path.dirname(__file__), 'pegelonline_dockwidget_base.ui'))
|
||||
|
||||
|
||||
class PegelonlineDockWidget(QtWidgets.QDockWidget, FORM_CLASS):
|
||||
closingPlugin = pyqtSignal()
|
||||
|
||||
def __init__(self, parent=None):
|
||||
"""Constructor."""
|
||||
super(PegelonlineDockWidget, self).__init__(parent)
|
||||
# Set up the user interface from Designer.
|
||||
# After setupUI you can access any designer object by doing
|
||||
# self.<objectname>, and you can use autoconnect slots - see
|
||||
# http://doc.qt.io/qt-5/designer-using-a-ui-file.html
|
||||
# #widgets-and-dialogs-with-auto-connect
|
||||
self.setupUi(self)
|
||||
|
||||
def closeEvent(self, event):
|
||||
self.closingPlugin.emit()
|
||||
event.accept()
|
||||
107
pegelonline_dockwidget_base.ui
Normal file
107
pegelonline_dockwidget_base.ui
Normal file
@ -0,0 +1,107 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>PegelOnlineDockWidgetBase</class>
|
||||
<widget class="QDockWidget" name="PegelOnlineDockWidgetBase">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>395</width>
|
||||
<height>365</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>524287</width>
|
||||
<height>524287</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Pegelonline</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="dockWidgetContents">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="1" column="0">
|
||||
<widget class="QGroupBox" name="gbShowMap">
|
||||
<property name="title">
|
||||
<string>Wasserstandinformationen anzeigen:</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cbStationsVisible">
|
||||
<property name="text">
|
||||
<string>Stationen anzeigen</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cbWaterlevelsVisible">
|
||||
<property name="text">
|
||||
<string>Wasserstände anzeigen</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cbBasemapLinesVisible">
|
||||
<property name="text">
|
||||
<string>Basiskarte Flüsse anzeigen</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cbBasemapAreasVisible">
|
||||
<property name="text">
|
||||
<string>Basiskarte Flächen anzeigen</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cbWaterlevelsLabelsVisible">
|
||||
<property name="text">
|
||||
<string>Beschriftungen</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="rbShowTrend">
|
||||
<property name="text">
|
||||
<string>Trend</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">rbValue</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="rbShowAbsValues">
|
||||
<property name="text">
|
||||
<string>Absolutwerte (in cm)</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">rbValue</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="PoGraphDisplay" name="poGraphDisplay" native="true"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>PoGraphDisplay</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>pegelonline.poGraph2</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
<buttongroups>
|
||||
<buttongroup name="rbValue"/>
|
||||
</buttongroups>
|
||||
</ui>
|
||||
117
poGraph2.py
Normal file
117
poGraph2.py
Normal file
@ -0,0 +1,117 @@
|
||||
import ctypes
|
||||
from urllib.parse import quote
|
||||
|
||||
from PyQt5 import QtCore, QtGui
|
||||
from PyQt5 import QtWidgets
|
||||
|
||||
from .pomodules import poBaseURL
|
||||
from .pomodules.urlreader import UrlReader
|
||||
|
||||
|
||||
class PoGraphDisplay(QtWidgets.QWidget):
|
||||
|
||||
def __init__(self, parent=None):
|
||||
QtWidgets.QWidget.__init__(self, parent)
|
||||
self.setupUi(self)
|
||||
|
||||
# Layer
|
||||
self.layer = None
|
||||
|
||||
def setupUi(self, poGraphDisplay):
|
||||
"""Definition der Benutzeroberflaeche des Wasserstanddiagramms mit den dazugehoerigen Funktionen."""
|
||||
|
||||
# uebergeordnetes Layout
|
||||
self.verticalLayout = QtWidgets.QVBoxLayout(poGraphDisplay)
|
||||
|
||||
# Erste Zeile ---
|
||||
|
||||
self.horizontalLayout = QtWidgets.QHBoxLayout()
|
||||
|
||||
# Label Station
|
||||
self.lbStation = QtWidgets.QLabel()
|
||||
self.lbStation.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter)
|
||||
self.horizontalLayout.addWidget(self.lbStation)
|
||||
self.lbStation.setText("Geben Sie hier eine Station ein:")
|
||||
|
||||
# ComboBox Stations
|
||||
self.comboBox = QtWidgets.QComboBox()
|
||||
self.comboBox.setEditable(True)
|
||||
self.horizontalLayout.addWidget(self.comboBox)
|
||||
|
||||
# Label Tage
|
||||
self.lbTage = QtWidgets.QLabel()
|
||||
self.lbTage.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter)
|
||||
self.lbTage.setText("Tage")
|
||||
self.horizontalLayout.addWidget(self.lbTage)
|
||||
|
||||
# SpinBox Tage
|
||||
self.sbTage = QtWidgets.QSpinBox()
|
||||
self.sbTage.setMinimum(5)
|
||||
self.sbTage.setMaximum(30)
|
||||
self.sbTage.setProperty("value", 14)
|
||||
self.horizontalLayout.addWidget(self.sbTage)
|
||||
|
||||
# PushButton Laden
|
||||
self.pbLaden = QtWidgets.QPushButton()
|
||||
self.pbLaden.setObjectName("pbLaden")
|
||||
self.pbLaden.setText("Laden")
|
||||
self.horizontalLayout.addWidget(self.pbLaden)
|
||||
|
||||
# Signal Slots
|
||||
self.pbLaden.clicked.connect(self.doPbLaden)
|
||||
self.verticalLayout.addLayout(self.horizontalLayout)
|
||||
|
||||
# Zweite Zeile ---
|
||||
|
||||
# Label fuer den Graphen
|
||||
self.lbGraph = QtWidgets.QLabel()
|
||||
self.lbGraph.setText("")
|
||||
self.lbGraph.setObjectName("lbGraph")
|
||||
self.verticalLayout.addWidget(self.lbGraph)
|
||||
|
||||
# Quellenhinweis
|
||||
self.lbDatenquelle = QtWidgets.QLabel()
|
||||
self.lbDatenquelle.setAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignLeading | QtCore.Qt.AlignVCenter)
|
||||
self.lbDatenquelle.setText("Die Daten werden von 'pegelonline.wsv.de' zur Verfügung gestellt.")
|
||||
self.verticalLayout.addWidget(self.lbDatenquelle)
|
||||
|
||||
# Dritte Zeile ---
|
||||
|
||||
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||
self.verticalLayout.addItem(spacerItem)
|
||||
|
||||
def doLoadGraph(self):
|
||||
"""Laedt die Stationsdaten anhand der vom Nutzer eingegebenen Daten."""
|
||||
|
||||
# Anzahl der Tage in der SpinBox
|
||||
days = self.getCurrentDays()
|
||||
|
||||
# Stationsname aus der ComboBox
|
||||
station = quote(self.getCurrentStation())
|
||||
url = poBaseURL + "/stations/%s/W/measurements.png?start=P%dD" % (station, days)
|
||||
ur = UrlReader(url)
|
||||
self.img_data = ur.getDataResponse()
|
||||
|
||||
if ur.code > 299:
|
||||
AlertBox = ctypes.windll.user32.MessageBoxW
|
||||
AlertBox(None, "Beim Laden der Daten ist ein Fehler aufgetreten.", "Fehler", 0)
|
||||
|
||||
else:
|
||||
# Grafik einsetzen
|
||||
pixmap = QtGui.QPixmap()
|
||||
pixmap.loadFromData(self.img_data)
|
||||
self.lbGraph.clear()
|
||||
self.lbGraph.setPixmap(pixmap)
|
||||
self.lbGraph.resize(pixmap.width(), pixmap.height())
|
||||
|
||||
def doPbLaden(self):
|
||||
"""Laedt den Graphen der ausgewaehlten Station."""
|
||||
|
||||
if self.layer is None:
|
||||
self.doLoadGraph()
|
||||
|
||||
def getCurrentDays(self):
|
||||
return self.sbTage.value()
|
||||
|
||||
def getCurrentStation(self):
|
||||
return self.comboBox.currentText()
|
||||
201
po_runner.py
Normal file
201
po_runner.py
Normal file
@ -0,0 +1,201 @@
|
||||
import os.path
|
||||
from typing import Callable
|
||||
|
||||
from qgis._core import QgsVectorLayer, QgsProject, QgsLayerTreeLayer
|
||||
|
||||
from .pegelonline_dockwidget import PegelonlineDockWidget
|
||||
from .pomodules.poqgscurrentw import PoQgsCurrentW
|
||||
from .pomodules.poqgsstations import PoQgsStations
|
||||
|
||||
|
||||
# noinspection PyMethodMayBeStatic
|
||||
class PoRunner(object):
|
||||
|
||||
def __init__(self, ui: PegelonlineDockWidget, iface):
|
||||
self.ui: PegelonlineDockWidget = ui
|
||||
self.iface = iface
|
||||
self.local_dir = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
# Layer Variablen
|
||||
self.layer_stations = None
|
||||
self.layer_waterlevels = None
|
||||
self.basemap_lines = None
|
||||
self.basemap_areas = None
|
||||
|
||||
# connect ui signals
|
||||
self.ui.cbStationsVisible.toggled.connect(self.cbStationsVisibleToggled)
|
||||
self.ui.cbWaterlevelsVisible.toggled.connect(self.cbWaterlevelsVisibleToggled)
|
||||
self.ui.cbBasemapLinesVisible.toggled.connect(self.cbBasemapLinesVisibleToggled)
|
||||
self.ui.cbBasemapAreasVisible.toggled.connect(self.cbBasemapAreasVisibleToggled)
|
||||
self.ui.cbWaterlevelsLabelsVisible.toggled.connect(self.cbWaterlevelsLabelsVisibleToggled)
|
||||
self.ui.rbValue.buttonClicked.connect(self.rbValueChanged)
|
||||
|
||||
def loadStations(self):
|
||||
print("loadStations")
|
||||
reader = PoQgsStations()
|
||||
self.layer_stations = self._layerFromReader(reader.fields, reader.crs, reader.getStationsFeatures(), "Stationen")
|
||||
self._layerShow(self.layer_stations, "styles/label_stations.qml", self.disconnectStations)
|
||||
|
||||
def loadWaterlevels(self):
|
||||
print("loadWaterlevels")
|
||||
reader = PoQgsCurrentW()
|
||||
self.layer_waterlevels = self._layerFromReader(reader.fields, reader.crs, reader.getCurrentWFeatures(), "Wasserstandinformationen")
|
||||
self._layerShow(self.layer_waterlevels, "styles/label_currentw.qml", self.disconnectWaterlevels)
|
||||
|
||||
def _layerFromReader(self, fields, crs, features, title) -> None | QgsVectorLayer:
|
||||
print("_layerFromReader")
|
||||
if features is None:
|
||||
return None
|
||||
|
||||
layer_path = "Point?crs=%s" % (crs.authid(),)
|
||||
print("layer_path: " + layer_path)
|
||||
|
||||
layer = QgsVectorLayer(layer_path, title, "memory")
|
||||
layer.updateFields()
|
||||
layer.updateExtents()
|
||||
layer.commitChanges()
|
||||
|
||||
provider = layer.dataProvider()
|
||||
provider.addAttributes(fields)
|
||||
provider.addFeatures(features)
|
||||
|
||||
if layer.isValid():
|
||||
return layer
|
||||
|
||||
return None
|
||||
|
||||
def _layerShow(self, layer: QgsVectorLayer, styles_path: str, disconnect: Callable[[], None]):
|
||||
print("_layerShow")
|
||||
if layer is None:
|
||||
print("_layerShow: Übergebener Layer ist None")
|
||||
return
|
||||
|
||||
# Styles laden
|
||||
layer.loadNamedStyle(os.path.join(self.local_dir, styles_path))
|
||||
|
||||
# disconnect setzen
|
||||
layer.willBeDeleted.connect(disconnect)
|
||||
|
||||
# zur Instanz hinzufügen
|
||||
QgsProject.instance().addMapLayer(layer, False)
|
||||
|
||||
# zum LayerTree hinzufügen
|
||||
layer_tree = self.iface.layerTreeCanvasBridge().rootGroup()
|
||||
layer_tree.insertChildNode(0, QgsLayerTreeLayer(layer))
|
||||
|
||||
self._layerSetVisible(layer, True)
|
||||
self._layerRefresh(layer)
|
||||
|
||||
def _layerRefresh(self, layer):
|
||||
print("_layerRefresh")
|
||||
if self.iface.mapCanvas().isCachingEnabled():
|
||||
layer.triggerRepaint()
|
||||
else:
|
||||
self.iface.mapCanvas().refresh()
|
||||
|
||||
def cbBasemapLinesVisibleToggled(self):
|
||||
checked = self.ui.cbBasemapLinesVisible.isChecked()
|
||||
print("cbBasemapLinesVisibleToggled: %s" % (checked,))
|
||||
|
||||
if self.basemap_lines is None and checked:
|
||||
self.basemap_lines = self._basemapCreate("waters.gpkg|layername=water_l", "Flüsse", self.disconnectBasemapLines)
|
||||
|
||||
if self.basemap_lines is not None:
|
||||
self._layerSetVisible(self.basemap_lines, checked)
|
||||
|
||||
def cbBasemapAreasVisibleToggled(self):
|
||||
checked = self.ui.cbBasemapAreasVisible.isChecked()
|
||||
print("cbBasemapAreasVisibleToggled: %s" % (checked,))
|
||||
|
||||
if self.basemap_areas is None and checked:
|
||||
self.basemap_areas = self._basemapCreate("waters.gpkg|layername=water_f", "Flächen", self.disconnectBasemapAreas)
|
||||
|
||||
if self.basemap_areas is not None:
|
||||
self._layerSetVisible(self.basemap_areas, checked)
|
||||
|
||||
def _basemapCreate(self, path, name, disconnect: Callable[[], None]) -> None | QgsVectorLayer:
|
||||
print("_basemapCreate: %s" % (name,))
|
||||
path = os.path.join(self.local_dir, "basemap", path)
|
||||
basemap = QgsVectorLayer(path, name, "ogr")
|
||||
|
||||
if not basemap.isValid():
|
||||
print("_basemapCreate: QgsVectorLayer nicht gültig: path=%s, name=%s" % (path, name))
|
||||
return None
|
||||
|
||||
# disconnect setzen
|
||||
basemap.willBeDeleted.connect(disconnect)
|
||||
|
||||
# zur Instanz hinzufügen
|
||||
QgsProject.instance().addMapLayer(basemap, False)
|
||||
|
||||
# zum LayerTree hinzufügen
|
||||
layer_tree = self.iface.layerTreeCanvasBridge().rootGroup()
|
||||
layer_tree.insertChildNode(-1, QgsLayerTreeLayer(basemap))
|
||||
|
||||
return basemap
|
||||
|
||||
def _layerSetVisible(self, basemap: QgsVectorLayer, visible):
|
||||
print("_layerSetVisible: %s => %s" % (basemap.name, visible))
|
||||
layer_tree = QgsProject.instance().layerTreeRoot().findLayer(basemap.id())
|
||||
layer_tree.setItemVisibilityChecked(visible)
|
||||
self._layerRefresh(basemap)
|
||||
|
||||
def cbStationsVisibleToggled(self):
|
||||
visible = self.ui.cbStationsVisible.isChecked()
|
||||
print("cbStationsVisibleToggled: %s" % (visible,))
|
||||
|
||||
if self.layer_stations is None and visible:
|
||||
self.loadStations()
|
||||
|
||||
if self.layer_stations is not None:
|
||||
self.layer_stations.setLabelsEnabled(visible)
|
||||
self._layerSetVisible(self.layer_stations, visible)
|
||||
self._layerRefresh(self.layer_stations)
|
||||
|
||||
def cbWaterlevelsVisibleToggled(self):
|
||||
visible = self.ui.cbWaterlevelsVisible.isChecked()
|
||||
print("cbWaterlevelsVisibleToggled: %s" % (visible,))
|
||||
|
||||
if self.layer_waterlevels is None:
|
||||
self.loadWaterlevels()
|
||||
|
||||
if self.layer_waterlevels is not None:
|
||||
self.layer_waterlevels.setLabelsEnabled(visible)
|
||||
self._layerSetVisible(self.layer_waterlevels, visible)
|
||||
self._layerRefresh(self.layer_waterlevels)
|
||||
|
||||
def cbWaterlevelsLabelsVisibleToggled(self):
|
||||
print("cbWaterlevelsLabelsVisibleToggled: %s" % (self.ui.cbWaterlevelsVisible.isChecked(),))
|
||||
# TODO
|
||||
|
||||
def rbValueChanged(self, button):
|
||||
print("rbValueChanged")
|
||||
if self.layer_waterlevels is None:
|
||||
self.loadWaterlevels()
|
||||
|
||||
if button.objectName() == "rbShowTrend":
|
||||
self.layer_waterlevels.loadNamedStyle(os.path.join(self.local_dir, "styles/label_currentw_trend.qml"))
|
||||
elif button.objectName() == "rbShowAbsValues":
|
||||
self.layer_waterlevels.loadNamedStyle(os.path.join(self.local_dir, "styles/label_currentw_absvalue.qml"))
|
||||
|
||||
self.cbWaterlevelsVisibleToggled()
|
||||
|
||||
def disconnectStations(self):
|
||||
print("disconnectStations")
|
||||
self.layer_stations = None
|
||||
self.ui.cbStationsVisible.setChecked(False)
|
||||
|
||||
def disconnectWaterlevels(self):
|
||||
print("disconnectWaterlevels")
|
||||
self.layer_waterlevels = None
|
||||
self.ui.cbWaterlevelsVisible.setChecked(False)
|
||||
|
||||
def disconnectBasemapLines(self):
|
||||
print("disconnectBasemapLines")
|
||||
self.basemap_lines = None
|
||||
self.ui.cbBasemapLinesVisible.setChecked(False)
|
||||
|
||||
def disconnectBasemapAreas(self):
|
||||
print("disconnectBasemapAreas")
|
||||
self.basemap_areas = None
|
||||
self.ui.cbBasemapAreasVisible.setChecked(False)
|
||||
1
pomodules/__init__.py
Normal file
1
pomodules/__init__.py
Normal file
@ -0,0 +1 @@
|
||||
poBaseURL = 'https://www.pegelonline.wsv.de/webservices/rest-api/v2/'
|
||||
45
pomodules/pocurrentw.py
Normal file
45
pomodules/pocurrentw.py
Normal file
@ -0,0 +1,45 @@
|
||||
from . import poBaseURL
|
||||
from .urlreader import UrlReader
|
||||
|
||||
|
||||
class PoCurrentW(object):
|
||||
|
||||
def __init__(self):
|
||||
self.url = poBaseURL + 'stations.json?timeseries=W&includeTimeseries=true&includeCurrentMeasurement=true'
|
||||
|
||||
def getCurrentW(self):
|
||||
print("getCurrentW: Getting data...")
|
||||
|
||||
reader = UrlReader(self.url)
|
||||
stations_json = reader.getJsonResponse()
|
||||
if stations_json is None:
|
||||
print("getCurrentW: FEHLER: Keine Stationen erhalten")
|
||||
return None
|
||||
|
||||
print("getCurrentW: %d Stationen erhalten" % (len(stations_json),))
|
||||
|
||||
stations = []
|
||||
for station_json in stations_json:
|
||||
if 'longitude' not in station_json or 'latitude' not in station_json or 'km' not in station_json:
|
||||
print("getCurrentW: WARN: Station hat fehlende Attribute: %s" % (station_json['longname'],))
|
||||
continue
|
||||
|
||||
stations.append(
|
||||
{
|
||||
'geometry': {
|
||||
'longitude': station_json['longitude'],
|
||||
'latitude': station_json['latitude'],
|
||||
},
|
||||
'attributes': {
|
||||
'uuid': station_json['uuid'],
|
||||
'shortname': station_json['shortname'],
|
||||
'timestamp': station_json['timeseries'][0]['currentMeasurement']['timestamp'],
|
||||
'value': station_json['timeseries'][0]['currentMeasurement']['value'],
|
||||
'stateMnwMhw': station_json['timeseries'][0]['currentMeasurement']['stateMnwMhw'],
|
||||
'stateNswHsw': station_json['timeseries'][0]['currentMeasurement']['stateNswHsw'],
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
print("getCurrentW: %d / %d Stationen überführt" % (len(stations), len(stations_json)))
|
||||
return stations
|
||||
44
pomodules/poqgscurrentw.py
Normal file
44
pomodules/poqgscurrentw.py
Normal file
@ -0,0 +1,44 @@
|
||||
from PyQt5.QtCore import QVariant
|
||||
from qgis._core import QgsCoordinateReferenceSystem, QgsGeometry, QgsPointXY
|
||||
from qgis.core import QgsFields, QgsFeature, QgsField
|
||||
|
||||
from .pocurrentw import PoCurrentW
|
||||
|
||||
|
||||
class PoQgsCurrentW(PoCurrentW):
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.crs = QgsCoordinateReferenceSystem(4326, QgsCoordinateReferenceSystem.EpsgCrsId)
|
||||
|
||||
self.fields = QgsFields()
|
||||
self.fields.append(QgsField('timestamp', QVariant.DateTime))
|
||||
self.fields.append(QgsField('value', QVariant.Double))
|
||||
self.fields.append(QgsField('stateMnwMhw', QVariant.String))
|
||||
self.fields.append(QgsField('stateNswHsw', QVariant.String))
|
||||
|
||||
def getCurrentWFeatures(self):
|
||||
print("getCurrentWFeatures: Erzeuge Features...")
|
||||
|
||||
features = []
|
||||
for station in self.getCurrentW():
|
||||
feature = self._getFeatureForStation(station)
|
||||
features.append(feature)
|
||||
|
||||
print("getCurrentWFeatures: %d Features erzeugt" % (len(features),))
|
||||
return features
|
||||
|
||||
def _getFeatureForStation(self, station):
|
||||
feature = QgsFeature()
|
||||
|
||||
longitude = station['geometry']['longitude']
|
||||
latitude = station['geometry']['latitude']
|
||||
feature.setGeometry(QgsGeometry.fromPointXY(QgsPointXY(longitude, latitude)))
|
||||
|
||||
feature.setFields(self.fields)
|
||||
feature.setAttribute('timestamp', station['attributes']['timestamp'])
|
||||
feature.setAttribute('value', station['attributes']['value'])
|
||||
feature.setAttribute('stateMnwMhw', station['attributes']['stateMnwMhw'])
|
||||
feature.setAttribute('stateNswHsw', station['attributes']['stateNswHsw'])
|
||||
|
||||
return feature
|
||||
50
pomodules/poqgsstations.py
Normal file
50
pomodules/poqgsstations.py
Normal file
@ -0,0 +1,50 @@
|
||||
from PyQt5.QtCore import QVariant
|
||||
from qgis._core import QgsCoordinateReferenceSystem, QgsGeometry, QgsPointXY
|
||||
from qgis.core import QgsFields, QgsFeature, QgsField
|
||||
|
||||
from .postations import PoStations
|
||||
|
||||
|
||||
class PoQgsStations(PoStations):
|
||||
|
||||
def __init__(self):
|
||||
PoStations.__init__(self)
|
||||
self.crs = QgsCoordinateReferenceSystem(4326, QgsCoordinateReferenceSystem.EpsgCrsId)
|
||||
|
||||
self.fields = QgsFields()
|
||||
self.fields.append(QgsField('uuid', QVariant.String))
|
||||
self.fields.append(QgsField('number', QVariant.Int))
|
||||
self.fields.append(QgsField('shortname', QVariant.String))
|
||||
self.fields.append(QgsField('longname', QVariant.String))
|
||||
self.fields.append(QgsField('km', QVariant.Double))
|
||||
self.fields.append(QgsField('agency', QVariant.String))
|
||||
self.fields.append(QgsField('water', QVariant.String))
|
||||
|
||||
def getStationsFeatures(self):
|
||||
print("getStationsFeatures: Erzeuge Features...")
|
||||
|
||||
features = []
|
||||
for station in self.getStations():
|
||||
feature = self._getFeatureForStation(station)
|
||||
features.append(feature)
|
||||
|
||||
print("getStationsFeatures: %d Features erzeugt" % (len(features),))
|
||||
return features
|
||||
|
||||
def _getFeatureForStation(self, station) -> QgsFeature:
|
||||
feature = QgsFeature()
|
||||
|
||||
longitude = station['geometry']['longitude']
|
||||
latitude = station['geometry']['latitude']
|
||||
feature.setGeometry(QgsGeometry.fromPointXY(QgsPointXY(longitude, latitude)))
|
||||
|
||||
feature.setFields(self.fields)
|
||||
feature.setAttribute('uuid', station['attributes']['uuid'])
|
||||
feature.setAttribute('number', station['attributes']['number'])
|
||||
feature.setAttribute('shortname', station['attributes']['shortname'])
|
||||
feature.setAttribute('longname', station['attributes']['longname'])
|
||||
feature.setAttribute('km', station['attributes']['km'])
|
||||
feature.setAttribute('agency', station['attributes']['agency'])
|
||||
feature.setAttribute('water', station['attributes']['water'])
|
||||
|
||||
return feature
|
||||
46
pomodules/postations.py
Normal file
46
pomodules/postations.py
Normal file
@ -0,0 +1,46 @@
|
||||
from . import poBaseURL
|
||||
from .urlreader import UrlReader
|
||||
|
||||
|
||||
class PoStations(object):
|
||||
|
||||
def __init__(self):
|
||||
self.url = poBaseURL + 'stations.json'
|
||||
|
||||
def getStations(self):
|
||||
print("getStations: Getting data...")
|
||||
|
||||
reader = UrlReader(self.url)
|
||||
stations_json = reader.getJsonResponse()
|
||||
if stations_json is None:
|
||||
print("getStations: Keine Stationen erhalten")
|
||||
return None
|
||||
|
||||
print("getStations: %d Stationen erhalten" % (len(stations_json),))
|
||||
|
||||
stations = []
|
||||
for station_json in stations_json:
|
||||
if 'longitude' not in station_json or 'latitude' not in station_json or 'km' not in station_json:
|
||||
print("getStations: Station hat fehlende Attribute: %s" % (station_json['longname'],))
|
||||
continue
|
||||
|
||||
stations.append(
|
||||
{
|
||||
'geometry': {
|
||||
'longitude':station_json['longitude'],
|
||||
'latitude':station_json['latitude'],
|
||||
},
|
||||
'attributes': {
|
||||
'uuid': station_json['uuid'],
|
||||
'number': station_json['number'],
|
||||
'shortname': station_json['shortname'],
|
||||
'longname': station_json['longname'],
|
||||
'km': station_json['km'],
|
||||
'agency': station_json['agency'],
|
||||
'water': station_json['water']['longname'],
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
print("getStations: %d / %d Stationen überführt" % (len(stations), len(stations_json)))
|
||||
return stations
|
||||
123
pomodules/urlreader.py
Normal file
123
pomodules/urlreader.py
Normal file
@ -0,0 +1,123 @@
|
||||
import json
|
||||
from gzip import GzipFile
|
||||
from os.path import basename, join
|
||||
from urllib.error import URLError
|
||||
from urllib.parse import urlparse
|
||||
from urllib.request import Request, urlopen
|
||||
|
||||
|
||||
class UrlReader(object):
|
||||
|
||||
def __init__(self, _url):
|
||||
self.url = _url
|
||||
|
||||
def openUrl(self):
|
||||
"""
|
||||
Öffnet eine URL-Verbindung, fragt GZIP-Kompression an und gibt das Response-Objekt zurück
|
||||
:return: Response-Objekt oder None im Fehlerfall
|
||||
"""
|
||||
print("openURL: url: \"%s\"" % (self.url,))
|
||||
try:
|
||||
request = Request(self.url)
|
||||
request.add_header('Accept-Encoding', 'gzip')
|
||||
response = urlopen(request)
|
||||
print("openURL: Verbindung hergestellt")
|
||||
return response
|
||||
except URLError as e: # auch HTTPError
|
||||
print("openURL: FEHLER: " + str(e))
|
||||
|
||||
return None # Fehler
|
||||
|
||||
def getDataResponse(self):
|
||||
"""
|
||||
Benutzt openUrl und gibt die (entpackten) Daten zurück.
|
||||
:return: (entpackte) Daten oder None im Fehlerfall
|
||||
"""
|
||||
print("getDataResponse: url: \"%s\"" % (self.url,))
|
||||
response = self.openUrl()
|
||||
if response is None:
|
||||
print("getDataResponse: FEHLER: Kein Response-Objekt erhalten")
|
||||
return None
|
||||
|
||||
try:
|
||||
if response.headers['Content-Encoding'] == 'gzip':
|
||||
print("getDataResponse: Empfange GZIP Daten...")
|
||||
daten = GzipFile(fileobj=response).read()
|
||||
else:
|
||||
print("getDataResponse: Empfange unkomprimierte Daten...")
|
||||
daten = response.read()
|
||||
|
||||
print("getDataResponse: Daten empfangen")
|
||||
return daten
|
||||
|
||||
except OSError as e:
|
||||
print("getDataResponse: FEHLER: " + str(e))
|
||||
|
||||
return None # Kein Erfolg
|
||||
|
||||
def getJsonResponse(self):
|
||||
"""
|
||||
Benutzt getDataResponse zum Herunterladen, interpretiert die Daten als JSON und gibt das Ergebnis zurück.
|
||||
:return: Geparste JSON Daten oder None im Fehlerfall
|
||||
"""
|
||||
print("getJsonResponse: url=" + self.url)
|
||||
daten = self.getDataResponse()
|
||||
if daten is None:
|
||||
print("getJsonResponse: FEHLER: Keine Daten erhalten")
|
||||
return None
|
||||
|
||||
try:
|
||||
print("getJsonResponse: Lese JSON...")
|
||||
parsed = json.loads(daten)
|
||||
print("getJsonResponse: JSON gelesen")
|
||||
return parsed
|
||||
|
||||
except ValueError as e: # JSONDecodeError
|
||||
print("getJsonResponse: ValueError: " + str(e))
|
||||
|
||||
except TypeError as e: # JSONDecodeError
|
||||
print("getJsonResponse: TypeError: " + str(e))
|
||||
|
||||
return None # Kein Erfolg
|
||||
|
||||
def _dateiname_von_url(self):
|
||||
result = urlparse(self.url)
|
||||
dateiname = basename(result.path)
|
||||
return dateiname
|
||||
|
||||
def getFileResponse(self, pfad):
|
||||
"""
|
||||
Benutzt getDataResponse zum Herunterladen, schreibt die Daten in eine Datei und gibt ihren Pfad zurück (gegebenes Verzeichnis + basename des URL-Pfades).
|
||||
:param pfad: Verzeichnis in dem die Datei gespeichert werden soll.
|
||||
:return: Pfad der erzeugten Datei oder None im Fehlerfall
|
||||
"""
|
||||
print("getFileResponse: url: \"%s\"" % (self.url,))
|
||||
print("getFileResponse: pfad: \"%s\"" % (pfad,))
|
||||
|
||||
daten = self.getDataResponse()
|
||||
if daten is None:
|
||||
print("getFileResponse: FEHLER: Keine Daten erhalten")
|
||||
return None
|
||||
|
||||
dateiname = self._dateiname_von_url()
|
||||
print("getFileResponse: dateiname: \"%s\"" % (dateiname,))
|
||||
|
||||
dateipfad = join(pfad, dateiname)
|
||||
print("getFileResponse: dateipfad: \"%s\"" % (dateipfad,))
|
||||
|
||||
try:
|
||||
print("getFileResponse: Schreibe Datei...")
|
||||
with open(dateipfad, 'wb') as datei:
|
||||
datei.write(daten)
|
||||
print("getFileResponse: Datei geschrieben")
|
||||
return dateipfad
|
||||
|
||||
except OSError as e:
|
||||
print("getFilesResponse: FEHLER: " + str(e))
|
||||
|
||||
return None
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
url = "https://ia800302.us.archive.org/8/items/BennyGoodmanQuartetAndTrio/BodySoul-BennyGoodmanGeneKrupaTeddyWilsoncarnegieHall1938_64kb.mp3"
|
||||
print(UrlReader(url).getFileResponse(""))
|
||||
5
resources.qrc
Normal file
5
resources.qrc
Normal file
@ -0,0 +1,5 @@
|
||||
<RCC>
|
||||
<qresource prefix="/plugins/pegelonline" >
|
||||
<file>icon.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
243
styles/beschriftungen_currentw.qml
Normal file
243
styles/beschriftungen_currentw.qml
Normal file
@ -0,0 +1,243 @@
|
||||
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
|
||||
<qgis maxScale="0" labelsEnabled="1" readOnly="0" hasScaleBasedVisibilityFlag="0" styleCategories="AllStyleCategories" simplifyLocal="1" minScale="1e+08" simplifyMaxScale="1" simplifyAlgorithm="0" version="3.4.6-Madeira" simplifyDrawingTol="1" simplifyDrawingHints="0">
|
||||
<flags>
|
||||
<Identifiable>1</Identifiable>
|
||||
<Removable>1</Removable>
|
||||
<Searchable>1</Searchable>
|
||||
</flags>
|
||||
<renderer-v2 symbollevels="0" enableorderby="0" forceraster="0" type="singleSymbol">
|
||||
<symbols>
|
||||
<symbol clip_to_extent="1" alpha="1" name="0" type="marker" force_rhr="0">
|
||||
<layer enabled="1" pass="0" locked="0" class="SimpleMarker">
|
||||
<prop v="0" k="angle"/>
|
||||
<prop v="152,125,183,255" k="color"/>
|
||||
<prop v="1" k="horizontal_anchor_point"/>
|
||||
<prop v="bevel" k="joinstyle"/>
|
||||
<prop v="circle" k="name"/>
|
||||
<prop v="0,0" k="offset"/>
|
||||
<prop v="3x:0,0,0,0,0,0" k="offset_map_unit_scale"/>
|
||||
<prop v="MM" k="offset_unit"/>
|
||||
<prop v="35,35,35,255" k="outline_color"/>
|
||||
<prop v="solid" k="outline_style"/>
|
||||
<prop v="0" k="outline_width"/>
|
||||
<prop v="3x:0,0,0,0,0,0" k="outline_width_map_unit_scale"/>
|
||||
<prop v="MM" k="outline_width_unit"/>
|
||||
<prop v="diameter" k="scale_method"/>
|
||||
<prop v="2" k="size"/>
|
||||
<prop v="3x:0,0,0,0,0,0" k="size_map_unit_scale"/>
|
||||
<prop v="MM" k="size_unit"/>
|
||||
<prop v="1" k="vertical_anchor_point"/>
|
||||
<data_defined_properties>
|
||||
<Option type="Map">
|
||||
<Option name="name" type="QString" value=""/>
|
||||
<Option name="properties"/>
|
||||
<Option name="type" type="QString" value="collection"/>
|
||||
</Option>
|
||||
</data_defined_properties>
|
||||
</layer>
|
||||
</symbol>
|
||||
</symbols>
|
||||
<rotation/>
|
||||
<sizescale/>
|
||||
</renderer-v2>
|
||||
<labeling type="simple">
|
||||
<settings>
|
||||
<text-style namedStyle="Regular" fontUnderline="0" fontWordSpacing="0" fontStrikeout="0" fontWeight="25" fontSize="10" isExpression="0" blendMode="0" fontFamily="Calibri Light" fontLetterSpacing="0" textColor="0,0,252,255" previewBkgrdColor="#ffffff" fontSizeUnit="Point" multilineHeight="1" fieldName="value" fontSizeMapUnitScale="3x:0,0,0,0,0,0" textOpacity="1" fontCapitals="0" useSubstitutions="0" fontItalic="0">
|
||||
<text-buffer bufferSize="1" bufferJoinStyle="128" bufferSizeMapUnitScale="3x:0,0,0,0,0,0" bufferColor="255,255,255,255" bufferDraw="1" bufferNoFill="1" bufferOpacity="1" bufferSizeUnits="MM" bufferBlendMode="0"/>
|
||||
<background shapeRadiiY="0" shapeOffsetMapUnitScale="3x:0,0,0,0,0,0" shapeOpacity="1" shapeDraw="0" shapeType="0" shapeSVGFile="" shapeSizeY="0" shapeSizeUnit="MM" shapeOffsetUnit="MM" shapeRadiiMapUnitScale="3x:0,0,0,0,0,0" shapeOffsetX="0" shapeJoinStyle="64" shapeRotationType="0" shapeSizeX="0" shapeRotation="0" shapeBorderWidth="0" shapeBorderWidthMapUnitScale="3x:0,0,0,0,0,0" shapeBlendMode="0" shapeSizeMapUnitScale="3x:0,0,0,0,0,0" shapeOffsetY="0" shapeBorderColor="128,128,128,255" shapeRadiiUnit="MM" shapeSizeType="0" shapeFillColor="255,255,255,255" shapeBorderWidthUnit="MM" shapeRadiiX="0"/>
|
||||
<shadow shadowRadius="1.5" shadowBlendMode="6" shadowRadiusMapUnitScale="3x:0,0,0,0,0,0" shadowOpacity="0.7" shadowDraw="0" shadowOffsetMapUnitScale="3x:0,0,0,0,0,0" shadowScale="100" shadowUnder="0" shadowRadiusAlphaOnly="0" shadowOffsetAngle="135" shadowOffsetUnit="MM" shadowRadiusUnit="MM" shadowOffsetDist="1" shadowOffsetGlobal="1" shadowColor="0,0,0,255"/>
|
||||
<substitutions/>
|
||||
</text-style>
|
||||
<text-format addDirectionSymbol="0" placeDirectionSymbol="0" multilineAlign="3" plussign="0" leftDirectionSymbol="<" rightDirectionSymbol=">" formatNumbers="0" reverseDirectionSymbol="0" decimals="3" autoWrapLength="0" wrapChar="" useMaxLineLengthForAutoWrap="1"/>
|
||||
<placement repeatDistanceMapUnitScale="3x:0,0,0,0,0,0" fitInPolygonOnly="0" quadOffset="1" distUnits="MM" yOffset="0" priority="5" placement="1" repeatDistance="0" offsetType="0" preserveRotation="1" offsetUnits="MM" maxCurvedCharAngleOut="-25" rotationAngle="0" repeatDistanceUnits="MM" maxCurvedCharAngleIn="25" centroidWhole="0" dist="0" xOffset="0" placementFlags="10" predefinedPositionOrder="TR,TL,BR,BL,R,L,TSR,BSR" centroidInside="0" labelOffsetMapUnitScale="3x:0,0,0,0,0,0" distMapUnitScale="3x:0,0,0,0,0,0"/>
|
||||
<rendering maxNumLabels="2000" obstacle="1" fontLimitPixelSize="0" obstacleFactor="1" minFeatureSize="0" drawLabels="1" scaleMin="0" upsidedownLabels="0" fontMaxPixelSize="10000" zIndex="0" obstacleType="0" fontMinPixelSize="3" scaleMax="0" limitNumLabels="0" displayAll="0" labelPerPart="0" scaleVisibility="0" mergeLines="0"/>
|
||||
<dd_properties>
|
||||
<Option type="Map">
|
||||
<Option name="name" type="QString" value=""/>
|
||||
<Option name="properties"/>
|
||||
<Option name="type" type="QString" value="collection"/>
|
||||
</Option>
|
||||
</dd_properties>
|
||||
</settings>
|
||||
</labeling>
|
||||
<customproperties>
|
||||
<property key="embeddedWidgets/count" value="0"/>
|
||||
<property key="variableNames"/>
|
||||
<property key="variableValues"/>
|
||||
</customproperties>
|
||||
<blendMode>0</blendMode>
|
||||
<featureBlendMode>0</featureBlendMode>
|
||||
<layerOpacity>1</layerOpacity>
|
||||
<SingleCategoryDiagramRenderer diagramType="Histogram" attributeLegend="1">
|
||||
<DiagramCategory penAlpha="255" penColor="#000000" maxScaleDenominator="1e+08" sizeType="MM" backgroundAlpha="255" width="15" barWidth="5" penWidth="0" height="15" opacity="1" enabled="0" rotationOffset="270" scaleBasedVisibility="0" labelPlacementMethod="XHeight" minScaleDenominator="0" lineSizeType="MM" scaleDependency="Area" diagramOrientation="Up" sizeScale="3x:0,0,0,0,0,0" lineSizeScale="3x:0,0,0,0,0,0" minimumSize="0" backgroundColor="#ffffff">
|
||||
<fontProperties style="" description="MS Shell Dlg 2,8.1,-1,5,50,0,0,0,0,0"/>
|
||||
</DiagramCategory>
|
||||
</SingleCategoryDiagramRenderer>
|
||||
<DiagramLayerSettings showAll="1" priority="0" zIndex="0" obstacle="0" dist="0" placement="0" linePlacementFlags="18">
|
||||
<properties>
|
||||
<Option type="Map">
|
||||
<Option name="name" type="QString" value=""/>
|
||||
<Option name="properties"/>
|
||||
<Option name="type" type="QString" value="collection"/>
|
||||
</Option>
|
||||
</properties>
|
||||
</DiagramLayerSettings>
|
||||
<geometryOptions removeDuplicateNodes="0" geometryPrecision="0">
|
||||
<activeChecks/>
|
||||
<checkConfiguration/>
|
||||
</geometryOptions>
|
||||
<fieldConfiguration>
|
||||
<field name="uuid">
|
||||
<editWidget type="TextEdit">
|
||||
<config>
|
||||
<Option/>
|
||||
</config>
|
||||
</editWidget>
|
||||
</field>
|
||||
<field name="shortname">
|
||||
<editWidget type="TextEdit">
|
||||
<config>
|
||||
<Option/>
|
||||
</config>
|
||||
</editWidget>
|
||||
</field>
|
||||
<field name="timestamp">
|
||||
<editWidget type="TextEdit">
|
||||
<config>
|
||||
<Option/>
|
||||
</config>
|
||||
</editWidget>
|
||||
</field>
|
||||
<field name="value">
|
||||
<editWidget type="TextEdit">
|
||||
<config>
|
||||
<Option/>
|
||||
</config>
|
||||
</editWidget>
|
||||
</field>
|
||||
<field name="trend">
|
||||
<editWidget type="TextEdit">
|
||||
<config>
|
||||
<Option/>
|
||||
</config>
|
||||
</editWidget>
|
||||
</field>
|
||||
<field name="stateMnwMhw">
|
||||
<editWidget type="TextEdit">
|
||||
<config>
|
||||
<Option/>
|
||||
</config>
|
||||
</editWidget>
|
||||
</field>
|
||||
<field name="stateNswHsw">
|
||||
<editWidget type="TextEdit">
|
||||
<config>
|
||||
<Option/>
|
||||
</config>
|
||||
</editWidget>
|
||||
</field>
|
||||
</fieldConfiguration>
|
||||
<aliases>
|
||||
<alias index="0" name="" field="uuid"/>
|
||||
<alias index="1" name="" field="shortname"/>
|
||||
<alias index="2" name="" field="timestamp"/>
|
||||
<alias index="3" name="" field="value"/>
|
||||
<alias index="4" name="" field="trend"/>
|
||||
<alias index="5" name="" field="stateMnwMhw"/>
|
||||
<alias index="6" name="" field="stateNswHsw"/>
|
||||
</aliases>
|
||||
<excludeAttributesWMS/>
|
||||
<excludeAttributesWFS/>
|
||||
<defaults>
|
||||
<default applyOnUpdate="0" field="uuid" expression=""/>
|
||||
<default applyOnUpdate="0" field="shortname" expression=""/>
|
||||
<default applyOnUpdate="0" field="timestamp" expression=""/>
|
||||
<default applyOnUpdate="0" field="value" expression=""/>
|
||||
<default applyOnUpdate="0" field="trend" expression=""/>
|
||||
<default applyOnUpdate="0" field="stateMnwMhw" expression=""/>
|
||||
<default applyOnUpdate="0" field="stateNswHsw" expression=""/>
|
||||
</defaults>
|
||||
<constraints>
|
||||
<constraint notnull_strength="0" exp_strength="0" field="uuid" unique_strength="0" constraints="0"/>
|
||||
<constraint notnull_strength="0" exp_strength="0" field="shortname" unique_strength="0" constraints="0"/>
|
||||
<constraint notnull_strength="0" exp_strength="0" field="timestamp" unique_strength="0" constraints="0"/>
|
||||
<constraint notnull_strength="0" exp_strength="0" field="value" unique_strength="0" constraints="0"/>
|
||||
<constraint notnull_strength="0" exp_strength="0" field="trend" unique_strength="0" constraints="0"/>
|
||||
<constraint notnull_strength="0" exp_strength="0" field="stateMnwMhw" unique_strength="0" constraints="0"/>
|
||||
<constraint notnull_strength="0" exp_strength="0" field="stateNswHsw" unique_strength="0" constraints="0"/>
|
||||
</constraints>
|
||||
<constraintExpressions>
|
||||
<constraint desc="" exp="" field="uuid"/>
|
||||
<constraint desc="" exp="" field="shortname"/>
|
||||
<constraint desc="" exp="" field="timestamp"/>
|
||||
<constraint desc="" exp="" field="value"/>
|
||||
<constraint desc="" exp="" field="trend"/>
|
||||
<constraint desc="" exp="" field="stateMnwMhw"/>
|
||||
<constraint desc="" exp="" field="stateNswHsw"/>
|
||||
</constraintExpressions>
|
||||
<expressionfields/>
|
||||
<attributeactions>
|
||||
<defaultAction key="Canvas" value="{00000000-0000-0000-0000-000000000000}"/>
|
||||
</attributeactions>
|
||||
<attributetableconfig sortOrder="0" actionWidgetStyle="dropDown" sortExpression="">
|
||||
<columns>
|
||||
<column name="uuid" hidden="0" width="-1" type="field"/>
|
||||
<column name="shortname" hidden="0" width="-1" type="field"/>
|
||||
<column name="timestamp" hidden="0" width="-1" type="field"/>
|
||||
<column name="value" hidden="0" width="-1" type="field"/>
|
||||
<column name="trend" hidden="0" width="-1" type="field"/>
|
||||
<column name="stateMnwMhw" hidden="0" width="-1" type="field"/>
|
||||
<column name="stateNswHsw" hidden="0" width="-1" type="field"/>
|
||||
<column hidden="1" width="-1" type="actions"/>
|
||||
</columns>
|
||||
</attributetableconfig>
|
||||
<conditionalstyles>
|
||||
<rowstyles/>
|
||||
<fieldstyles/>
|
||||
</conditionalstyles>
|
||||
<editform tolerant="1"></editform>
|
||||
<editforminit/>
|
||||
<editforminitcodesource>0</editforminitcodesource>
|
||||
<editforminitfilepath></editforminitfilepath>
|
||||
<editforminitcode><![CDATA[# -*- coding: utf-8 -*-
|
||||
"""
|
||||
QGIS forms can have a Python function that is called when the form is
|
||||
opened.
|
||||
|
||||
Use this function to add extra logic to your forms.
|
||||
|
||||
Enter the name of the function in the "Python Init function"
|
||||
field.
|
||||
An example follows:
|
||||
"""
|
||||
from qgis.PyQt.QtWidgets import QWidget
|
||||
|
||||
def my_form_open(dialog, layer, feature):
|
||||
geom = feature.geometry()
|
||||
control = dialog.findChild(QWidget, "MyLineEdit")
|
||||
]]></editforminitcode>
|
||||
<featformsuppress>0</featformsuppress>
|
||||
<editorlayout>generatedlayout</editorlayout>
|
||||
<editable>
|
||||
<field name="shortname" editable="1"/>
|
||||
<field name="stateMnwMhw" editable="1"/>
|
||||
<field name="stateNswHsw" editable="1"/>
|
||||
<field name="timestamp" editable="1"/>
|
||||
<field name="trend" editable="1"/>
|
||||
<field name="uuid" editable="1"/>
|
||||
<field name="value" editable="1"/>
|
||||
</editable>
|
||||
<labelOnTop>
|
||||
<field name="shortname" labelOnTop="0"/>
|
||||
<field name="stateMnwMhw" labelOnTop="0"/>
|
||||
<field name="stateNswHsw" labelOnTop="0"/>
|
||||
<field name="timestamp" labelOnTop="0"/>
|
||||
<field name="trend" labelOnTop="0"/>
|
||||
<field name="uuid" labelOnTop="0"/>
|
||||
<field name="value" labelOnTop="0"/>
|
||||
</labelOnTop>
|
||||
<widgets/>
|
||||
<previewExpression>uuid</previewExpression>
|
||||
<mapTip></mapTip>
|
||||
<layerGeometryType>0</layerGeometryType>
|
||||
</qgis>
|
||||
243
styles/label_currentw.qml
Normal file
243
styles/label_currentw.qml
Normal file
@ -0,0 +1,243 @@
|
||||
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
|
||||
<qgis maxScale="0" labelsEnabled="1" readOnly="0" hasScaleBasedVisibilityFlag="0" styleCategories="AllStyleCategories" simplifyLocal="1" minScale="1e+08" simplifyMaxScale="1" simplifyAlgorithm="0" version="3.4.6-Madeira" simplifyDrawingTol="1" simplifyDrawingHints="0">
|
||||
<flags>
|
||||
<Identifiable>1</Identifiable>
|
||||
<Removable>1</Removable>
|
||||
<Searchable>1</Searchable>
|
||||
</flags>
|
||||
<renderer-v2 symbollevels="0" enableorderby="0" forceraster="0" type="singleSymbol">
|
||||
<symbols>
|
||||
<symbol clip_to_extent="1" alpha="1" name="0" type="marker" force_rhr="0">
|
||||
<layer enabled="1" pass="0" locked="0" class="SimpleMarker">
|
||||
<prop v="0" k="angle"/>
|
||||
<prop v="31,28,175,255" k="color"/>
|
||||
<prop v="1" k="horizontal_anchor_point"/>
|
||||
<prop v="bevel" k="joinstyle"/>
|
||||
<prop v="circle" k="name"/>
|
||||
<prop v="0,0" k="offset"/>
|
||||
<prop v="3x:0,0,0,0,0,0" k="offset_map_unit_scale"/>
|
||||
<prop v="MM" k="offset_unit"/>
|
||||
<prop v="35,35,35,255" k="outline_color"/>
|
||||
<prop v="solid" k="outline_style"/>
|
||||
<prop v="0" k="outline_width"/>
|
||||
<prop v="3x:0,0,0,0,0,0" k="outline_width_map_unit_scale"/>
|
||||
<prop v="MM" k="outline_width_unit"/>
|
||||
<prop v="diameter" k="scale_method"/>
|
||||
<prop v="2" k="size"/>
|
||||
<prop v="3x:0,0,0,0,0,0" k="size_map_unit_scale"/>
|
||||
<prop v="MM" k="size_unit"/>
|
||||
<prop v="1" k="vertical_anchor_point"/>
|
||||
<data_defined_properties>
|
||||
<Option type="Map">
|
||||
<Option name="name" type="QString" value=""/>
|
||||
<Option name="properties"/>
|
||||
<Option name="type" type="QString" value="collection"/>
|
||||
</Option>
|
||||
</data_defined_properties>
|
||||
</layer>
|
||||
</symbol>
|
||||
</symbols>
|
||||
<rotation/>
|
||||
<sizescale/>
|
||||
</renderer-v2>
|
||||
<labeling type="simple">
|
||||
<settings>
|
||||
<text-style namedStyle="Regular" fontUnderline="0" fontWordSpacing="0" fontStrikeout="0" fontWeight="25" fontSize="10" isExpression="0" blendMode="0" fontFamily="Calibri Light" fontLetterSpacing="0" textColor="0,0,0,255" previewBkgrdColor="#ffffff" fontSizeUnit="Point" multilineHeight="1" fieldName="shortname" fontSizeMapUnitScale="3x:0,0,0,0,0,0" textOpacity="1" fontCapitals="0" useSubstitutions="0" fontItalic="0">
|
||||
<text-buffer bufferSize="1" bufferJoinStyle="128" bufferSizeMapUnitScale="3x:0,0,0,0,0,0" bufferColor="255,255,255,255" bufferDraw="1" bufferNoFill="1" bufferOpacity="1" bufferSizeUnits="MM" bufferBlendMode="0"/>
|
||||
<background shapeRadiiY="0" shapeOffsetMapUnitScale="3x:0,0,0,0,0,0" shapeOpacity="1" shapeDraw="0" shapeType="0" shapeSVGFile="" shapeSizeY="0" shapeSizeUnit="MM" shapeOffsetUnit="MM" shapeRadiiMapUnitScale="3x:0,0,0,0,0,0" shapeOffsetX="0" shapeJoinStyle="64" shapeRotationType="0" shapeSizeX="0" shapeRotation="0" shapeBorderWidth="0" shapeBorderWidthMapUnitScale="3x:0,0,0,0,0,0" shapeBlendMode="0" shapeSizeMapUnitScale="3x:0,0,0,0,0,0" shapeOffsetY="0" shapeBorderColor="128,128,128,255" shapeRadiiUnit="MM" shapeSizeType="0" shapeFillColor="255,255,255,255" shapeBorderWidthUnit="MM" shapeRadiiX="0"/>
|
||||
<shadow shadowRadius="1.5" shadowBlendMode="6" shadowRadiusMapUnitScale="3x:0,0,0,0,0,0" shadowOpacity="0.7" shadowDraw="0" shadowOffsetMapUnitScale="3x:0,0,0,0,0,0" shadowScale="100" shadowUnder="0" shadowRadiusAlphaOnly="0" shadowOffsetAngle="135" shadowOffsetUnit="MM" shadowRadiusUnit="MM" shadowOffsetDist="1" shadowOffsetGlobal="1" shadowColor="0,0,0,255"/>
|
||||
<substitutions/>
|
||||
</text-style>
|
||||
<text-format addDirectionSymbol="0" placeDirectionSymbol="0" multilineAlign="3" plussign="0" leftDirectionSymbol="<" rightDirectionSymbol=">" formatNumbers="0" reverseDirectionSymbol="0" decimals="3" autoWrapLength="0" wrapChar="" useMaxLineLengthForAutoWrap="1"/>
|
||||
<placement repeatDistanceMapUnitScale="3x:0,0,0,0,0,0" fitInPolygonOnly="0" quadOffset="1" distUnits="MM" yOffset="0" priority="5" placement="1" repeatDistance="0" offsetType="0" preserveRotation="1" offsetUnits="MM" maxCurvedCharAngleOut="-25" rotationAngle="0" repeatDistanceUnits="MM" maxCurvedCharAngleIn="25" centroidWhole="0" dist="0" xOffset="0" placementFlags="10" predefinedPositionOrder="TR,TL,BR,BL,R,L,TSR,BSR" centroidInside="0" labelOffsetMapUnitScale="3x:0,0,0,0,0,0" distMapUnitScale="3x:0,0,0,0,0,0"/>
|
||||
<rendering maxNumLabels="2000" obstacle="1" fontLimitPixelSize="0" obstacleFactor="1" minFeatureSize="0" drawLabels="1" scaleMin="0" upsidedownLabels="0" fontMaxPixelSize="10000" zIndex="0" obstacleType="0" fontMinPixelSize="3" scaleMax="0" limitNumLabels="0" displayAll="0" labelPerPart="0" scaleVisibility="0" mergeLines="0"/>
|
||||
<dd_properties>
|
||||
<Option type="Map">
|
||||
<Option name="name" type="QString" value=""/>
|
||||
<Option name="properties"/>
|
||||
<Option name="type" type="QString" value="collection"/>
|
||||
</Option>
|
||||
</dd_properties>
|
||||
</settings>
|
||||
</labeling>
|
||||
<customproperties>
|
||||
<property key="embeddedWidgets/count" value="0"/>
|
||||
<property key="variableNames"/>
|
||||
<property key="variableValues"/>
|
||||
</customproperties>
|
||||
<blendMode>0</blendMode>
|
||||
<featureBlendMode>0</featureBlendMode>
|
||||
<layerOpacity>1</layerOpacity>
|
||||
<SingleCategoryDiagramRenderer diagramType="Histogram" attributeLegend="1">
|
||||
<DiagramCategory penAlpha="255" penColor="#000000" maxScaleDenominator="1e+08" sizeType="MM" backgroundAlpha="255" width="15" barWidth="5" penWidth="0" height="15" opacity="1" enabled="0" rotationOffset="270" scaleBasedVisibility="0" labelPlacementMethod="XHeight" minScaleDenominator="0" lineSizeType="MM" scaleDependency="Area" diagramOrientation="Up" sizeScale="3x:0,0,0,0,0,0" lineSizeScale="3x:0,0,0,0,0,0" minimumSize="0" backgroundColor="#ffffff">
|
||||
<fontProperties style="" description="MS Shell Dlg 2,8.1,-1,5,50,0,0,0,0,0"/>
|
||||
</DiagramCategory>
|
||||
</SingleCategoryDiagramRenderer>
|
||||
<DiagramLayerSettings showAll="1" priority="0" zIndex="0" obstacle="0" dist="0" placement="0" linePlacementFlags="18">
|
||||
<properties>
|
||||
<Option type="Map">
|
||||
<Option name="name" type="QString" value=""/>
|
||||
<Option name="properties"/>
|
||||
<Option name="type" type="QString" value="collection"/>
|
||||
</Option>
|
||||
</properties>
|
||||
</DiagramLayerSettings>
|
||||
<geometryOptions removeDuplicateNodes="0" geometryPrecision="0">
|
||||
<activeChecks/>
|
||||
<checkConfiguration/>
|
||||
</geometryOptions>
|
||||
<fieldConfiguration>
|
||||
<field name="uuid">
|
||||
<editWidget type="TextEdit">
|
||||
<config>
|
||||
<Option/>
|
||||
</config>
|
||||
</editWidget>
|
||||
</field>
|
||||
<field name="shortname">
|
||||
<editWidget type="TextEdit">
|
||||
<config>
|
||||
<Option/>
|
||||
</config>
|
||||
</editWidget>
|
||||
</field>
|
||||
<field name="timestamp">
|
||||
<editWidget type="TextEdit">
|
||||
<config>
|
||||
<Option/>
|
||||
</config>
|
||||
</editWidget>
|
||||
</field>
|
||||
<field name="value">
|
||||
<editWidget type="TextEdit">
|
||||
<config>
|
||||
<Option/>
|
||||
</config>
|
||||
</editWidget>
|
||||
</field>
|
||||
<field name="trend">
|
||||
<editWidget type="TextEdit">
|
||||
<config>
|
||||
<Option/>
|
||||
</config>
|
||||
</editWidget>
|
||||
</field>
|
||||
<field name="stateMnwMhw">
|
||||
<editWidget type="TextEdit">
|
||||
<config>
|
||||
<Option/>
|
||||
</config>
|
||||
</editWidget>
|
||||
</field>
|
||||
<field name="stateNswHsw">
|
||||
<editWidget type="TextEdit">
|
||||
<config>
|
||||
<Option/>
|
||||
</config>
|
||||
</editWidget>
|
||||
</field>
|
||||
</fieldConfiguration>
|
||||
<aliases>
|
||||
<alias index="0" name="" field="uuid"/>
|
||||
<alias index="1" name="" field="shortname"/>
|
||||
<alias index="2" name="" field="timestamp"/>
|
||||
<alias index="3" name="" field="value"/>
|
||||
<alias index="4" name="" field="trend"/>
|
||||
<alias index="5" name="" field="stateMnwMhw"/>
|
||||
<alias index="6" name="" field="stateNswHsw"/>
|
||||
</aliases>
|
||||
<excludeAttributesWMS/>
|
||||
<excludeAttributesWFS/>
|
||||
<defaults>
|
||||
<default applyOnUpdate="0" field="uuid" expression=""/>
|
||||
<default applyOnUpdate="0" field="shortname" expression=""/>
|
||||
<default applyOnUpdate="0" field="timestamp" expression=""/>
|
||||
<default applyOnUpdate="0" field="value" expression=""/>
|
||||
<default applyOnUpdate="0" field="trend" expression=""/>
|
||||
<default applyOnUpdate="0" field="stateMnwMhw" expression=""/>
|
||||
<default applyOnUpdate="0" field="stateNswHsw" expression=""/>
|
||||
</defaults>
|
||||
<constraints>
|
||||
<constraint notnull_strength="0" exp_strength="0" field="uuid" unique_strength="0" constraints="0"/>
|
||||
<constraint notnull_strength="0" exp_strength="0" field="shortname" unique_strength="0" constraints="0"/>
|
||||
<constraint notnull_strength="0" exp_strength="0" field="timestamp" unique_strength="0" constraints="0"/>
|
||||
<constraint notnull_strength="0" exp_strength="0" field="value" unique_strength="0" constraints="0"/>
|
||||
<constraint notnull_strength="0" exp_strength="0" field="trend" unique_strength="0" constraints="0"/>
|
||||
<constraint notnull_strength="0" exp_strength="0" field="stateMnwMhw" unique_strength="0" constraints="0"/>
|
||||
<constraint notnull_strength="0" exp_strength="0" field="stateNswHsw" unique_strength="0" constraints="0"/>
|
||||
</constraints>
|
||||
<constraintExpressions>
|
||||
<constraint desc="" exp="" field="uuid"/>
|
||||
<constraint desc="" exp="" field="shortname"/>
|
||||
<constraint desc="" exp="" field="timestamp"/>
|
||||
<constraint desc="" exp="" field="value"/>
|
||||
<constraint desc="" exp="" field="trend"/>
|
||||
<constraint desc="" exp="" field="stateMnwMhw"/>
|
||||
<constraint desc="" exp="" field="stateNswHsw"/>
|
||||
</constraintExpressions>
|
||||
<expressionfields/>
|
||||
<attributeactions>
|
||||
<defaultAction key="Canvas" value="{00000000-0000-0000-0000-000000000000}"/>
|
||||
</attributeactions>
|
||||
<attributetableconfig sortOrder="0" actionWidgetStyle="dropDown" sortExpression="">
|
||||
<columns>
|
||||
<column name="uuid" hidden="0" width="-1" type="field"/>
|
||||
<column name="shortname" hidden="0" width="-1" type="field"/>
|
||||
<column name="timestamp" hidden="0" width="-1" type="field"/>
|
||||
<column name="value" hidden="0" width="-1" type="field"/>
|
||||
<column name="trend" hidden="0" width="-1" type="field"/>
|
||||
<column name="stateMnwMhw" hidden="0" width="-1" type="field"/>
|
||||
<column name="stateNswHsw" hidden="0" width="-1" type="field"/>
|
||||
<column hidden="1" width="-1" type="actions"/>
|
||||
</columns>
|
||||
</attributetableconfig>
|
||||
<conditionalstyles>
|
||||
<rowstyles/>
|
||||
<fieldstyles/>
|
||||
</conditionalstyles>
|
||||
<editform tolerant="1"></editform>
|
||||
<editforminit/>
|
||||
<editforminitcodesource>0</editforminitcodesource>
|
||||
<editforminitfilepath></editforminitfilepath>
|
||||
<editforminitcode><![CDATA[# -*- coding: utf-8 -*-
|
||||
"""
|
||||
QGIS forms can have a Python function that is called when the form is
|
||||
opened.
|
||||
|
||||
Use this function to add extra logic to your forms.
|
||||
|
||||
Enter the name of the function in the "Python Init function"
|
||||
field.
|
||||
An example follows:
|
||||
"""
|
||||
from qgis.PyQt.QtWidgets import QWidget
|
||||
|
||||
def my_form_open(dialog, layer, feature):
|
||||
geom = feature.geometry()
|
||||
control = dialog.findChild(QWidget, "MyLineEdit")
|
||||
]]></editforminitcode>
|
||||
<featformsuppress>0</featformsuppress>
|
||||
<editorlayout>generatedlayout</editorlayout>
|
||||
<editable>
|
||||
<field name="shortname" editable="1"/>
|
||||
<field name="stateMnwMhw" editable="1"/>
|
||||
<field name="stateNswHsw" editable="1"/>
|
||||
<field name="timestamp" editable="1"/>
|
||||
<field name="trend" editable="1"/>
|
||||
<field name="uuid" editable="1"/>
|
||||
<field name="value" editable="1"/>
|
||||
</editable>
|
||||
<labelOnTop>
|
||||
<field name="shortname" labelOnTop="0"/>
|
||||
<field name="stateMnwMhw" labelOnTop="0"/>
|
||||
<field name="stateNswHsw" labelOnTop="0"/>
|
||||
<field name="timestamp" labelOnTop="0"/>
|
||||
<field name="trend" labelOnTop="0"/>
|
||||
<field name="uuid" labelOnTop="0"/>
|
||||
<field name="value" labelOnTop="0"/>
|
||||
</labelOnTop>
|
||||
<widgets/>
|
||||
<previewExpression>uuid</previewExpression>
|
||||
<mapTip></mapTip>
|
||||
<layerGeometryType>0</layerGeometryType>
|
||||
</qgis>
|
||||
411
styles/label_currentw_absvalue.qml
Normal file
411
styles/label_currentw_absvalue.qml
Normal file
@ -0,0 +1,411 @@
|
||||
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
|
||||
<qgis maxScale="0" simplifyAlgorithm="0" minScale="1e+08" simplifyDrawingHints="0" version="3.4.6-Madeira" simplifyLocal="1" hasScaleBasedVisibilityFlag="0" readOnly="0" simplifyDrawingTol="1" labelsEnabled="1" simplifyMaxScale="1" styleCategories="AllStyleCategories">
|
||||
<flags>
|
||||
<Identifiable>1</Identifiable>
|
||||
<Removable>1</Removable>
|
||||
<Searchable>1</Searchable>
|
||||
</flags>
|
||||
<renderer-v2 type="graduatedSymbol" enableorderby="0" forceraster="0" graduatedMethod="GraduatedColor" attr="value" symbollevels="0">
|
||||
<ranges>
|
||||
<range lower="0.000000000000000" symbol="0" render="true" upper="127.400000000000006" label="0 - 127"/>
|
||||
<range lower="127.400000000000006" symbol="1" render="true" upper="214.800000000000011" label="127 - 215"/>
|
||||
<range lower="214.800000000000011" symbol="2" render="true" upper="367.505999999999915" label="215 - 368"/>
|
||||
<range lower="367.505999999999915" symbol="3" render="true" upper="575.400000000000091" label="368 - 575"/>
|
||||
<range lower="575.400000000000091" symbol="4" render="true" upper="5612.000000000000000" label="575 - 5612"/>
|
||||
</ranges>
|
||||
<symbols>
|
||||
<symbol type="marker" force_rhr="0" alpha="1" clip_to_extent="1" name="0">
|
||||
<layer pass="0" locked="0" enabled="1" class="SimpleMarker">
|
||||
<prop k="angle" v="0"/>
|
||||
<prop k="color" v="68,1,84,255"/>
|
||||
<prop k="horizontal_anchor_point" v="1"/>
|
||||
<prop k="joinstyle" v="bevel"/>
|
||||
<prop k="name" v="circle"/>
|
||||
<prop k="offset" v="0,0"/>
|
||||
<prop k="offset_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
||||
<prop k="offset_unit" v="MM"/>
|
||||
<prop k="outline_color" v="35,35,35,255"/>
|
||||
<prop k="outline_style" v="solid"/>
|
||||
<prop k="outline_width" v="0"/>
|
||||
<prop k="outline_width_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
||||
<prop k="outline_width_unit" v="MM"/>
|
||||
<prop k="scale_method" v="diameter"/>
|
||||
<prop k="size" v="2"/>
|
||||
<prop k="size_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
||||
<prop k="size_unit" v="MM"/>
|
||||
<prop k="vertical_anchor_point" v="1"/>
|
||||
<data_defined_properties>
|
||||
<Option type="Map">
|
||||
<Option type="QString" value="" name="name"/>
|
||||
<Option name="properties"/>
|
||||
<Option type="QString" value="collection" name="type"/>
|
||||
</Option>
|
||||
</data_defined_properties>
|
||||
</layer>
|
||||
</symbol>
|
||||
<symbol type="marker" force_rhr="0" alpha="1" clip_to_extent="1" name="1">
|
||||
<layer pass="0" locked="0" enabled="1" class="SimpleMarker">
|
||||
<prop k="angle" v="0"/>
|
||||
<prop k="color" v="58,82,139,255"/>
|
||||
<prop k="horizontal_anchor_point" v="1"/>
|
||||
<prop k="joinstyle" v="bevel"/>
|
||||
<prop k="name" v="circle"/>
|
||||
<prop k="offset" v="0,0"/>
|
||||
<prop k="offset_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
||||
<prop k="offset_unit" v="MM"/>
|
||||
<prop k="outline_color" v="35,35,35,255"/>
|
||||
<prop k="outline_style" v="solid"/>
|
||||
<prop k="outline_width" v="0"/>
|
||||
<prop k="outline_width_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
||||
<prop k="outline_width_unit" v="MM"/>
|
||||
<prop k="scale_method" v="diameter"/>
|
||||
<prop k="size" v="2"/>
|
||||
<prop k="size_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
||||
<prop k="size_unit" v="MM"/>
|
||||
<prop k="vertical_anchor_point" v="1"/>
|
||||
<data_defined_properties>
|
||||
<Option type="Map">
|
||||
<Option type="QString" value="" name="name"/>
|
||||
<Option name="properties"/>
|
||||
<Option type="QString" value="collection" name="type"/>
|
||||
</Option>
|
||||
</data_defined_properties>
|
||||
</layer>
|
||||
</symbol>
|
||||
<symbol type="marker" force_rhr="0" alpha="1" clip_to_extent="1" name="2">
|
||||
<layer pass="0" locked="0" enabled="1" class="SimpleMarker">
|
||||
<prop k="angle" v="0"/>
|
||||
<prop k="color" v="32,144,141,255"/>
|
||||
<prop k="horizontal_anchor_point" v="1"/>
|
||||
<prop k="joinstyle" v="bevel"/>
|
||||
<prop k="name" v="circle"/>
|
||||
<prop k="offset" v="0,0"/>
|
||||
<prop k="offset_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
||||
<prop k="offset_unit" v="MM"/>
|
||||
<prop k="outline_color" v="35,35,35,255"/>
|
||||
<prop k="outline_style" v="solid"/>
|
||||
<prop k="outline_width" v="0"/>
|
||||
<prop k="outline_width_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
||||
<prop k="outline_width_unit" v="MM"/>
|
||||
<prop k="scale_method" v="diameter"/>
|
||||
<prop k="size" v="2"/>
|
||||
<prop k="size_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
||||
<prop k="size_unit" v="MM"/>
|
||||
<prop k="vertical_anchor_point" v="1"/>
|
||||
<data_defined_properties>
|
||||
<Option type="Map">
|
||||
<Option type="QString" value="" name="name"/>
|
||||
<Option name="properties"/>
|
||||
<Option type="QString" value="collection" name="type"/>
|
||||
</Option>
|
||||
</data_defined_properties>
|
||||
</layer>
|
||||
</symbol>
|
||||
<symbol type="marker" force_rhr="0" alpha="1" clip_to_extent="1" name="3">
|
||||
<layer pass="0" locked="0" enabled="1" class="SimpleMarker">
|
||||
<prop k="angle" v="0"/>
|
||||
<prop k="color" v="93,201,98,255"/>
|
||||
<prop k="horizontal_anchor_point" v="1"/>
|
||||
<prop k="joinstyle" v="bevel"/>
|
||||
<prop k="name" v="circle"/>
|
||||
<prop k="offset" v="0,0"/>
|
||||
<prop k="offset_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
||||
<prop k="offset_unit" v="MM"/>
|
||||
<prop k="outline_color" v="35,35,35,255"/>
|
||||
<prop k="outline_style" v="solid"/>
|
||||
<prop k="outline_width" v="0"/>
|
||||
<prop k="outline_width_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
||||
<prop k="outline_width_unit" v="MM"/>
|
||||
<prop k="scale_method" v="diameter"/>
|
||||
<prop k="size" v="2"/>
|
||||
<prop k="size_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
||||
<prop k="size_unit" v="MM"/>
|
||||
<prop k="vertical_anchor_point" v="1"/>
|
||||
<data_defined_properties>
|
||||
<Option type="Map">
|
||||
<Option type="QString" value="" name="name"/>
|
||||
<Option name="properties"/>
|
||||
<Option type="QString" value="collection" name="type"/>
|
||||
</Option>
|
||||
</data_defined_properties>
|
||||
</layer>
|
||||
</symbol>
|
||||
<symbol type="marker" force_rhr="0" alpha="1" clip_to_extent="1" name="4">
|
||||
<layer pass="0" locked="0" enabled="1" class="SimpleMarker">
|
||||
<prop k="angle" v="0"/>
|
||||
<prop k="color" v="253,231,37,255"/>
|
||||
<prop k="horizontal_anchor_point" v="1"/>
|
||||
<prop k="joinstyle" v="bevel"/>
|
||||
<prop k="name" v="circle"/>
|
||||
<prop k="offset" v="0,0"/>
|
||||
<prop k="offset_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
||||
<prop k="offset_unit" v="MM"/>
|
||||
<prop k="outline_color" v="35,35,35,255"/>
|
||||
<prop k="outline_style" v="solid"/>
|
||||
<prop k="outline_width" v="0"/>
|
||||
<prop k="outline_width_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
||||
<prop k="outline_width_unit" v="MM"/>
|
||||
<prop k="scale_method" v="diameter"/>
|
||||
<prop k="size" v="2"/>
|
||||
<prop k="size_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
||||
<prop k="size_unit" v="MM"/>
|
||||
<prop k="vertical_anchor_point" v="1"/>
|
||||
<data_defined_properties>
|
||||
<Option type="Map">
|
||||
<Option type="QString" value="" name="name"/>
|
||||
<Option name="properties"/>
|
||||
<Option type="QString" value="collection" name="type"/>
|
||||
</Option>
|
||||
</data_defined_properties>
|
||||
</layer>
|
||||
</symbol>
|
||||
</symbols>
|
||||
<source-symbol>
|
||||
<symbol type="marker" force_rhr="0" alpha="1" clip_to_extent="1" name="0">
|
||||
<layer pass="0" locked="0" enabled="1" class="SimpleMarker">
|
||||
<prop k="angle" v="0"/>
|
||||
<prop k="color" v="215,25,28,255"/>
|
||||
<prop k="horizontal_anchor_point" v="1"/>
|
||||
<prop k="joinstyle" v="bevel"/>
|
||||
<prop k="name" v="circle"/>
|
||||
<prop k="offset" v="0,0"/>
|
||||
<prop k="offset_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
||||
<prop k="offset_unit" v="MM"/>
|
||||
<prop k="outline_color" v="35,35,35,255"/>
|
||||
<prop k="outline_style" v="solid"/>
|
||||
<prop k="outline_width" v="0"/>
|
||||
<prop k="outline_width_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
||||
<prop k="outline_width_unit" v="MM"/>
|
||||
<prop k="scale_method" v="diameter"/>
|
||||
<prop k="size" v="2"/>
|
||||
<prop k="size_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
||||
<prop k="size_unit" v="MM"/>
|
||||
<prop k="vertical_anchor_point" v="1"/>
|
||||
<data_defined_properties>
|
||||
<Option type="Map">
|
||||
<Option type="QString" value="" name="name"/>
|
||||
<Option name="properties"/>
|
||||
<Option type="QString" value="collection" name="type"/>
|
||||
</Option>
|
||||
</data_defined_properties>
|
||||
</layer>
|
||||
</symbol>
|
||||
</source-symbol>
|
||||
<colorramp type="gradient" name="[source]">
|
||||
<prop k="color1" v="68,1,84,255"/>
|
||||
<prop k="color2" v="253,231,37,255"/>
|
||||
<prop k="discrete" v="0"/>
|
||||
<prop k="rampType" v="gradient"/>
|
||||
<prop k="stops" v="0.0196078;70,8,92,255:0.0392157;71,16,99,255:0.0588235;72,23,105,255:0.0784314;72,29,111,255:0.0980392;72,36,117,255:0.117647;71,42,122,255:0.137255;70,48,126,255:0.156863;69,55,129,255:0.176471;67,61,132,255:0.196078;65,66,135,255:0.215686;63,72,137,255:0.235294;61,78,138,255:0.254902;58,83,139,255:0.27451;56,89,140,255:0.294118;53,94,141,255:0.313725;51,99,141,255:0.333333;49,104,142,255:0.352941;46,109,142,255:0.372549;44,113,142,255:0.392157;42,118,142,255:0.411765;41,123,142,255:0.431373;39,128,142,255:0.45098;37,132,142,255:0.470588;35,137,142,255:0.490196;33,142,141,255:0.509804;32,146,140,255:0.529412;31,151,139,255:0.54902;30,156,137,255:0.568627;31,161,136,255:0.588235;33,165,133,255:0.607843;36,170,131,255:0.627451;40,174,128,255:0.647059;46,179,124,255:0.666667;53,183,121,255:0.686275;61,188,116,255:0.705882;70,192,111,255:0.72549;80,196,106,255:0.745098;90,200,100,255:0.764706;101,203,94,255:0.784314;112,207,87,255:0.803922;124,210,80,255:0.823529;137,213,72,255:0.843137;149,216,64,255:0.862745;162,218,55,255:0.882353;176,221,47,255:0.901961;189,223,38,255:0.921569;202,225,31,255:0.941176;216,226,25,255:0.960784;229,228,25,255:0.980392;241,229,29,255"/>
|
||||
</colorramp>
|
||||
<mode name="quantile"/>
|
||||
<symmetricMode astride="false" symmetryPoint="0" enabled="false"/>
|
||||
<rotation/>
|
||||
<sizescale/>
|
||||
<labelformat decimalplaces="0" trimtrailingzeroes="false" format="%1 - %2"/>
|
||||
</renderer-v2>
|
||||
<labeling type="simple">
|
||||
<settings>
|
||||
<text-style namedStyle="Regular" previewBkgrdColor="#ffffff" fontItalic="0" fontSizeMapUnitScale="3x:0,0,0,0,0,0" textOpacity="1" fontCapitals="0" fontUnderline="0" blendMode="0" fontWeight="25" fontStrikeout="0" fontSize="10" useSubstitutions="0" multilineHeight="1" fontFamily="Calibri Light" fontSizeUnit="Point" fontWordSpacing="0" isExpression="0" fontLetterSpacing="0" textColor="0,0,0,255" fieldName="value">
|
||||
<text-buffer bufferColor="255,255,255,255" bufferSizeUnits="MM" bufferBlendMode="0" bufferSizeMapUnitScale="3x:0,0,0,0,0,0" bufferOpacity="1" bufferJoinStyle="128" bufferDraw="1" bufferSize="1" bufferNoFill="1"/>
|
||||
<background shapeOffsetMapUnitScale="3x:0,0,0,0,0,0" shapeRotation="0" shapeOffsetX="0" shapeRadiiMapUnitScale="3x:0,0,0,0,0,0" shapeOffsetY="0" shapeSizeType="0" shapeRadiiUnit="MM" shapeOffsetUnit="MM" shapeBorderWidth="0" shapeType="0" shapeJoinStyle="64" shapeSizeX="0" shapeBorderWidthMapUnitScale="3x:0,0,0,0,0,0" shapeBlendMode="0" shapeBorderWidthUnit="MM" shapeSVGFile="" shapeSizeY="0" shapeSizeMapUnitScale="3x:0,0,0,0,0,0" shapeDraw="0" shapeRadiiY="0" shapeSizeUnit="MM" shapeOpacity="1" shapeRadiiX="0" shapeFillColor="255,255,255,255" shapeRotationType="0" shapeBorderColor="128,128,128,255"/>
|
||||
<shadow shadowUnder="0" shadowOffsetMapUnitScale="3x:0,0,0,0,0,0" shadowOffsetAngle="135" shadowOffsetUnit="MM" shadowScale="100" shadowOffsetDist="1" shadowRadiusUnit="MM" shadowColor="0,0,0,255" shadowDraw="0" shadowRadius="1.5" shadowRadiusMapUnitScale="3x:0,0,0,0,0,0" shadowOffsetGlobal="1" shadowBlendMode="6" shadowRadiusAlphaOnly="0" shadowOpacity="0.7"/>
|
||||
<substitutions/>
|
||||
</text-style>
|
||||
<text-format formatNumbers="0" rightDirectionSymbol=">" multilineAlign="3" useMaxLineLengthForAutoWrap="1" decimals="3" plussign="0" wrapChar="" autoWrapLength="0" placeDirectionSymbol="0" reverseDirectionSymbol="0" leftDirectionSymbol="<" addDirectionSymbol="0"/>
|
||||
<placement centroidWhole="0" repeatDistanceUnits="MM" yOffset="0" preserveRotation="1" repeatDistanceMapUnitScale="3x:0,0,0,0,0,0" fitInPolygonOnly="0" placement="1" dist="0" distUnits="MM" centroidInside="0" offsetType="0" offsetUnits="MM" predefinedPositionOrder="TR,TL,BR,BL,R,L,TSR,BSR" quadOffset="1" repeatDistance="0" xOffset="0" labelOffsetMapUnitScale="3x:0,0,0,0,0,0" rotationAngle="0" distMapUnitScale="3x:0,0,0,0,0,0" maxCurvedCharAngleIn="25" maxCurvedCharAngleOut="-25" priority="5" placementFlags="10"/>
|
||||
<rendering zIndex="0" obstacleFactor="1" limitNumLabels="0" obstacle="1" maxNumLabels="2000" minFeatureSize="0" scaleVisibility="0" drawLabels="1" scaleMin="0" upsidedownLabels="0" fontMinPixelSize="3" obstacleType="0" fontLimitPixelSize="0" scaleMax="0" displayAll="0" mergeLines="0" fontMaxPixelSize="10000" labelPerPart="0"/>
|
||||
<dd_properties>
|
||||
<Option type="Map">
|
||||
<Option type="QString" value="" name="name"/>
|
||||
<Option name="properties"/>
|
||||
<Option type="QString" value="collection" name="type"/>
|
||||
</Option>
|
||||
</dd_properties>
|
||||
</settings>
|
||||
</labeling>
|
||||
<customproperties>
|
||||
<property key="dualview/previewExpressions">
|
||||
<value>uuid</value>
|
||||
</property>
|
||||
<property key="embeddedWidgets/count" value="0"/>
|
||||
<property key="variableNames"/>
|
||||
<property key="variableValues"/>
|
||||
</customproperties>
|
||||
<blendMode>0</blendMode>
|
||||
<featureBlendMode>0</featureBlendMode>
|
||||
<layerOpacity>1</layerOpacity>
|
||||
<SingleCategoryDiagramRenderer diagramType="Histogram" attributeLegend="1">
|
||||
<DiagramCategory backgroundAlpha="255" scaleBasedVisibility="0" barWidth="5" height="15" scaleDependency="Area" penColor="#000000" enabled="0" penAlpha="255" lineSizeScale="3x:0,0,0,0,0,0" labelPlacementMethod="XHeight" rotationOffset="270" penWidth="0" lineSizeType="MM" sizeScale="3x:0,0,0,0,0,0" diagramOrientation="Up" minScaleDenominator="0" minimumSize="0" sizeType="MM" width="15" opacity="1" backgroundColor="#ffffff" maxScaleDenominator="1e+08">
|
||||
<fontProperties style="" description="MS Shell Dlg 2,8.1,-1,5,50,0,0,0,0,0"/>
|
||||
<attribute color="#000000" field="" label=""/>
|
||||
</DiagramCategory>
|
||||
</SingleCategoryDiagramRenderer>
|
||||
<DiagramLayerSettings showAll="1" zIndex="0" priority="0" placement="0" dist="0" linePlacementFlags="18" obstacle="0">
|
||||
<properties>
|
||||
<Option type="Map">
|
||||
<Option type="QString" value="" name="name"/>
|
||||
<Option name="properties"/>
|
||||
<Option type="QString" value="collection" name="type"/>
|
||||
</Option>
|
||||
</properties>
|
||||
</DiagramLayerSettings>
|
||||
<geometryOptions removeDuplicateNodes="0" geometryPrecision="0">
|
||||
<activeChecks/>
|
||||
<checkConfiguration/>
|
||||
</geometryOptions>
|
||||
<fieldConfiguration>
|
||||
<field name="uuid">
|
||||
<editWidget type="TextEdit">
|
||||
<config>
|
||||
<Option/>
|
||||
</config>
|
||||
</editWidget>
|
||||
</field>
|
||||
<field name="shortname">
|
||||
<editWidget type="TextEdit">
|
||||
<config>
|
||||
<Option/>
|
||||
</config>
|
||||
</editWidget>
|
||||
</field>
|
||||
<field name="timestamp">
|
||||
<editWidget type="TextEdit">
|
||||
<config>
|
||||
<Option/>
|
||||
</config>
|
||||
</editWidget>
|
||||
</field>
|
||||
<field name="value">
|
||||
<editWidget type="TextEdit">
|
||||
<config>
|
||||
<Option/>
|
||||
</config>
|
||||
</editWidget>
|
||||
</field>
|
||||
<field name="trend">
|
||||
<editWidget type="TextEdit">
|
||||
<config>
|
||||
<Option/>
|
||||
</config>
|
||||
</editWidget>
|
||||
</field>
|
||||
<field name="stateMnwMhw">
|
||||
<editWidget type="TextEdit">
|
||||
<config>
|
||||
<Option/>
|
||||
</config>
|
||||
</editWidget>
|
||||
</field>
|
||||
<field name="stateNswHsw">
|
||||
<editWidget type="TextEdit">
|
||||
<config>
|
||||
<Option/>
|
||||
</config>
|
||||
</editWidget>
|
||||
</field>
|
||||
</fieldConfiguration>
|
||||
<aliases>
|
||||
<alias field="uuid" index="0" name=""/>
|
||||
<alias field="shortname" index="1" name=""/>
|
||||
<alias field="timestamp" index="2" name=""/>
|
||||
<alias field="value" index="3" name=""/>
|
||||
<alias field="trend" index="4" name=""/>
|
||||
<alias field="stateMnwMhw" index="5" name=""/>
|
||||
<alias field="stateNswHsw" index="6" name=""/>
|
||||
</aliases>
|
||||
<excludeAttributesWMS/>
|
||||
<excludeAttributesWFS/>
|
||||
<defaults>
|
||||
<default expression="" field="uuid" applyOnUpdate="0"/>
|
||||
<default expression="" field="shortname" applyOnUpdate="0"/>
|
||||
<default expression="" field="timestamp" applyOnUpdate="0"/>
|
||||
<default expression="" field="value" applyOnUpdate="0"/>
|
||||
<default expression="" field="trend" applyOnUpdate="0"/>
|
||||
<default expression="" field="stateMnwMhw" applyOnUpdate="0"/>
|
||||
<default expression="" field="stateNswHsw" applyOnUpdate="0"/>
|
||||
</defaults>
|
||||
<constraints>
|
||||
<constraint notnull_strength="0" constraints="0" unique_strength="0" exp_strength="0" field="uuid"/>
|
||||
<constraint notnull_strength="0" constraints="0" unique_strength="0" exp_strength="0" field="shortname"/>
|
||||
<constraint notnull_strength="0" constraints="0" unique_strength="0" exp_strength="0" field="timestamp"/>
|
||||
<constraint notnull_strength="0" constraints="0" unique_strength="0" exp_strength="0" field="value"/>
|
||||
<constraint notnull_strength="0" constraints="0" unique_strength="0" exp_strength="0" field="trend"/>
|
||||
<constraint notnull_strength="0" constraints="0" unique_strength="0" exp_strength="0" field="stateMnwMhw"/>
|
||||
<constraint notnull_strength="0" constraints="0" unique_strength="0" exp_strength="0" field="stateNswHsw"/>
|
||||
</constraints>
|
||||
<constraintExpressions>
|
||||
<constraint desc="" exp="" field="uuid"/>
|
||||
<constraint desc="" exp="" field="shortname"/>
|
||||
<constraint desc="" exp="" field="timestamp"/>
|
||||
<constraint desc="" exp="" field="value"/>
|
||||
<constraint desc="" exp="" field="trend"/>
|
||||
<constraint desc="" exp="" field="stateMnwMhw"/>
|
||||
<constraint desc="" exp="" field="stateNswHsw"/>
|
||||
</constraintExpressions>
|
||||
<expressionfields/>
|
||||
<attributeactions>
|
||||
<defaultAction key="Canvas" value="{00000000-0000-0000-0000-000000000000}"/>
|
||||
</attributeactions>
|
||||
<attributetableconfig sortExpression="" sortOrder="0" actionWidgetStyle="dropDown">
|
||||
<columns>
|
||||
<column type="field" width="-1" hidden="0" name="uuid"/>
|
||||
<column type="field" width="-1" hidden="0" name="shortname"/>
|
||||
<column type="field" width="-1" hidden="0" name="timestamp"/>
|
||||
<column type="field" width="-1" hidden="0" name="value"/>
|
||||
<column type="field" width="-1" hidden="0" name="trend"/>
|
||||
<column type="field" width="-1" hidden="0" name="stateMnwMhw"/>
|
||||
<column type="field" width="-1" hidden="0" name="stateNswHsw"/>
|
||||
<column type="actions" width="-1" hidden="1"/>
|
||||
</columns>
|
||||
</attributetableconfig>
|
||||
<conditionalstyles>
|
||||
<rowstyles/>
|
||||
<fieldstyles/>
|
||||
</conditionalstyles>
|
||||
<editform tolerant="1"></editform>
|
||||
<editforminit/>
|
||||
<editforminitcodesource>0</editforminitcodesource>
|
||||
<editforminitfilepath></editforminitfilepath>
|
||||
<editforminitcode><![CDATA[# -*- coding: utf-8 -*-
|
||||
"""
|
||||
QGIS forms can have a Python function that is called when the form is
|
||||
opened.
|
||||
|
||||
Use this function to add extra logic to your forms.
|
||||
|
||||
Enter the name of the function in the "Python Init function"
|
||||
field.
|
||||
An example follows:
|
||||
"""
|
||||
from qgis.PyQt.QtWidgets import QWidget
|
||||
|
||||
def my_form_open(dialog, layer, feature):
|
||||
geom = feature.geometry()
|
||||
control = dialog.findChild(QWidget, "MyLineEdit")
|
||||
]]></editforminitcode>
|
||||
<featformsuppress>0</featformsuppress>
|
||||
<editorlayout>generatedlayout</editorlayout>
|
||||
<editable>
|
||||
<field editable="1" name="shortname"/>
|
||||
<field editable="1" name="stateMnwMhw"/>
|
||||
<field editable="1" name="stateNswHsw"/>
|
||||
<field editable="1" name="timestamp"/>
|
||||
<field editable="1" name="trend"/>
|
||||
<field editable="1" name="uuid"/>
|
||||
<field editable="1" name="value"/>
|
||||
</editable>
|
||||
<labelOnTop>
|
||||
<field labelOnTop="0" name="shortname"/>
|
||||
<field labelOnTop="0" name="stateMnwMhw"/>
|
||||
<field labelOnTop="0" name="stateNswHsw"/>
|
||||
<field labelOnTop="0" name="timestamp"/>
|
||||
<field labelOnTop="0" name="trend"/>
|
||||
<field labelOnTop="0" name="uuid"/>
|
||||
<field labelOnTop="0" name="value"/>
|
||||
</labelOnTop>
|
||||
<widgets/>
|
||||
<previewExpression>uuid</previewExpression>
|
||||
<mapTip></mapTip>
|
||||
<layerGeometryType>0</layerGeometryType>
|
||||
</qgis>
|
||||
345
styles/label_currentw_trend.qml
Normal file
345
styles/label_currentw_trend.qml
Normal file
@ -0,0 +1,345 @@
|
||||
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
|
||||
<qgis maxScale="0" simplifyAlgorithm="0" minScale="1e+08" simplifyDrawingHints="0" version="3.4.6-Madeira" simplifyLocal="1" hasScaleBasedVisibilityFlag="0" readOnly="0" simplifyDrawingTol="1" labelsEnabled="1" simplifyMaxScale="1" styleCategories="AllStyleCategories">
|
||||
<flags>
|
||||
<Identifiable>1</Identifiable>
|
||||
<Removable>1</Removable>
|
||||
<Searchable>1</Searchable>
|
||||
</flags>
|
||||
<renderer-v2 type="categorizedSymbol" enableorderby="0" forceraster="0" attr="trend" symbollevels="0">
|
||||
<categories>
|
||||
<category symbol="0" value="-1" render="true" label="-1"/>
|
||||
<category symbol="1" value="0" render="true" label="0"/>
|
||||
<category symbol="2" value="1" render="true" label="1"/>
|
||||
</categories>
|
||||
<symbols>
|
||||
<symbol type="marker" force_rhr="0" alpha="1" clip_to_extent="1" name="0">
|
||||
<layer pass="0" locked="0" enabled="1" class="SimpleMarker">
|
||||
<prop k="angle" v="0"/>
|
||||
<prop k="color" v="246,22,18,255"/>
|
||||
<prop k="horizontal_anchor_point" v="1"/>
|
||||
<prop k="joinstyle" v="bevel"/>
|
||||
<prop k="name" v="circle"/>
|
||||
<prop k="offset" v="0,0"/>
|
||||
<prop k="offset_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
||||
<prop k="offset_unit" v="MM"/>
|
||||
<prop k="outline_color" v="35,35,35,255"/>
|
||||
<prop k="outline_style" v="solid"/>
|
||||
<prop k="outline_width" v="0"/>
|
||||
<prop k="outline_width_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
||||
<prop k="outline_width_unit" v="MM"/>
|
||||
<prop k="scale_method" v="diameter"/>
|
||||
<prop k="size" v="2"/>
|
||||
<prop k="size_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
||||
<prop k="size_unit" v="MM"/>
|
||||
<prop k="vertical_anchor_point" v="1"/>
|
||||
<data_defined_properties>
|
||||
<Option type="Map">
|
||||
<Option type="QString" value="" name="name"/>
|
||||
<Option name="properties"/>
|
||||
<Option type="QString" value="collection" name="type"/>
|
||||
</Option>
|
||||
</data_defined_properties>
|
||||
</layer>
|
||||
</symbol>
|
||||
<symbol type="marker" force_rhr="0" alpha="1" clip_to_extent="1" name="1">
|
||||
<layer pass="0" locked="0" enabled="1" class="SimpleMarker">
|
||||
<prop k="angle" v="0"/>
|
||||
<prop k="color" v="246,246,41,255"/>
|
||||
<prop k="horizontal_anchor_point" v="1"/>
|
||||
<prop k="joinstyle" v="bevel"/>
|
||||
<prop k="name" v="circle"/>
|
||||
<prop k="offset" v="0,0"/>
|
||||
<prop k="offset_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
||||
<prop k="offset_unit" v="MM"/>
|
||||
<prop k="outline_color" v="35,35,35,255"/>
|
||||
<prop k="outline_style" v="solid"/>
|
||||
<prop k="outline_width" v="0"/>
|
||||
<prop k="outline_width_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
||||
<prop k="outline_width_unit" v="MM"/>
|
||||
<prop k="scale_method" v="diameter"/>
|
||||
<prop k="size" v="2"/>
|
||||
<prop k="size_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
||||
<prop k="size_unit" v="MM"/>
|
||||
<prop k="vertical_anchor_point" v="1"/>
|
||||
<data_defined_properties>
|
||||
<Option type="Map">
|
||||
<Option type="QString" value="" name="name"/>
|
||||
<Option name="properties"/>
|
||||
<Option type="QString" value="collection" name="type"/>
|
||||
</Option>
|
||||
</data_defined_properties>
|
||||
</layer>
|
||||
</symbol>
|
||||
<symbol type="marker" force_rhr="0" alpha="1" clip_to_extent="1" name="2">
|
||||
<layer pass="0" locked="0" enabled="1" class="SimpleMarker">
|
||||
<prop k="angle" v="0"/>
|
||||
<prop k="color" v="107,243,22,255"/>
|
||||
<prop k="horizontal_anchor_point" v="1"/>
|
||||
<prop k="joinstyle" v="bevel"/>
|
||||
<prop k="name" v="circle"/>
|
||||
<prop k="offset" v="0,0"/>
|
||||
<prop k="offset_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
||||
<prop k="offset_unit" v="MM"/>
|
||||
<prop k="outline_color" v="35,35,35,255"/>
|
||||
<prop k="outline_style" v="solid"/>
|
||||
<prop k="outline_width" v="0"/>
|
||||
<prop k="outline_width_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
||||
<prop k="outline_width_unit" v="MM"/>
|
||||
<prop k="scale_method" v="diameter"/>
|
||||
<prop k="size" v="2"/>
|
||||
<prop k="size_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
||||
<prop k="size_unit" v="MM"/>
|
||||
<prop k="vertical_anchor_point" v="1"/>
|
||||
<data_defined_properties>
|
||||
<Option type="Map">
|
||||
<Option type="QString" value="" name="name"/>
|
||||
<Option name="properties"/>
|
||||
<Option type="QString" value="collection" name="type"/>
|
||||
</Option>
|
||||
</data_defined_properties>
|
||||
</layer>
|
||||
</symbol>
|
||||
</symbols>
|
||||
<source-symbol>
|
||||
<symbol type="marker" force_rhr="0" alpha="1" clip_to_extent="1" name="0">
|
||||
<layer pass="0" locked="0" enabled="1" class="SimpleMarker">
|
||||
<prop k="angle" v="0"/>
|
||||
<prop k="color" v="31,28,175,255"/>
|
||||
<prop k="horizontal_anchor_point" v="1"/>
|
||||
<prop k="joinstyle" v="bevel"/>
|
||||
<prop k="name" v="circle"/>
|
||||
<prop k="offset" v="0,0"/>
|
||||
<prop k="offset_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
||||
<prop k="offset_unit" v="MM"/>
|
||||
<prop k="outline_color" v="35,35,35,255"/>
|
||||
<prop k="outline_style" v="solid"/>
|
||||
<prop k="outline_width" v="0"/>
|
||||
<prop k="outline_width_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
||||
<prop k="outline_width_unit" v="MM"/>
|
||||
<prop k="scale_method" v="diameter"/>
|
||||
<prop k="size" v="2"/>
|
||||
<prop k="size_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
||||
<prop k="size_unit" v="MM"/>
|
||||
<prop k="vertical_anchor_point" v="1"/>
|
||||
<data_defined_properties>
|
||||
<Option type="Map">
|
||||
<Option type="QString" value="" name="name"/>
|
||||
<Option name="properties"/>
|
||||
<Option type="QString" value="collection" name="type"/>
|
||||
</Option>
|
||||
</data_defined_properties>
|
||||
</layer>
|
||||
</symbol>
|
||||
</source-symbol>
|
||||
<colorramp type="gradient" name="[source]">
|
||||
<prop k="color1" v="215,25,28,255"/>
|
||||
<prop k="color2" v="26,150,65,255"/>
|
||||
<prop k="discrete" v="0"/>
|
||||
<prop k="rampType" v="gradient"/>
|
||||
<prop k="stops" v="0.25;253,174,97,255:0.5;255,255,192,255:0.75;166,217,106,255"/>
|
||||
</colorramp>
|
||||
<rotation/>
|
||||
<sizescale/>
|
||||
</renderer-v2>
|
||||
<labeling type="simple">
|
||||
<settings>
|
||||
<text-style namedStyle="Regular" previewBkgrdColor="#ffffff" fontItalic="0" fontSizeMapUnitScale="3x:0,0,0,0,0,0" textOpacity="1" fontCapitals="0" fontUnderline="0" blendMode="0" fontWeight="25" fontStrikeout="0" fontSize="10" useSubstitutions="0" multilineHeight="1" fontFamily="Calibri Light" fontSizeUnit="Point" fontWordSpacing="0" isExpression="0" fontLetterSpacing="0" textColor="0,0,0,255" fieldName="trend">
|
||||
<text-buffer bufferColor="255,255,255,255" bufferSizeUnits="MM" bufferBlendMode="0" bufferSizeMapUnitScale="3x:0,0,0,0,0,0" bufferOpacity="1" bufferJoinStyle="128" bufferDraw="1" bufferSize="1" bufferNoFill="1"/>
|
||||
<background shapeOffsetMapUnitScale="3x:0,0,0,0,0,0" shapeRotation="0" shapeOffsetX="0" shapeRadiiMapUnitScale="3x:0,0,0,0,0,0" shapeOffsetY="0" shapeSizeType="0" shapeRadiiUnit="MM" shapeOffsetUnit="MM" shapeBorderWidth="0" shapeType="0" shapeJoinStyle="64" shapeSizeX="0" shapeBorderWidthMapUnitScale="3x:0,0,0,0,0,0" shapeBlendMode="0" shapeBorderWidthUnit="MM" shapeSVGFile="" shapeSizeY="0" shapeSizeMapUnitScale="3x:0,0,0,0,0,0" shapeDraw="0" shapeRadiiY="0" shapeSizeUnit="MM" shapeOpacity="1" shapeRadiiX="0" shapeFillColor="255,255,255,255" shapeRotationType="0" shapeBorderColor="128,128,128,255"/>
|
||||
<shadow shadowUnder="0" shadowOffsetMapUnitScale="3x:0,0,0,0,0,0" shadowOffsetAngle="135" shadowOffsetUnit="MM" shadowScale="100" shadowOffsetDist="1" shadowRadiusUnit="MM" shadowColor="0,0,0,255" shadowDraw="0" shadowRadius="1.5" shadowRadiusMapUnitScale="3x:0,0,0,0,0,0" shadowOffsetGlobal="1" shadowBlendMode="6" shadowRadiusAlphaOnly="0" shadowOpacity="0.7"/>
|
||||
<substitutions/>
|
||||
</text-style>
|
||||
<text-format formatNumbers="0" rightDirectionSymbol=">" multilineAlign="3" useMaxLineLengthForAutoWrap="1" decimals="3" plussign="0" wrapChar="" autoWrapLength="0" placeDirectionSymbol="0" reverseDirectionSymbol="0" leftDirectionSymbol="<" addDirectionSymbol="0"/>
|
||||
<placement centroidWhole="0" repeatDistanceUnits="MM" yOffset="0" preserveRotation="1" repeatDistanceMapUnitScale="3x:0,0,0,0,0,0" fitInPolygonOnly="0" placement="1" dist="0" distUnits="MM" centroidInside="0" offsetType="0" offsetUnits="MM" predefinedPositionOrder="TR,TL,BR,BL,R,L,TSR,BSR" quadOffset="1" repeatDistance="0" xOffset="0" labelOffsetMapUnitScale="3x:0,0,0,0,0,0" rotationAngle="0" distMapUnitScale="3x:0,0,0,0,0,0" maxCurvedCharAngleIn="25" maxCurvedCharAngleOut="-25" priority="5" placementFlags="10"/>
|
||||
<rendering zIndex="0" obstacleFactor="1" limitNumLabels="0" obstacle="1" maxNumLabels="2000" minFeatureSize="0" scaleVisibility="0" drawLabels="1" scaleMin="0" upsidedownLabels="0" fontMinPixelSize="3" obstacleType="0" fontLimitPixelSize="0" scaleMax="0" displayAll="0" mergeLines="0" fontMaxPixelSize="10000" labelPerPart="0"/>
|
||||
<dd_properties>
|
||||
<Option type="Map">
|
||||
<Option type="QString" value="" name="name"/>
|
||||
<Option name="properties"/>
|
||||
<Option type="QString" value="collection" name="type"/>
|
||||
</Option>
|
||||
</dd_properties>
|
||||
</settings>
|
||||
</labeling>
|
||||
<customproperties>
|
||||
<property key="embeddedWidgets/count" value="0"/>
|
||||
<property key="variableNames"/>
|
||||
<property key="variableValues"/>
|
||||
</customproperties>
|
||||
<blendMode>0</blendMode>
|
||||
<featureBlendMode>0</featureBlendMode>
|
||||
<layerOpacity>1</layerOpacity>
|
||||
<SingleCategoryDiagramRenderer diagramType="Histogram" attributeLegend="1">
|
||||
<DiagramCategory backgroundAlpha="255" scaleBasedVisibility="0" barWidth="5" height="15" scaleDependency="Area" penColor="#000000" enabled="0" penAlpha="255" lineSizeScale="3x:0,0,0,0,0,0" labelPlacementMethod="XHeight" rotationOffset="270" penWidth="0" lineSizeType="MM" sizeScale="3x:0,0,0,0,0,0" diagramOrientation="Up" minScaleDenominator="0" minimumSize="0" sizeType="MM" width="15" opacity="1" backgroundColor="#ffffff" maxScaleDenominator="1e+08">
|
||||
<fontProperties style="" description="MS Shell Dlg 2,8.1,-1,5,50,0,0,0,0,0"/>
|
||||
<attribute color="#000000" field="" label=""/>
|
||||
</DiagramCategory>
|
||||
</SingleCategoryDiagramRenderer>
|
||||
<DiagramLayerSettings showAll="1" zIndex="0" priority="0" placement="0" dist="0" linePlacementFlags="18" obstacle="0">
|
||||
<properties>
|
||||
<Option type="Map">
|
||||
<Option type="QString" value="" name="name"/>
|
||||
<Option name="properties"/>
|
||||
<Option type="QString" value="collection" name="type"/>
|
||||
</Option>
|
||||
</properties>
|
||||
</DiagramLayerSettings>
|
||||
<geometryOptions removeDuplicateNodes="0" geometryPrecision="0">
|
||||
<activeChecks/>
|
||||
<checkConfiguration/>
|
||||
</geometryOptions>
|
||||
<fieldConfiguration>
|
||||
<field name="uuid">
|
||||
<editWidget type="TextEdit">
|
||||
<config>
|
||||
<Option/>
|
||||
</config>
|
||||
</editWidget>
|
||||
</field>
|
||||
<field name="shortname">
|
||||
<editWidget type="TextEdit">
|
||||
<config>
|
||||
<Option/>
|
||||
</config>
|
||||
</editWidget>
|
||||
</field>
|
||||
<field name="timestamp">
|
||||
<editWidget type="TextEdit">
|
||||
<config>
|
||||
<Option/>
|
||||
</config>
|
||||
</editWidget>
|
||||
</field>
|
||||
<field name="value">
|
||||
<editWidget type="TextEdit">
|
||||
<config>
|
||||
<Option/>
|
||||
</config>
|
||||
</editWidget>
|
||||
</field>
|
||||
<field name="trend">
|
||||
<editWidget type="TextEdit">
|
||||
<config>
|
||||
<Option/>
|
||||
</config>
|
||||
</editWidget>
|
||||
</field>
|
||||
<field name="stateMnwMhw">
|
||||
<editWidget type="TextEdit">
|
||||
<config>
|
||||
<Option/>
|
||||
</config>
|
||||
</editWidget>
|
||||
</field>
|
||||
<field name="stateNswHsw">
|
||||
<editWidget type="TextEdit">
|
||||
<config>
|
||||
<Option/>
|
||||
</config>
|
||||
</editWidget>
|
||||
</field>
|
||||
</fieldConfiguration>
|
||||
<aliases>
|
||||
<alias field="uuid" index="0" name=""/>
|
||||
<alias field="shortname" index="1" name=""/>
|
||||
<alias field="timestamp" index="2" name=""/>
|
||||
<alias field="value" index="3" name=""/>
|
||||
<alias field="trend" index="4" name=""/>
|
||||
<alias field="stateMnwMhw" index="5" name=""/>
|
||||
<alias field="stateNswHsw" index="6" name=""/>
|
||||
</aliases>
|
||||
<excludeAttributesWMS/>
|
||||
<excludeAttributesWFS/>
|
||||
<defaults>
|
||||
<default expression="" field="uuid" applyOnUpdate="0"/>
|
||||
<default expression="" field="shortname" applyOnUpdate="0"/>
|
||||
<default expression="" field="timestamp" applyOnUpdate="0"/>
|
||||
<default expression="" field="value" applyOnUpdate="0"/>
|
||||
<default expression="" field="trend" applyOnUpdate="0"/>
|
||||
<default expression="" field="stateMnwMhw" applyOnUpdate="0"/>
|
||||
<default expression="" field="stateNswHsw" applyOnUpdate="0"/>
|
||||
</defaults>
|
||||
<constraints>
|
||||
<constraint notnull_strength="0" constraints="0" unique_strength="0" exp_strength="0" field="uuid"/>
|
||||
<constraint notnull_strength="0" constraints="0" unique_strength="0" exp_strength="0" field="shortname"/>
|
||||
<constraint notnull_strength="0" constraints="0" unique_strength="0" exp_strength="0" field="timestamp"/>
|
||||
<constraint notnull_strength="0" constraints="0" unique_strength="0" exp_strength="0" field="value"/>
|
||||
<constraint notnull_strength="0" constraints="0" unique_strength="0" exp_strength="0" field="trend"/>
|
||||
<constraint notnull_strength="0" constraints="0" unique_strength="0" exp_strength="0" field="stateMnwMhw"/>
|
||||
<constraint notnull_strength="0" constraints="0" unique_strength="0" exp_strength="0" field="stateNswHsw"/>
|
||||
</constraints>
|
||||
<constraintExpressions>
|
||||
<constraint desc="" exp="" field="uuid"/>
|
||||
<constraint desc="" exp="" field="shortname"/>
|
||||
<constraint desc="" exp="" field="timestamp"/>
|
||||
<constraint desc="" exp="" field="value"/>
|
||||
<constraint desc="" exp="" field="trend"/>
|
||||
<constraint desc="" exp="" field="stateMnwMhw"/>
|
||||
<constraint desc="" exp="" field="stateNswHsw"/>
|
||||
</constraintExpressions>
|
||||
<expressionfields/>
|
||||
<attributeactions>
|
||||
<defaultAction key="Canvas" value="{00000000-0000-0000-0000-000000000000}"/>
|
||||
</attributeactions>
|
||||
<attributetableconfig sortExpression="" sortOrder="0" actionWidgetStyle="dropDown">
|
||||
<columns>
|
||||
<column type="field" width="-1" hidden="0" name="uuid"/>
|
||||
<column type="field" width="-1" hidden="0" name="shortname"/>
|
||||
<column type="field" width="-1" hidden="0" name="timestamp"/>
|
||||
<column type="field" width="-1" hidden="0" name="value"/>
|
||||
<column type="field" width="-1" hidden="0" name="trend"/>
|
||||
<column type="field" width="-1" hidden="0" name="stateMnwMhw"/>
|
||||
<column type="field" width="-1" hidden="0" name="stateNswHsw"/>
|
||||
<column type="actions" width="-1" hidden="1"/>
|
||||
</columns>
|
||||
</attributetableconfig>
|
||||
<conditionalstyles>
|
||||
<rowstyles/>
|
||||
<fieldstyles/>
|
||||
</conditionalstyles>
|
||||
<editform tolerant="1"></editform>
|
||||
<editforminit/>
|
||||
<editforminitcodesource>0</editforminitcodesource>
|
||||
<editforminitfilepath></editforminitfilepath>
|
||||
<editforminitcode><![CDATA[# -*- coding: utf-8 -*-
|
||||
"""
|
||||
QGIS forms can have a Python function that is called when the form is
|
||||
opened.
|
||||
|
||||
Use this function to add extra logic to your forms.
|
||||
|
||||
Enter the name of the function in the "Python Init function"
|
||||
field.
|
||||
An example follows:
|
||||
"""
|
||||
from qgis.PyQt.QtWidgets import QWidget
|
||||
|
||||
def my_form_open(dialog, layer, feature):
|
||||
geom = feature.geometry()
|
||||
control = dialog.findChild(QWidget, "MyLineEdit")
|
||||
]]></editforminitcode>
|
||||
<featformsuppress>0</featformsuppress>
|
||||
<editorlayout>generatedlayout</editorlayout>
|
||||
<editable>
|
||||
<field editable="1" name="shortname"/>
|
||||
<field editable="1" name="stateMnwMhw"/>
|
||||
<field editable="1" name="stateNswHsw"/>
|
||||
<field editable="1" name="timestamp"/>
|
||||
<field editable="1" name="trend"/>
|
||||
<field editable="1" name="uuid"/>
|
||||
<field editable="1" name="value"/>
|
||||
</editable>
|
||||
<labelOnTop>
|
||||
<field labelOnTop="0" name="shortname"/>
|
||||
<field labelOnTop="0" name="stateMnwMhw"/>
|
||||
<field labelOnTop="0" name="stateNswHsw"/>
|
||||
<field labelOnTop="0" name="timestamp"/>
|
||||
<field labelOnTop="0" name="trend"/>
|
||||
<field labelOnTop="0" name="uuid"/>
|
||||
<field labelOnTop="0" name="value"/>
|
||||
</labelOnTop>
|
||||
<widgets/>
|
||||
<previewExpression>uuid</previewExpression>
|
||||
<mapTip></mapTip>
|
||||
<layerGeometryType>0</layerGeometryType>
|
||||
</qgis>
|
||||
243
styles/label_stations.qml
Normal file
243
styles/label_stations.qml
Normal file
@ -0,0 +1,243 @@
|
||||
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
|
||||
<qgis maxScale="0" labelsEnabled="1" readOnly="0" hasScaleBasedVisibilityFlag="0" styleCategories="AllStyleCategories" simplifyLocal="1" minScale="1e+08" simplifyMaxScale="1" simplifyAlgorithm="0" version="3.4.6-Madeira" simplifyDrawingTol="1" simplifyDrawingHints="0">
|
||||
<flags>
|
||||
<Identifiable>1</Identifiable>
|
||||
<Removable>1</Removable>
|
||||
<Searchable>1</Searchable>
|
||||
</flags>
|
||||
<renderer-v2 symbollevels="0" enableorderby="0" forceraster="0" type="singleSymbol">
|
||||
<symbols>
|
||||
<symbol clip_to_extent="1" alpha="1" name="0" type="marker" force_rhr="0">
|
||||
<layer enabled="1" pass="0" locked="0" class="SimpleMarker">
|
||||
<prop v="0" k="angle"/>
|
||||
<prop v="227,26,28,255" k="color"/>
|
||||
<prop v="1" k="horizontal_anchor_point"/>
|
||||
<prop v="bevel" k="joinstyle"/>
|
||||
<prop v="circle" k="name"/>
|
||||
<prop v="0,0" k="offset"/>
|
||||
<prop v="3x:0,0,0,0,0,0" k="offset_map_unit_scale"/>
|
||||
<prop v="MM" k="offset_unit"/>
|
||||
<prop v="35,35,35,255" k="outline_color"/>
|
||||
<prop v="solid" k="outline_style"/>
|
||||
<prop v="0" k="outline_width"/>
|
||||
<prop v="3x:0,0,0,0,0,0" k="outline_width_map_unit_scale"/>
|
||||
<prop v="MM" k="outline_width_unit"/>
|
||||
<prop v="diameter" k="scale_method"/>
|
||||
<prop v="2" k="size"/>
|
||||
<prop v="3x:0,0,0,0,0,0" k="size_map_unit_scale"/>
|
||||
<prop v="MM" k="size_unit"/>
|
||||
<prop v="1" k="vertical_anchor_point"/>
|
||||
<data_defined_properties>
|
||||
<Option type="Map">
|
||||
<Option name="name" type="QString" value=""/>
|
||||
<Option name="properties"/>
|
||||
<Option name="type" type="QString" value="collection"/>
|
||||
</Option>
|
||||
</data_defined_properties>
|
||||
</layer>
|
||||
</symbol>
|
||||
</symbols>
|
||||
<rotation/>
|
||||
<sizescale/>
|
||||
</renderer-v2>
|
||||
<labeling type="simple">
|
||||
<settings>
|
||||
<text-style namedStyle="Regular" fontUnderline="0" fontWordSpacing="0" fontStrikeout="0" fontWeight="25" fontSize="10" isExpression="0" blendMode="0" fontFamily="Calibri Light" fontLetterSpacing="0" textColor="0,0,0,255" previewBkgrdColor="#ffffff" fontSizeUnit="Point" multilineHeight="1" fieldName="shortname" fontSizeMapUnitScale="3x:0,0,0,0,0,0" textOpacity="1" fontCapitals="0" useSubstitutions="0" fontItalic="0">
|
||||
<text-buffer bufferSize="1" bufferJoinStyle="128" bufferSizeMapUnitScale="3x:0,0,0,0,0,0" bufferColor="255,255,255,255" bufferDraw="1" bufferNoFill="1" bufferOpacity="1" bufferSizeUnits="MM" bufferBlendMode="0"/>
|
||||
<background shapeRadiiY="0" shapeOffsetMapUnitScale="3x:0,0,0,0,0,0" shapeOpacity="1" shapeDraw="0" shapeType="0" shapeSVGFile="" shapeSizeY="0" shapeSizeUnit="MM" shapeOffsetUnit="MM" shapeRadiiMapUnitScale="3x:0,0,0,0,0,0" shapeOffsetX="0" shapeJoinStyle="64" shapeRotationType="0" shapeSizeX="0" shapeRotation="0" shapeBorderWidth="0" shapeBorderWidthMapUnitScale="3x:0,0,0,0,0,0" shapeBlendMode="0" shapeSizeMapUnitScale="3x:0,0,0,0,0,0" shapeOffsetY="0" shapeBorderColor="128,128,128,255" shapeRadiiUnit="MM" shapeSizeType="0" shapeFillColor="255,255,255,255" shapeBorderWidthUnit="MM" shapeRadiiX="0"/>
|
||||
<shadow shadowRadius="1.5" shadowBlendMode="6" shadowRadiusMapUnitScale="3x:0,0,0,0,0,0" shadowOpacity="0.7" shadowDraw="0" shadowOffsetMapUnitScale="3x:0,0,0,0,0,0" shadowScale="100" shadowUnder="0" shadowRadiusAlphaOnly="0" shadowOffsetAngle="135" shadowOffsetUnit="MM" shadowRadiusUnit="MM" shadowOffsetDist="1" shadowOffsetGlobal="1" shadowColor="0,0,0,255"/>
|
||||
<substitutions/>
|
||||
</text-style>
|
||||
<text-format addDirectionSymbol="0" placeDirectionSymbol="0" multilineAlign="3" plussign="0" leftDirectionSymbol="<" rightDirectionSymbol=">" formatNumbers="0" reverseDirectionSymbol="0" decimals="3" autoWrapLength="0" wrapChar="" useMaxLineLengthForAutoWrap="1"/>
|
||||
<placement repeatDistanceMapUnitScale="3x:0,0,0,0,0,0" fitInPolygonOnly="0" quadOffset="1" distUnits="MM" yOffset="0" priority="5" placement="1" repeatDistance="0" offsetType="0" preserveRotation="1" offsetUnits="MM" maxCurvedCharAngleOut="-25" rotationAngle="0" repeatDistanceUnits="MM" maxCurvedCharAngleIn="25" centroidWhole="0" dist="0" xOffset="0" placementFlags="10" predefinedPositionOrder="TR,TL,BR,BL,R,L,TSR,BSR" centroidInside="0" labelOffsetMapUnitScale="3x:0,0,0,0,0,0" distMapUnitScale="3x:0,0,0,0,0,0"/>
|
||||
<rendering maxNumLabels="2000" obstacle="1" fontLimitPixelSize="0" obstacleFactor="1" minFeatureSize="0" drawLabels="1" scaleMin="0" upsidedownLabels="0" fontMaxPixelSize="10000" zIndex="0" obstacleType="0" fontMinPixelSize="3" scaleMax="0" limitNumLabels="0" displayAll="0" labelPerPart="0" scaleVisibility="0" mergeLines="0"/>
|
||||
<dd_properties>
|
||||
<Option type="Map">
|
||||
<Option name="name" type="QString" value=""/>
|
||||
<Option name="properties"/>
|
||||
<Option name="type" type="QString" value="collection"/>
|
||||
</Option>
|
||||
</dd_properties>
|
||||
</settings>
|
||||
</labeling>
|
||||
<customproperties>
|
||||
<property key="embeddedWidgets/count" value="0"/>
|
||||
<property key="variableNames"/>
|
||||
<property key="variableValues"/>
|
||||
</customproperties>
|
||||
<blendMode>0</blendMode>
|
||||
<featureBlendMode>0</featureBlendMode>
|
||||
<layerOpacity>1</layerOpacity>
|
||||
<SingleCategoryDiagramRenderer diagramType="Histogram" attributeLegend="1">
|
||||
<DiagramCategory penAlpha="255" penColor="#000000" maxScaleDenominator="1e+08" sizeType="MM" backgroundAlpha="255" width="15" barWidth="5" penWidth="0" height="15" opacity="1" enabled="0" rotationOffset="270" scaleBasedVisibility="0" labelPlacementMethod="XHeight" minScaleDenominator="0" lineSizeType="MM" scaleDependency="Area" diagramOrientation="Up" sizeScale="3x:0,0,0,0,0,0" lineSizeScale="3x:0,0,0,0,0,0" minimumSize="0" backgroundColor="#ffffff">
|
||||
<fontProperties style="" description="MS Shell Dlg 2,8.1,-1,5,50,0,0,0,0,0"/>
|
||||
</DiagramCategory>
|
||||
</SingleCategoryDiagramRenderer>
|
||||
<DiagramLayerSettings showAll="1" priority="0" zIndex="0" obstacle="0" dist="0" placement="0" linePlacementFlags="18">
|
||||
<properties>
|
||||
<Option type="Map">
|
||||
<Option name="name" type="QString" value=""/>
|
||||
<Option name="properties"/>
|
||||
<Option name="type" type="QString" value="collection"/>
|
||||
</Option>
|
||||
</properties>
|
||||
</DiagramLayerSettings>
|
||||
<geometryOptions removeDuplicateNodes="0" geometryPrecision="0">
|
||||
<activeChecks/>
|
||||
<checkConfiguration/>
|
||||
</geometryOptions>
|
||||
<fieldConfiguration>
|
||||
<field name="uuid">
|
||||
<editWidget type="TextEdit">
|
||||
<config>
|
||||
<Option/>
|
||||
</config>
|
||||
</editWidget>
|
||||
</field>
|
||||
<field name="number">
|
||||
<editWidget type="Range">
|
||||
<config>
|
||||
<Option/>
|
||||
</config>
|
||||
</editWidget>
|
||||
</field>
|
||||
<field name="shortname">
|
||||
<editWidget type="TextEdit">
|
||||
<config>
|
||||
<Option/>
|
||||
</config>
|
||||
</editWidget>
|
||||
</field>
|
||||
<field name="longname">
|
||||
<editWidget type="TextEdit">
|
||||
<config>
|
||||
<Option/>
|
||||
</config>
|
||||
</editWidget>
|
||||
</field>
|
||||
<field name="km">
|
||||
<editWidget type="TextEdit">
|
||||
<config>
|
||||
<Option/>
|
||||
</config>
|
||||
</editWidget>
|
||||
</field>
|
||||
<field name="agency">
|
||||
<editWidget type="TextEdit">
|
||||
<config>
|
||||
<Option/>
|
||||
</config>
|
||||
</editWidget>
|
||||
</field>
|
||||
<field name="water">
|
||||
<editWidget type="TextEdit">
|
||||
<config>
|
||||
<Option/>
|
||||
</config>
|
||||
</editWidget>
|
||||
</field>
|
||||
</fieldConfiguration>
|
||||
<aliases>
|
||||
<alias index="0" name="" field="uuid"/>
|
||||
<alias index="1" name="" field="number"/>
|
||||
<alias index="2" name="" field="shortname"/>
|
||||
<alias index="3" name="" field="longname"/>
|
||||
<alias index="4" name="" field="km"/>
|
||||
<alias index="5" name="" field="agency"/>
|
||||
<alias index="6" name="" field="water"/>
|
||||
</aliases>
|
||||
<excludeAttributesWMS/>
|
||||
<excludeAttributesWFS/>
|
||||
<defaults>
|
||||
<default applyOnUpdate="0" field="uuid" expression=""/>
|
||||
<default applyOnUpdate="0" field="number" expression=""/>
|
||||
<default applyOnUpdate="0" field="shortname" expression=""/>
|
||||
<default applyOnUpdate="0" field="longname" expression=""/>
|
||||
<default applyOnUpdate="0" field="km" expression=""/>
|
||||
<default applyOnUpdate="0" field="agency" expression=""/>
|
||||
<default applyOnUpdate="0" field="water" expression=""/>
|
||||
</defaults>
|
||||
<constraints>
|
||||
<constraint notnull_strength="0" exp_strength="0" field="uuid" unique_strength="0" constraints="0"/>
|
||||
<constraint notnull_strength="0" exp_strength="0" field="number" unique_strength="0" constraints="0"/>
|
||||
<constraint notnull_strength="0" exp_strength="0" field="shortname" unique_strength="0" constraints="0"/>
|
||||
<constraint notnull_strength="0" exp_strength="0" field="longname" unique_strength="0" constraints="0"/>
|
||||
<constraint notnull_strength="0" exp_strength="0" field="km" unique_strength="0" constraints="0"/>
|
||||
<constraint notnull_strength="0" exp_strength="0" field="agency" unique_strength="0" constraints="0"/>
|
||||
<constraint notnull_strength="0" exp_strength="0" field="water" unique_strength="0" constraints="0"/>
|
||||
</constraints>
|
||||
<constraintExpressions>
|
||||
<constraint desc="" exp="" field="uuid"/>
|
||||
<constraint desc="" exp="" field="number"/>
|
||||
<constraint desc="" exp="" field="shortname"/>
|
||||
<constraint desc="" exp="" field="longname"/>
|
||||
<constraint desc="" exp="" field="km"/>
|
||||
<constraint desc="" exp="" field="agency"/>
|
||||
<constraint desc="" exp="" field="water"/>
|
||||
</constraintExpressions>
|
||||
<expressionfields/>
|
||||
<attributeactions>
|
||||
<defaultAction key="Canvas" value="{00000000-0000-0000-0000-000000000000}"/>
|
||||
</attributeactions>
|
||||
<attributetableconfig sortOrder="0" actionWidgetStyle="dropDown" sortExpression="">
|
||||
<columns>
|
||||
<column name="uuid" hidden="0" width="-1" type="field"/>
|
||||
<column name="number" hidden="0" width="-1" type="field"/>
|
||||
<column name="shortname" hidden="0" width="-1" type="field"/>
|
||||
<column name="longname" hidden="0" width="-1" type="field"/>
|
||||
<column name="km" hidden="0" width="-1" type="field"/>
|
||||
<column name="agency" hidden="0" width="-1" type="field"/>
|
||||
<column name="water" hidden="0" width="-1" type="field"/>
|
||||
<column hidden="1" width="-1" type="actions"/>
|
||||
</columns>
|
||||
</attributetableconfig>
|
||||
<conditionalstyles>
|
||||
<rowstyles/>
|
||||
<fieldstyles/>
|
||||
</conditionalstyles>
|
||||
<editform tolerant="1"></editform>
|
||||
<editforminit/>
|
||||
<editforminitcodesource>0</editforminitcodesource>
|
||||
<editforminitfilepath></editforminitfilepath>
|
||||
<editforminitcode><![CDATA[# -*- coding: utf-8 -*-
|
||||
"""
|
||||
QGIS forms can have a Python function that is called when the form is
|
||||
opened.
|
||||
|
||||
Use this function to add extra logic to your forms.
|
||||
|
||||
Enter the name of the function in the "Python Init function"
|
||||
field.
|
||||
An example follows:
|
||||
"""
|
||||
from qgis.PyQt.QtWidgets import QWidget
|
||||
|
||||
def my_form_open(dialog, layer, feature):
|
||||
geom = feature.geometry()
|
||||
control = dialog.findChild(QWidget, "MyLineEdit")
|
||||
]]></editforminitcode>
|
||||
<featformsuppress>0</featformsuppress>
|
||||
<editorlayout>generatedlayout</editorlayout>
|
||||
<editable>
|
||||
<field name="agency" editable="1"/>
|
||||
<field name="km" editable="1"/>
|
||||
<field name="longname" editable="1"/>
|
||||
<field name="number" editable="1"/>
|
||||
<field name="shortname" editable="1"/>
|
||||
<field name="uuid" editable="1"/>
|
||||
<field name="water" editable="1"/>
|
||||
</editable>
|
||||
<labelOnTop>
|
||||
<field name="agency" labelOnTop="0"/>
|
||||
<field name="km" labelOnTop="0"/>
|
||||
<field name="longname" labelOnTop="0"/>
|
||||
<field name="number" labelOnTop="0"/>
|
||||
<field name="shortname" labelOnTop="0"/>
|
||||
<field name="uuid" labelOnTop="0"/>
|
||||
<field name="water" labelOnTop="0"/>
|
||||
</labelOnTop>
|
||||
<widgets/>
|
||||
<previewExpression>uuid</previewExpression>
|
||||
<mapTip></mapTip>
|
||||
<layerGeometryType>0</layerGeometryType>
|
||||
</qgis>
|
||||
8
styles/lyr_style.py
Normal file
8
styles/lyr_style.py
Normal file
@ -0,0 +1,8 @@
|
||||
import os
|
||||
local_dir = r"J:\gp190225\Home\.qgis3\profiles\default\python\plugins\pegelonline"
|
||||
lyr = iface.activeLayer()
|
||||
lyr.loadNamedStyle(os.path.join(local_dir, "styles/trend.qml"))
|
||||
if iface.mapCanvas().isCachingEnabled():
|
||||
lyr.triggerRepaint()
|
||||
else:
|
||||
iface.mapCanvas().refresh()
|
||||
Loading…
Reference in New Issue
Block a user