Replace feature in __features_with_id when a new feature is created due to .group element containment#162
Conversation
…ue to .group element containment (AnatomicMaps#160).
|
Hmm, you presumably haven't seen this comment? |
|
Are duplicate ids to do with grouping of features, either via |
Right, I hadn’t seen that comment. Thanks for highlighting it.
Yes, the newly created feature is based on an already created feature via the group. |
If the group is given an explicit |
|
There are three cases related to duplicate IDs:
Related code: flatmap-maker/mapmaker/flatmap/layers.py Lines 429 to 463 in 3f0807c
Related code: flatmap-maker/mapmaker/flatmap/layers.py Lines 342 to 343 in 3f0807c Therefore, updating The duplication mechanism in group and region elements occurs because a feature is first created and stored as a pair (id, feature) in Because nodes in I am still not completely sure what the correct form of group and region annotations in the SVG file should be. For |
|
Thanks for the research! I'll think about the best way to resolve this and get back (it may not be until the afternoon as I am travelling earlier in the day). |
|
The proposed solution in this commit introduces a new argument, |
#160
This fix is related to the previous issue regarding the
.groupelement. Features in FlatMap.__features_with_id are updated when a new feature with the same id has both group and interior properties set to True.