commit 9c7dfea5f505ff5488334bc1e397c970703659f4
Author: Peter Stace peterstace@gmail.com
Date: Sun Nov 13 05:45:29 2022 +1100
Make DCEL geometry extraction ordering deterministic
https://github.com/peterstace/simplefeatures/pull/472 introduced some
fixes for `GeometryCollection` inputs for DCEL operations. This change
modified the DCEL data structure to store most state in maps rather than
slices.
The geometry extraction phase of the DCEL algorithm iterates over all of
the DCEL state, building up the output `Geometry`. Map iteration order
in Go is non-deterministic, resulting in the ordering within the output
`Geometry` also being non-deterministic.
Specifically:
- `Points` within `MultiPoint`s could occur in any order.
- Each `LineString` could be in one of two orders (forward and
reverse variants).
- The `LineString` constituents in a `MultiLineString` could occur in
any order.
- `Polygon` inner rings could occur in any order.
- `Polygon` rings (inner or outer) could start at any arbitrary point.
- The `Polygon` constituents in a `MultiPolygon` could occur in any
order.
This PR makes the ordering of all geometry components mentioned above
arbitrary but deterministic.
Description
commit 9c7dfea5f505ff5488334bc1e397c970703659f4 Author: Peter Stace peterstace@gmail.com Date: Sun Nov 13 05:45:29 2022 +1100
Check List
Have you:
Added unit tests? Yes.
Add cmprefimpl tests? (if appropriate?) N/A.
Updated release notes? (if appropriate?) Yes.
Related Issue
Benchmark Results
run_benchmarks.sh
script.Click to expand
``` PASTE BENCHMARKS HERE ```