Skip to main content

This question comes just after a question about lines snapping I asked: https://community.safe.com/s/question/0D5Dm000005KcrfKAC/linecombiner-with-attribute-not-working

 

Input data are snapped and combined lines, which form a whole network. Each lines being snapped before, there should not be small holes between these. In order to have a proper network and edges and nodes relationship, I use the TopologyBuilder.

From 3935 lines as input, it creates 3935 edges and 3502 nodes. But in these nodes, there are a few duplicates with a distance of 10e-6 meters... Even if before that, the lines have been snapped with 1 meter value.

The location of these duplicates is often at nodes where the touching lines come from different datasources (Postgis / Shapefile), but have been snapped before and with the same attributes.

 

Do you know how to fix that ? Here is the configuration for the TopologyeBuilder:

TopologyBuilder parameters

I would look into the GeometryValidator. Under the Issues to Detect parameter you will find a Duplicate Consecutive Point option where you can specific the tolerance. You also have the option to attempt to repair the issue. If that doesn't give the desired result, you can also try the Generalizer using the Thin algorithm.


I would look into the GeometryValidator. Under the Issues to Detect parameter you will find a Duplicate Consecutive Point option where you can specific the tolerance. You also have the option to attempt to repair the issue. If that doesn't give the desired result, you can also try the Generalizer using the Thin algorithm.

Thanks for the idea. But I'm afraid it will make the work by TopologyBuilder uselees: this transformer creates attributes with nodes ID for each edge. If the duplicate nodes have to be removed with Validator, the attributes (foreign keys) must then be changed to keep the single point where I may have 2 or 3 extra points...

I think there should be a trick on the TopologyBuilder configuration, or to clean the data before, since the error happens when there are different datasources at the very input.


Reply