Fix/issue 1410 repair dissolve#1411
Conversation
There was a problem hiding this comment.
The changes look good to me (make all calls consistent with the removal of rescale policies, replace svg mapper with geojson in testing). I noticed no new failures in the main test suite, as expected based on the changes.
Two things I noticed, though:
- line 13, run dissolve.cpp is still commented out in geometry/extensions/test/algorithms/Jamfile in your branch. If I run that test, I get 63 failures on my only tested configuration linux, aarch64 with gcc (7, 8, 9, 12, 13, star_{a, b, c}, mail_2017_09_24_{e,f}, mail_2017_09_30_a, reallife, gitter_2013_04_b, ggl_list_denis, mail_2018_08_19 all with types f and d). That does confirm that it compiles, though.
- The compilation issues of dissolve would have been caught by a minimal test. Would we want such a test as part of the CI for extensions which are intended for future inclusion and active usage?
|
Thanks for your remarks!
Indeed. The results are different than from before, I still have to work on that. That does confirm that it compiles, though. Indeed
Good question. We don't have them for extensions. They are meant to be
Also they should not be part of @vissarion what are your thoughts? |
487f5d3 to
dda5e9f
Compare
|
I first wanted to make a follow-up. But because it is not merged (neither approved) anyway, it can be done in this PR |
|
I will add some pictures later this weekend. |
dda5e9f to
92ec5bf
Compare
92ec5bf to
2301a68
Compare
| // more than times there are turns (this should not happen). | ||
| while (iteration_count < m_turns.size()) | ||
| { | ||
| auto const current_turn_indices = get_turn_indices_by_node_id(m_turns, m_clusters, |
There was a problem hiding this comment.
Code within this while-loop is all the same as before.
But we don't call itself recursively anymore (for large geometries on some operating systems, this could result in a stack overflow). It is just a while loop now which was a trivial change, and much better. If there are many turns (for example for equal geometries), it can loop for (for example) more than 3000 times which should not cause any problem.
| return true; | ||
| } | ||
|
|
||
| return continue_traverse(ring, component_id, start_node_id, next_target_node_id); |
There was a problem hiding this comment.
This was a recursive call, not wise in hindsight.
@vissarion We should get this fix in 1.89. It is still allowed. I will make a separate PR for this.
It causes problems in big polygons with lots of turns (for example two equal polygons of 3500 points).
|
Sorry for being late reviewing here. I saw that some changes are separated in another PR and merged. @barendgehrels what is the status of this PR? |
Hi @vissarion - sorry, I overlooked this comment. It was a kind of research PR. I'm now busy with it again based on the issue opened by Johan Dore #1472 I will open a new PR |
0f8d40a to
b977460
Compare
|
The PR is rebased and updated. Experimental similar algorithms (and tests) are left out, based on a robustness test (that I will work out later). This should unblock Johan Dore in #1472 It should not yet be merged, the diff with the develop branch is substantial, I like to do some additional tests first. |
This PR:
dissolvebetterdissolveTest results:
original case
It is mostly as it was before. Note that the versions 1.85 did not run without errors either. Removing duplicate cases,
there are just two errors now.