From 5a4949bf97ed317e171f88ec2a51fbcc90463c95 Mon Sep 17 00:00:00 2001 From: David Brooks Date: Fri, 22 Aug 2025 19:43:38 +1200 Subject: [PATCH] SVG: ignore any `id` on group elements (fixes #157). --- mapmaker/sources/svg/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mapmaker/sources/svg/__init__.py b/mapmaker/sources/svg/__init__.py index 4e43ebf8..d7b1ad0e 100644 --- a/mapmaker/sources/svg/__init__.py +++ b/mapmaker/sources/svg/__init__.py @@ -405,7 +405,7 @@ def __process_element(self, wrapped_element: ElementWrapper, transform, parent_p properties = parent_properties.copy() for name in NON_INHERITED_PROPERTIES: properties.pop(name, None) - if 'id' in element.attrib: + if 'id' in element.attrib and element.tag != SVG_TAG('g'): properties['id'] = element.attrib.get('id') properties.update(properties_from_markup) shape_id = properties.get('id') ## versus element.attrib.get('id')