TransWikia.com

How to cut segments of a LinearRing with another Geometry using NETTopologySuite?

Geographic Information Systems Asked on December 25, 2021

I have two linear rings, A (green) and B (red). I want to include all intersection points between two geometries in A.

enter image description here

In fact what I need is (A-B)+(A.B) (or maybe just A+(A.B)), but those operations may get too time consuming. The other option is to iterate over A’s segments and find their intersections with B and construct a new linear ring from scratch. Now there might be many special cases that I need to cover. So, are there any other fast and robust options in NetTopologySuite?

One Answer

Have you tried the MCIndexNoder? It can generate the nodes at intersections efficiently, but you have to extract the segments of your geometries, node the segments with the MCIndexNoder and reconstruct the geometries.

Here is a recent post of Martin Davis (JTS creator) on noding strategies. Maybe you could find it interesting:

https://lin-ear-th-inking.blogspot.com/2020/06/jts-overlayng-noding-strategies.html?m=0

Answered by César Argul García on December 25, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP