Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
pathmapper committed Sep 5, 2024
1 parent 17adeee commit 9719152
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 48 deletions.
6 changes: 4 additions & 2 deletions metadata.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name=XPlan-Umring
qgisMinimumVersion=3.24
description=Create XPlanGML from polygon(s)
version=2.12.1
version=2.12.2
author=Kreis Viersen
email=open@kreis-viersen.de

Expand All @@ -19,7 +19,9 @@ icon=xplan_umring_icon.png
experimental=False
server=False
hasProcessingProvider=yes
changelog=v2.12.1:
changelog=v2.12.2:
- Optimierungen im Quellcode
v2.12.1:
- fix Hilfswerkzeug "Geometrie-Update" für andere Planarten als BP
v2.12.0:
- Entferne Z/M-Werte von Eingabe-Polygon
Expand Down
32 changes: 9 additions & 23 deletions xplan_umring_algorithm_bp_5_4.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ def initAlgorithm(self, config=None):
],
optional=False,
allowMultiple=False,
usesStaticStrings=False,
defaultValue=[0],
usesStaticStrings=True,
defaultValue="1000 (BPlan)",
)
)
self.addParameter(
Expand All @@ -196,8 +196,8 @@ def initAlgorithm(self, config=None):
],
optional=False,
allowMultiple=False,
usesStaticStrings=False,
defaultValue=[0],
usesStaticStrings=True,
defaultValue="1000 (Aufstellungsbeschluss)",
)
)
self.addParameter(
Expand Down Expand Up @@ -274,25 +274,11 @@ def showWarning(message):
ags = self.parameterAsString(parameters, "AGS8stelligPflicht", context).strip()
plangeber = self.parameterAsString(parameters, "Plangeber", context).strip()

planart = self.parameterAsInt(parameters, "Planart", context)
planart_keys = [
1000,
10000,
10001,
3000,
4000,
40000,
40001,
40002,
5000,
7000,
9999,
]
planart_key = str(planart_keys[planart])

rechtsstand = self.parameterAsInt(parameters, "Rechtsstand", context)
rechtsstand_keys = [1000, 2000, 3000, 4000]
rechtsstand_key = str(rechtsstand_keys[rechtsstand])
planart = self.parameterAsString(parameters, "Planart", context)
planart_key = planart.split()[0]

rechtsstand = self.parameterAsString(parameters, "Rechtsstand", context)
rechtsstand_key = rechtsstand.split()[0]

datum = self.parameterAsString(parameters, "DatumRechtsstand", context).strip()

Expand Down
32 changes: 9 additions & 23 deletions xplan_umring_algorithm_bp_6_0.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ def initAlgorithm(self, config=None):
],
optional=False,
allowMultiple=False,
usesStaticStrings=False,
defaultValue=[0],
usesStaticStrings=True,
defaultValue="1000 (BPlan)",
)
)
self.addParameter(
Expand All @@ -197,8 +197,8 @@ def initAlgorithm(self, config=None):
],
optional=False,
allowMultiple=False,
usesStaticStrings=False,
defaultValue=[0],
usesStaticStrings=True,
defaultValue="1000 (Aufstellungsbeschluss)",
)
)
self.addParameter(
Expand Down Expand Up @@ -293,25 +293,11 @@ def showWarning(message):
ags = self.parameterAsString(parameters, "AGS8stelligPflicht", context).strip()
plangeber = self.parameterAsString(parameters, "Plangeber", context).strip()

planart = self.parameterAsInt(parameters, "Planart", context)
planart_keys = [
1000,
10000,
10001,
3000,
4000,
40000,
40001,
40002,
5000,
7000,
9999,
]
planart_key = str(planart_keys[planart])

rechtsstand = self.parameterAsInt(parameters, "Rechtsstand", context)
rechtsstand_keys = [1000, 2000, 3000, 4000]
rechtsstand_key = str(rechtsstand_keys[rechtsstand])
planart = self.parameterAsString(parameters, "Planart", context)
planart_key = planart.split()[0]

rechtsstand = self.parameterAsString(parameters, "Rechtsstand", context)
rechtsstand_key = rechtsstand.split()[0]

datum = self.parameterAsString(parameters, "DatumRechtsstand", context).strip()

Expand Down

0 comments on commit 9719152

Please sign in to comment.