I've implemented the marching squares algorithm following Wikipedia's https://en.wikipedia.org/wiki/Marching_squares. The output I got is a set of edges, to which each contouring cell contributes 0, 1, or 4 edges.
How do I modify or post-process this algorithm to obtain a set of distinct polygons from these edges?
Oh and I want to do so in parallel.
I guess the sequential approach would be to pick an edge and follow it until it comes back to the beginning, then move on to another unprocessed edge.