Hi Jukka,
Interesting challenge.
Unfortunately, JTS is not 100% robust with respect to overlay operation.
Input datasets are not so big, but include some nearly collinear
segments like the ones starting from points
19.32985924670686 40.654469713106835
and
19.32985924670703 40.654469713106835
which lead to the error you reported
There are other cases of nearly collinear segments in the dataset and
fixing this one is not enough, but I could process the overlay after a
precision reduction which limits the coordinate precision to 9 decimals
(I had never noticed that it is not possible to keep more decimal with
the precision reducer plugin).
The overlay took 1h20. I will have a look to check if we can easily
improve the plugin without changing the overlay algorithm itself (which
is quite complex - MD is still working to improve it).
wrt NaN value, it is just because the error wraps a Coordinate object
which is a {x, y, z} triplet, z being NaN if coordinate is 2D.
Michaël
Le 30/11/2018 à 16:29, Rahkonen Jukka (MML) a écrit :
Hi,
I was reading this question about polygon overlay, or “union” as ESRI
calls it
https://gis.stackexchange.com/questions/304516/why-is-union-in-arcmap-much-faster-than-other-approaches.
The datasets are rather big but I believe that 15 GB of RAM it should
be possible to compute the overlay. I know that 8 GB is not enough.
There was one self-intersecting polygon in the data and I just deleted
that. However, OpenJUMP fails with this kind of errors.
com.vividsolutions.jts.geom.TopologyException: found non-noded
intersection between LINESTRING ( 49.07852376302085
-15.66880154079859, 49.07189806100846 -15.676539177405822 ) and
LINESTRING ( 49.08705075854589 -15.566531517643565, 49.07189806100846
-15.676539177405825 ) [ (49.07189806100846, -15.676539177405822, NaN) ]
at
com.vividsolutions.jts.noding.FastNodingValidator.checkValid(FastNodingValidator.java:145)
at
com.vividsolutions.jts.geomgraph.EdgeNodingValidator.checkValid(EdgeNodingValidator.java:94)
at
com.vividsolutions.jts.geomgraph.EdgeNodingValidator.checkValid(EdgeNodingValidator.java:59)
at
com.vividsolutions.jts.operation.overlay.OverlayOp.computeOverlay(OverlayOp.java:237)
at
com.vividsolutions.jts.operation.overlay.OverlayOp.getResultGeometry(OverlayOp.java:189)
at
com.vividsolutions.jts.operation.overlay.OverlayOp.overlayOp(OverlayOp.java:92)
at
com.vividsolutions.jts.operation.overlay.snap.SnapIfNeededOverlayOp.getResultGeometry(SnapIfNeededOverlayOp.java:96)
at
com.vividsolutions.jts.operation.overlay.snap.SnapIfNeededOverlayOp.overlayOp(SnapIfNeededOverlayOp.java:58)
at com.vividsolutions.jts.geom.Geometry.union(Geometry.java:1391)
at
org.openjump.core.geomutils.algorithm.IntersectGeometries.nodeLines(IntersectGeometries.java:478)
at
org.openjump.core.ui.plugin.tools.IntersectPolygonLayersPlugIn.runIntersectionNew(IntersectPolygonLayersPlugIn.java:209)
at
org.openjump.core.ui.plugin.tools.IntersectPolygonLayersPlugIn.run(IntersectPolygonLayersPlugIn.java:142)
at
com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager$TaskWrapper.run(TaskMonitorManager.java:152)
at java.lang.Thread.run(Unknown Source)
I wonder where the NaN coordinates are coming.
-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