Skip to content

Commit

Permalink
Fix replace geometry
Browse files Browse the repository at this point in the history
  • Loading branch information
pathmapper committed Jun 26, 2024
1 parent 81e5750 commit 17adeee
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 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.0
version=2.12.1
author=Kreis Viersen
[email protected]

Expand All @@ -19,7 +19,9 @@ icon=xplan_umring_icon.png
experimental=False
server=False
hasProcessingProvider=yes
changelog=v2.12.0:
changelog=v2.12.1:
- fix Hilfswerkzeug "Geometrie-Update" für andere Planarten als BP
v2.12.0:
- Entferne Z/M-Werte von Eingabe-Polygon
v2.11.0:
- neue optionale Attribute "technHerstellDatum" und "erstellungsMassstab" für BP, FP, LP v6.0
Expand Down
19 changes: 11 additions & 8 deletions xplan_umring_algorithm_replace_geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,20 +151,23 @@ def processAlgorithm(self, parameters, context, feedback):
raeumlicherGeltungsbereich_element = None
kbs = None

plan_element_found = False
for elem in ("BP_Plan", "FP_Plan", "LP_Plan", "RP_Plan", "SO_Plan"):
try:
if next(gml_root.iter("{" + xplan_ns_uri + "}" + elem)).tag:
plan_element = next(gml_root.iter("{" + xplan_ns_uri + "}" + elem))
if plan_element.tag:
plan_category = elem
plan_category_short = plan_category.split("_")[0]
feedback.pushInfo("Plankategorie: " + plan_category)
plan_element = next(
gml_root.iter("{" + xplan_ns_uri + "}" + plan_category)
)
plan_element_found = True
break
except:
raise QgsProcessingException(
"Kein *_Plan gefunden, dies wird nicht unterstützt!"
)
except StopIteration:
continue

if not plan_element_found:
raise QgsProcessingException(
"Kein *_Plan gefunden, dies wird nicht unterstützt!"
)

bereich_count = 0
try:
Expand Down

0 comments on commit 17adeee

Please sign in to comment.