Skip to main content
Solved

GeometryValidator misses self-intersection error

  • August 18, 2016
  • 7 replies
  • 81 views

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

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

7 replies

erik_jan
Contributor
Forum|alt.badge.img+23
  • 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
Celebrity
  • 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


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.

 

 


mark2atsafe
Safer
Forum|alt.badge.img+59
  • Safer
  • 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

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
Celebrity
  • August 21, 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

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!