Skip to main content
Solved

GeometryValidator misses self-intersection error


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.

Best answer by takashi

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

View original
Did this help you find an answer to your question?

7 replies

erik_jan
Contributor
Forum|alt.badge.img+17
  • Contributor
  • August 18, 2016

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.


takashi
Influencer
  • Best Answer
  • August 19, 2016

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


erik_jan wrote:

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.

 

 


takashi wrote:

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.

 

 


mark2atsafe
Safer
Forum|alt.badge.img+44
  • Safer
  • August 19, 2016
takashi wrote:

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)

 

 


takashi
Influencer
  • August 21, 2016
takashi wrote:

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:

 


takashi wrote:

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!

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings