Hi Thomas,
Nice to read from you.
The way you describe is more or less the way it is implemented yet in OpenJUMP.
My feeling is that all computations needed to get the wanted result is done during overlay or polygonize operation, and that the second/third step (centroid calculation / intersection test) could be avoided.
Seems that overlayng can extract different subsets of the overlay graph as A-B, intersection, B-A, but not all in one shot, I wonder if it is an arbitrary choice or if there is a technical challenge to extract all types of polygons while maintaining their origin.
Michaël
envoyé : 23 septembre 2021 à 10:01
de : Thomas Leduc <thomas.leduc.44@xxxxxxxxx>
à : Michaud Michael <m.michael.michaud@xxxxxxxxx>, JTS project developer mailing list <jts-dev@xxxxxxxxxxx>
objet : Re: [jts-dev] complete overlay with labels
Dear Michaël,
A few years ago, in response to a question about multiple overlays, Martin Davies proposed to proceed by polygonization. Adapting the idea, I suggest the following procedure:
- extract the contours and proceed to their geometrical union,
- polygonize this set of contours,
- for each centroid of the shapes resulting from this polygonization, identify the polygon or polygons of the starting set which contains it.
Have a nice day.
Thomas Leduc
Hi JTS developpers,
I'm searching for the best approach to overlay 2 geometries A and B and label each resulting polygon
with A, B or A+B.
With Polygonizer, I can get all resulting polygons, but I need to add intersection tests with original
geometries to get the labels
Another approach is with OverlayNG, but all operations (intersection, union, A-B, B-A and symmetric difference) give me a partial result
and I did not find a way to avoid several ovelay computations to get the full result.
Thank you for your ideas,
Michaël
_______________________________________________
jts-dev mailing list
jts-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jts-dev
--
_______________________________________________