Hi Jukka,

I looked at the datasets and the plugin more closely.

The datasets are not really bad, but some segments, very closed to each others, raise the TopologyException you get. To make these segments equals, I changed a little bit the resolution of the dataset, keeping only 9 decimals, a solution which may not be acceptable in all cases (for these datasets 1E-9 degree means less than 1mm which is still very small
compared to the dataset precision).
The main drawback of changing the resolution is it makes some geometries invalid, which makes the situation worst. A deeper look show that changing resolution makes geometries invalid because some have very thin spikes. I removed
these spikes (with the dedicated plugin).
All in all :
- Aqueduct_States : 1 invalid geometry -> repaired with MakeValid, then changed to 1E-9 resolution - hybas06_v04 : remove (108) spikes under 1E-9 distance and 1E-3 angle, then change resolution => both datasets have now a reasonable resolution, only valid geometries, and a consistent topology.

I also could improve the overlay plugin because it spent most of its time to retrieve attributes from the initial datasets after the overlay operation. Now the whole operation is less than half an hour :
- about 2'30 to prepare the dataset (including noding the linework)
- about 20' to polygonize
- less than 1' to retrieve attributes (used to be nearly 1 hour before optimization)

I could not process the whole dataset with only 8G of memory, but it passes with 12G.

Regards,

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

Reply via email to