All links to kml 53/13553/1
authorMartin Skorupski <martin.skorupski@highstreet-technologies.com>
Tue, 8 Oct 2024 16:49:54 +0000 (18:49 +0200)
committerMartin Skorupski <martin.skorupski@highstreet-technologies.com>
Tue, 8 Oct 2024 16:49:54 +0000 (18:49 +0200)
- use generic method 'toKml' for folder, placemark, point, and line representation
- fix GeoLocation type issue

Issue-ID: OAM-395
Change-Id: Ie5b69671b5ab751c198e7227d66e171d6ce2fe55
Signed-off-by: Martin Skorupski <martin.skorupski@highstreet-technologies.com>
code/network-generator/network_generation/model/python/o_ran_cloud_du.py

index 65e5cf6..e527cfc 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 2024 highstreet technologies
+# Copyright 2024 highstreet technologies USA CORP.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -88,7 +88,7 @@ class ORanCloudDu(ORanNode):
                 Tower(
                     {
                         "name": name,
-                        "geoLocation": newGeo,
+                        "geoLocation": GeoLocation(newGeo),
                         "position": hex,
                         "layout": self.layout,
                         "parent": self,
@@ -103,11 +103,7 @@ class ORanCloudDu(ORanNode):
         return self._towers
 
     def toKml(self) -> ET.Element:
-        o_ran_cloud_du: ET.Element = ET.Element("Folder")
-        open: ET.Element = ET.SubElement(o_ran_cloud_du, "open")
-        open.text = "1"
-        name: ET.Element = ET.SubElement(o_ran_cloud_du, "name")
-        name.text = self.name
+        o_ran_cloud_du = super().toKml()
         for tower in self.towers:
             o_ran_cloud_du.append(tower.toKml())
         return o_ran_cloud_du