Skip to main content

Greetings.

I have a self-intersecting polygon which is not being recognised as such by the GeometryValidator. The "Self-intersections in 2D" option in the transformer parameters is checked and most other self-intersecting geometries are detected. However, a small percentage are not. How come FME sees this as a valid geometry when my oracle database rejects it?

SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT

FME Desktop 2016.1.0.1 (20160516 - Build 16494 - WIN32)

I have attached the geometry as ESRI shapefile to this post. Any insight would be much appreciated.

Does that geometry fail any other test too?

The GeometryValidator tests top down and will list all failures, but will show the first failure as the error.


Hi @philipp_voelker, looks like the polygon touches with itself if you see it with Data Inspector, but there seems to be a very small gap actually. In my quick test, the Bufferer with amount of 1e-9 didn't create intersection, but with amount 1e-8 created intersection.

Left: Buffer Amount = 1e-9, Right: Buffer Amount = 1e-8


Does that geometry fail any other test too?

The GeometryValidator tests top down and will list all failures, but will show the first failure as the error.

No, it passes all tests.

 

 


Hi @philipp_voelker, looks like the polygon touches with itself if you see it with Data Inspector, but there seems to be a very small gap actually. In my quick test, the Bufferer with amount of 1e-9 didn't create intersection, but with amount 1e-8 created intersection.

Left: Buffer Amount = 1e-9, Right: Buffer Amount = 1e-8

Thanks for the answer, I will have a go at using the Bufferer once I'm back at work.

 

 


Hi @philipp_voelker, looks like the polygon touches with itself if you see it with Data Inspector, but there seems to be a very small gap actually. In my quick test, the Bufferer with amount of 1e-9 didn't create intersection, but with amount 1e-8 created intersection.

Left: Buffer Amount = 1e-9, Right: Buffer Amount = 1e-8

Yes, maybe Oracle tests to fewer decimal places than FME. Perhaps use a CoordinateRounder before the GeometryValidator to test that (and hopefully fix the issue)

 

 


Hi @philipp_voelker, looks like the polygon touches with itself if you see it with Data Inspector, but there seems to be a very small gap actually. In my quick test, the Bufferer with amount of 1e-9 didn't create intersection, but with amount 1e-8 created intersection.

Left: Buffer Amount = 1e-9, Right: Buffer Amount = 1e-8

The issue is that vertices for self-touching points are missing on the edge. The Chopper and Snapper (Segment Snapping) might work to insert vertices so that the GeometryValidator can detect self-intersection. Assuming that the "igds_eleme" is unique ID attribute:

 


Hi @philipp_voelker, looks like the polygon touches with itself if you see it with Data Inspector, but there seems to be a very small gap actually. In my quick test, the Bufferer with amount of 1e-9 didn't create intersection, but with amount 1e-8 created intersection.

Left: Buffer Amount = 1e-9, Right: Buffer Amount = 1e-8

 

Using the Bufferer was the right call. Thanks a lot, @takashi!

Reply