Skip to content

Commit

Permalink
Assign id and srs for Curve and LineString
Browse files Browse the repository at this point in the history
  • Loading branch information
pathmapper committed May 21, 2024
1 parent 4882d83 commit 13fe74a
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 8 deletions.
6 changes: 3 additions & 3 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.10.0
version=2.11.0
author=Kreis Viersen
[email protected]

Expand All @@ -19,10 +19,10 @@ icon=xplan_umring_icon.png
experimental=False
server=False
hasProcessingProvider=yes
changelog=unreleased:
changelog=v2.11.0:
- neue optionale Attribute "technHerstellDatum" und "erstellungsMassstab" für BP, FP, LP v6.0
- Raster-Hilfswerkzeuge: Komprimiere erzeugte Rasterpläne mit Deflate
- Raster-Hilfswerkzeuge: Behebe Fehler für bestimmte Polygone
- alle Werkzeuge: behebe diverse Fehler für bestimmte Eingabe-Polygone
v2.10.0:
- Raster-Hilfswerkzeuge: Option zum Leerwert setzen
v2.9.0:
Expand Down
22 changes: 17 additions & 5 deletions xplan_umring_algorithm_bp_5_4.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def initAlgorithm(self, config=None):
self.ags = settings.value("xplan-umring/ags", "")
self.ortsteilname = ""
if self.ags.startswith(("05114", "05154", "05158", "05166", "05170")):
self.ortsteilname = self.kommune
self.ortsteilname = self.kommune

self.addParameter(
QgsProcessingParameterVectorLayer(
Expand Down Expand Up @@ -489,6 +489,20 @@ def showWarning(message):
)
polygon_element.attrib["srsName"] = kbs

for linestring_element in root.iter(
"{http://www.opengis.net/gml/3.2}LineString"
):
linestring_element.attrib["{http://www.opengis.net/gml/3.2}id"] = (
"ID_" + str(uuid.uuid4())
)
linestring_element.attrib["srsName"] = kbs

for curve_element in root.iter("{http://www.opengis.net/gml/3.2}Curve"):
curve_element.attrib["{http://www.opengis.net/gml/3.2}id"] = "ID_" + str(
uuid.uuid4()
)
curve_element.attrib["srsName"] = kbs

for lowerCorner_element in root.iter(
"{http://www.opengis.net/gml/3.2}lowerCorner"
):
Expand Down Expand Up @@ -516,9 +530,7 @@ def showWarning(message):
gemeindename_element.text = gemeindename

ortsteilname_element = next(
bp_plan_element.iter(
"{http://www.xplanung.de/xplangml/5/4}ortsteilName"
)
bp_plan_element.iter("{http://www.xplanung.de/xplangml/5/4}ortsteilName")
)

if ortsteilname == "":
Expand All @@ -527,7 +539,7 @@ def showWarning(message):
):
xp_gemeinde_element.remove(ortsteilname_element)
else:
ortsteilname_element.text = ortsteilname
ortsteilname_element.text = ortsteilname

for ags_element in root.iter("{http://www.xplanung.de/xplangml/5/4}ags"):
ags_element.text = ags
Expand Down
14 changes: 14 additions & 0 deletions xplan_umring_algorithm_bp_6_0.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,20 @@ def showWarning(message):
)
polygon_element.attrib["srsName"] = kbs

for linestring_element in root.iter(
"{http://www.opengis.net/gml/3.2}LineString"
):
linestring_element.attrib["{http://www.opengis.net/gml/3.2}id"] = (
"ID_" + str(uuid.uuid4())
)
linestring_element.attrib["srsName"] = kbs

for curve_element in root.iter("{http://www.opengis.net/gml/3.2}Curve"):
curve_element.attrib["{http://www.opengis.net/gml/3.2}id"] = "ID_" + str(
uuid.uuid4()
)
curve_element.attrib["srsName"] = kbs

for lowerCorner_element in root.iter(
"{http://www.opengis.net/gml/3.2}lowerCorner"
):
Expand Down
14 changes: 14 additions & 0 deletions xplan_umring_algorithm_fp_6_0.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,20 @@ def showWarning(message):
)
polygon_element.attrib["srsName"] = kbs

for linestring_element in root.iter(
"{http://www.opengis.net/gml/3.2}LineString"
):
linestring_element.attrib["{http://www.opengis.net/gml/3.2}id"] = (
"ID_" + str(uuid.uuid4())
)
linestring_element.attrib["srsName"] = kbs

for curve_element in root.iter("{http://www.opengis.net/gml/3.2}Curve"):
curve_element.attrib["{http://www.opengis.net/gml/3.2}id"] = "ID_" + str(
uuid.uuid4()
)
curve_element.attrib["srsName"] = kbs

for lowerCorner_element in root.iter(
"{http://www.opengis.net/gml/3.2}lowerCorner"
):
Expand Down
14 changes: 14 additions & 0 deletions xplan_umring_algorithm_lp_6_0.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,20 @@ def showWarning(message):
)
polygon_element.attrib["srsName"] = kbs

for linestring_element in root.iter(
"{http://www.opengis.net/gml/3.2}LineString"
):
linestring_element.attrib["{http://www.opengis.net/gml/3.2}id"] = (
"ID_" + str(uuid.uuid4())
)
linestring_element.attrib["srsName"] = kbs

for curve_element in root.iter("{http://www.opengis.net/gml/3.2}Curve"):
curve_element.attrib["{http://www.opengis.net/gml/3.2}id"] = "ID_" + str(
uuid.uuid4()
)
curve_element.attrib["srsName"] = kbs

for lowerCorner_element in root.iter(
"{http://www.opengis.net/gml/3.2}lowerCorner"
):
Expand Down
16 changes: 16 additions & 0 deletions xplan_umring_algorithm_replace_geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,22 @@ def updateBoundedBy():
)
polygon_element.attrib["srsName"] = kbs

for linestring_element in new_geltungsbereich_element.iter(
"{http://www.opengis.net/gml/3.2}LineString"
):
linestring_element.attrib["{http://www.opengis.net/gml/3.2}id"] = (
"ID_" + str(uuid.uuid4())
)
linestring_element.attrib["srsName"] = kbs

for curve_element in new_geltungsbereich_element.iter(
"{http://www.opengis.net/gml/3.2}Curve"
):
curve_element.attrib["{http://www.opengis.net/gml/3.2}id"] = "ID_" + str(
uuid.uuid4()
)
curve_element.attrib["srsName"] = kbs

raeumlicherGeltungsbereich_element.getparent().replace(
raeumlicherGeltungsbereich_element, new_geltungsbereich_element
)
Expand Down

0 comments on commit 13fe74a

Please sign in to comment.