Skip to content

Commit

Permalink
Merge pull request #57 from kreis-viersen/improve-imports
Browse files Browse the repository at this point in the history
Restrukturierung der Imports
  • Loading branch information
pathmapper authored Feb 22, 2023
2 parents c291198 + 005f62b commit 662ebd2
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 55 deletions.
89 changes: 36 additions & 53 deletions flurstuecks_finder_nrw.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,59 +22,42 @@
***************************************************************************/
"""

from collections import OrderedDict
import configparser
import hashlib
from io import BytesIO
import json
from lxml import etree
import os
import re
import sys
import urllib
import webbrowser

from qgis.core import (Qgis,
QgsBlockingNetworkRequest,
QgsCoordinateReferenceSystem,
QgsCoordinateTransform,
QgsField,
QgsFields,
QgsGml,
QgsMessageLog,
QgsPalLayerSettings,
QgsProject,
QgsProperty,
QgsPropertyCollection,
QgsRectangle,
QgsSimpleMarkerSymbolLayer,
QgsTextBufferSettings,
QgsTextFormat,
QgsVectorLayer,
QgsVectorLayerSimpleLabeling)

from qgis.gui import QgsHighlight, QgsMapToolEmitPoint
from qgis.utils import iface

from qgis.PyQt import uic
from qgis.PyQt.QtCore import (pyqtSignal,
QCoreApplication,
Qt,
QSettings,
QSize,
QUrl,
QVariant)

from qgis.PyQt.QtGui import QColor, QFont, QIcon, QPixmap
from qgis.PyQt.QtNetwork import QNetworkRequest
from qgis.PyQt.QtWidgets import (QAction,
QApplication,
QDockWidget,
QHeaderView,
QMenu,
QMessageBox,
QTableWidgetItem,
QToolButton)
try:
from qgis.core import (Qgis, QgsBlockingNetworkRequest,
QgsCoordinateReferenceSystem,
QgsCoordinateTransform, QgsField, QgsFields, QgsGml,
QgsMessageLog, QgsPalLayerSettings, QgsProject,
QgsProperty, QgsPropertyCollection,
QgsTextBufferSettings, QgsTextFormat,
QgsVectorLayer, QgsVectorLayerSimpleLabeling)
from qgis.gui import QgsHighlight, QgsMapToolEmitPoint
from qgis.PyQt import uic
from qgis.PyQt.QtCore import (QCoreApplication, QSize, Qt, QUrl,
QVariant, pyqtSignal)
from qgis.PyQt.QtGui import QColor, QFont, QIcon, QPixmap
from qgis.PyQt.QtNetwork import QNetworkRequest
from qgis.PyQt.QtWidgets import (QAction, QApplication, QDockWidget,
QHeaderView, QMenu, QMessageBox,
QTableWidgetItem, QToolButton)
from qgis.utils import iface

import configparser
import hashlib
import json
import os
import re
import sys
import urllib
import webbrowser
from collections import OrderedDict
from io import BytesIO
from lxml import etree

except (ModuleNotFoundError, ImportError) as module_error:
error_string = f"[Flurstücksfinder NRW Fehler]: {module_error.args[0]} - Modul kann nicht importiert werden. Bitte überprüfen Sie, ob dieses Python-Modul installiert ist!"
QgsMessageLog.logMessage(error_string, "Flurstücksfinder NRW", level=Qgis.Critical)
iface.messageBar().pushMessage(error_string, level=Qgis.Critical)
sys.exit(error_string)

# Initialize Qt resources from file resources_rc.py
from .resources_rc import *
Expand Down
6 changes: 4 additions & 2 deletions metadata.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
name=Flurstücksfinder NRW
qgisMinimumVersion=3.22
description=Find and display parcels (German State of North Rhine-Westphalia) - Flurstücksuche in NRW
version=1.3.0
version=1.3.1
author=Kreis Viersen
email=open@kreis-viersen.de

Expand All @@ -24,7 +24,9 @@ repository=https://github.com/kreis-viersen/flurstuecksfinder-nrw

hasProcessingProvider=no
# Uncomment the following line and add your changelog:
changelog=v1.3.0:
changelog=v1.3.1:
- Fehlermeldung beim Laden des Plugins ergänzt, wenn ein Python-Modul nicht importiert werden kann
v1.3.0:
- Es wird mindestens QGIS 3.22 benötigt
- Fehler behoben und Meldung hinzugefügt, wenn KBS des WFS nicht ermittelt werden kann
v1.2.0:
Expand Down

0 comments on commit 662ebd2

Please sign in to comment.