Description
As I tried to feed my KML file into the script, I've got this error:
Traceback (most recent call last):
File "", line 1, in
File "D:\Documents\EuroScope EDGG Dev.github\mapbuilder\mapbuilder_main_.py", line 65, in entry
sys.exit(main(*sys.argv))
^^^^^^^^^^^^^^^
File "D:\Documents\EuroScope EDGG Dev.github\mapbuilder\mapbuilder_main_.py", line 52, in main
builder = Builder(args.source, args.target_dir, cache, config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Documents\EuroScope EDGG Dev.github\mapbuilder\mapbuilder\builder.py", line 38, in init
self.data[data_source] = parser.parse()
^^^^^^^^^^^^^^
File "D:\Documents\EuroScope EDGG Dev.github\mapbuilder\mapbuilder\data\kml.py", line 30, in parse
self.parse_recursively(self.xml_root["kml"]["Document"], result)
File "D:\Documents\EuroScope EDGG Dev.github\mapbuilder\mapbuilder\data\kml.py", line 41, in parse_recursively
self.parse_recursively(folder, result[name])
File "D:\Documents\EuroScope EDGG Dev.github\mapbuilder\mapbuilder\data\kml.py", line 57, in parse_recursively
raise ValueError(msg)
ValueError: Placemark {'name': 'P P4 P16 P20 P24', 'Style': {'LineStyle': {'color': 'ff0000ff'}, 'PolyStyle': {'fill': '0'}}, 'MultiGeometry': {'Polygon': {'outerBoundaryIs': {'LinearRing': {'coordinates': ... (really long line of coordinates)}
I created my KML file with QGIS. It seems like QGIS exports KML with tag 'MultiGeometry'. After removing this tag manually from the file, script worked flawlessly. Probably it would be nice, if the script could read files with these tags as well.