Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fix #148 and #167.
I've changed the
_resolve_bookkeeping()
function. This function replace thegeom ids
with the correspondingarc ids
. Before the correspondingarc ids
were collected without considering the shape of thegeom id
. Now we take thearcs_in_geom
as base and set thearc_ids
for the corresponding arc in the same object.This gives the right nesting for MultiPolygons and MultiPoint, but for other feature types the arcs become nested one level too deep. By updating the
_resolve_arcs()
function to unnest nested arcs for the other features, I could make all the tests pass. Except one (test_hashmap_geomcol_multipolygon_polygon
).Before the approach was done reversly. All single features were fine, but the multi features were nested one level deeper.
Upon inspection of the failed test, I realized that this covers the issue as is described in both linked issues, but was asserted wrongly..
Now for this test the input MultiPolygon is also a MultiPolygon in the output.