Jukka,

Indeed, I have added a tool which does exacly what you describe in Tools > Edit Geometry > Erase a layer from a mask, but unfortunately, it suffers from the same robustness problem. It should also be possible from Tools > Analysis > Geometry Functions... (Difference) after transforming one of the layer to a "mask" (a single multipolygon), but It will probably have same robustness problem + it will be less efficient because of the huge multipolygon.

I know that Martin has made good progress on the robustness front, but I don't know if it is included in the usual methods or if it needs some adaptations in the client code to benefit these improvement.

As suggested by Stefan, you may try to round coordinates to 8 or 10 decimals and retry the operation if this kind of rounding is acceptable, but rounding may create invalid polygons you will have to repair (hope makevalid can help in this case)

Michaël


envoyé : 19 mai 2021 à 11:41
de : "Rahkonen Jukka (MML)" <jukka.rahko...@maanmittauslaitos.fi>
à : Michaud Michael <m.michael.mich...@orange.fr>, OpenJump develop and use <jump-pilot-devel@lists.sourceforge.net>
cc : Stefan Steiniger <ssteini...@uc.cl>
objet : Re: [JPP-Devel] How to avoid non-noded intersection error in Overlay?


Hi,

 

Sorry, I knew that Overlay worked and meant really the Polygon overlay.

 

I have seen the non-noded intersection exceptions even before. They stop the whole process and I have been thinking that from users perspective it might be good to have an option to skip the errors and get at least some output but I do not know if that is technically possible.

 

I tried to solve a problem that another user had. The final goal is to erase layer 1 by layer 2, so to intersect and remove the parts of geometries on layer 1 which are covered by features on layer 2. I suppose we do not have such direct erase tool but the output from Polygon overlay would work as an interim result. I also tried to union the other layer into one geometry but as I guessed the layer is all too large and complicated for that.

 

Another tool that I tried is the OGR Layer Algebra Erase method https://trac.osgeo.org/gdal/wiki/LayerAlgebra. That stopped also to non-noded intersection error and I believe it comes from GEOS.

 

-Jukka-

 

Lähettäjä: Michaud Michael <m.michael.mich...@orange.fr>
Lähetetty: keskiviikko 19. toukokuuta 2021 10.32
Vastaanottaja: OpenJump develop and use <jump-pilot-devel@lists.sourceforge.net>
Kopio: Stefan Steiniger <ssteini...@uc.cl>
Aihe: Re: [JPP-Devel] How to avoid non-noded intersection error in Overlay?

 

Jukka,

I could successfully run overlay, but not polygon overlay.

I think there maybe a solution with JTS snaprounding code, but there is no easyway to use it from OpenJUMP (to my knowledge, node-lines is the only plugin to use a snap-rounding approach, but for a reason, I could not use it with a very fine-grain precision on your data). Let me some time to explore as your dataset is quite big.

Michaël 

envoyé : 19 mai 2021 à 00:37
de : Stefan Steiniger via Jump-pilot-devel <jump-pilot-devel@lists.sourceforge.net>
à : OpenJump develop and use <jump-pilot-devel@lists.sourceforge.net>
cc : Stefan Steiniger <ssteini...@uc.cl>
objet : Re: [JPP-Devel] How to avoid non-noded intersection error in Overlay?

 

Hi Jukka,

 

I guess the lines are almost parallel of you zoom in : or parallel for the observer - but indeed are not. They could also be a duplicate. So, the option would be to change precision of evaluation, I believe or delete one or separate them? At least manual intervention seems necessary.

 

Perhaps not so useful but usually this was the case in the past :)

 

Cheers,

Stefan

 

On Tue., May 18, 2021, 13:13 Rahkonen Jukka (MML), <jukka.rahko...@maanmittauslaitos.fi> wrote:

Hi,

 

I tried to run the Overlay function for this heavy dataset https://we.tl/t-gshlI4TbCU

Both layers seem to have no topology errors but the Overlay function fails with an error

 

org.locationtech.jts.geom.TopologyException: found non-noded intersection between LINESTRING ( 95.49610823093388 4.949137070569244, 95.49623518653348 4.948912456969601 ) and LINESTRING ( 95.4962351860291 4.948912457861983, 95.49623518653348 4.948912456969593 ) [ (95.49623518627793, 4.948912457421728, NaN) ]

                          at org.locationtech.jts.noding.FastNodingValidator.checkValid(FastNodingValidator.java:140)

                          at org.locationtech.jts.geomgraph.EdgeNodingValidator.checkValid(EdgeNodingValidator.java:81)

                          at org.locationtech.jts.geomgraph.EdgeNodingValidator.checkValid(EdgeNodingValidator.java:46)

                          at org.locationtech.jts.operation.overlay.OverlayOp.computeOverlay(OverlayOp.java:231)

                          at org.locationtech.jts.operation.overlay.OverlayOp.getResultGeometry(OverlayOp.java:183)

                          at org.locationtech.jts.operation.overlay.OverlayOp.overlayOp(OverlayOp.java:86)

                          at org.locationtech.jts.operation.overlay.snap.SnapIfNeededOverlayOp.getResultGeometry(SnapIfNeededOverlayOp.java:75)

                          at org.locationtech.jts.operation.overlay.snap.SnapIfNeededOverlayOp.overlayOp(SnapIfNeededOverlayOp.java:37)

                          at org.locationtech.jts.geom.GeometryOverlay.overlay(GeometryOverlay.java:76)

                          at org.locationtech.jts.geom.GeometryOverlay.union(GeometryOverlay.java:157)

                          at org.locationtech.jts.geom.Geometry.union(Geometry.java:1367)

                          at org.openjump.core.geomutils.algorithm.IntersectGeometries.nodeLines(IntersectGeometries.java:478)

                          at org.openjump.core.ui.plugin.tools.IntersectPolygonLayersPlugIn.runIntersectionNew(IntersectPolygonLayersPlugIn.java:205)

                          at org.openjump.core.ui.plugin.tools.IntersectPolygonLayersPlugIn.run(IntersectPolygonLayersPlugIn.java:127)

                          at com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager$TaskWrapper.run(TaskMonitorManager.java:151)

 

What does this error mean, in which part of the operation it happens, and is there any way to get over it? I also tried a GDAL/GEOS based utility but it fails with similar error “TopologyException: found non-noded intersection between LINESTRING (104.098 0.627591, 104.098 0.627447) and LINESTRING (104.098 0.627484, 104.098 0.627447) at 104.09781931770398 0.62748351910904443".

 

-Jukka Rahkonen-

 

 

 

 

 

 

_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to