Skip to main content

Hi,

 

I have a street network of 3D polygons and the set is not 100% topologically correct. There may be small gaps or overlaps between consecutive road polygons. And normally two consecutive polygons should share the same set of vertices at their junction (materialized by the line separating 2 adjacent polygons).

 

imageThis would be very easy to solve in 2D using transformers such as the Snapper, AreaOnAreaOverlayer, AreaGapAndOverlapCleaner or TopologyBuilder . But these transformers seem to support 2D only and as a result will not take the z information which is stored in each polygon vertex coordinate. Roads crossing at different z value (bigger than a tolerance of x meters) should not obey to the same rules as those roads which are consecutive.

Do you see a possible solution using FME? I was thinking about classifying polygons according to their distinct heights, also cutting polygons with more than 1 z value into 2 parts, and then running the AreaGapAndOverlapCleaner on them with the Group By on the mapped height level (each "level" would be treated separately as in 2D). However I am probably overlooking a simpler or more elegant solution. Any advise is welcome.

 

Thank you!

 

Olivier

Have a try at the 3DSnapper | FME Hub (safe.com) custom transformer.

It uses numpy voodoo to snap vertices in 3D.


Thanks @caracadrian​ ! I had indeed tried the 3DSnapper. However this transformer does not do Segment Snapping like the traditional Snapper. So a vertex of one polygon cannot be snapped to a segment of another polygon (in case the 2 adjacent polygons don't initially share common vertices).

Situation:

image overlapZoomed (the selected pink polygon does not share a vertex with the other 2 polygons and we see a small overlap):

image zoom overlap


So, how about this:

Use Snapper with Segment snapping - it preserves vertex elevation and interpolates elevation along an edge when creating new vertices and send the output from Snapped and Untouched to 3DSnapper to adjust the elevation of the vertices.

Snapper and 3DSnapperI tested this on a sample I created in Autocad and it does the job.


So, how about this:

Use Snapper with Segment snapping - it preserves vertex elevation and interpolates elevation along an edge when creating new vertices and send the output from Snapped and Untouched to 3DSnapper to adjust the elevation of the vertices.

Snapper and 3DSnapperI tested this on a sample I created in Autocad and it does the job.

Hi @caracadrian​ ! Thank you! This seems to do the trick for the data I have tested so far. The only downside is the fact that the ordinary Snapper will probably sometimes snap vertices belonging to significantly different heights or elevations (z), for instance belonging to roads which are not connected to each other in reality. But even then, if the snapping threshold is relatively small it should not lead to major data discrepancies. I will come back to you if required. :-)


Reply