diff --git a/kmljoin.py b/kmljoin.py index bc8f20602863cc93d8acb8834c4a80625f677b13..ad087b50b41292fdfff953681d3ff42ae8fb6cc0 100755 --- a/kmljoin.py +++ b/kmljoin.py @@ -1,10 +1,6 @@ #!/bin/env python3 """kmljoin - Join multiple KML files into a single KML file.""" -# Missing features: -# - Warn about large temporal discontinuity between files -# - Combine distinct airports/waypoint names for title - import copy import sys @@ -16,8 +12,8 @@ XML_NS = { 'gx': 'http://www.google.com/kml/ext/2.2', } -ET.register_namespace('', 'http://www.opengis.net/kml/2.2') -ET.register_namespace('gx', 'http://www.google.com/kml/ext/2.2') +for nskey, ns in XML_NS.items(): + ET.register_namespace(nskey, ns) def combine_files(kml_files): """Combine two or more KML files into one."""