Solved

Fails OGC Valid - Inconsistent Orientation

  • 10 October 2016
  • 5 replies
  • 40 views

Badge

Hi all,

I have to convert spatialite data, but it's occurring some issues in the process resulting in fail. In order to verify this fail I put a GeometryValidator and set the "issues to detect" to all. Some issues can be rapaired but others no, above there's a print from the inspector.

There's away to solve this issue? Next i put an image from a workflow to correct this issues, i've sucess with polyline issues but not with polygons.

I've to automate this correction because it's about 300 spatialite databases. Thanks for all help in advance!

@takashi @david_r

icon

Best answer by takashi 10 October 2016, 18:26

View original

5 replies

Userlevel 1
Badge +21

It looks like you need to rebuild your donut polygons to correct the ring orientation. Exterior rings should be clockwise and interior counter clockwise.

Suggest you look at the donut hole extractor, use the orientor to ensure the correct ring ordering for exterior v. interior and then use a donutbuilder to rebuild the geometries, discarding the holes

correcting-incorrect-orientation.fmw

Userlevel 2
Badge +17

Hi @franciscocamell, I was able to reproduce the same situation as yours with a donut geometry. As @egomm mentioned, the reason seems to be the inconsistency between the orientations of outer boundary and inner boundary. The orientation of inner boundary should be reversed against the orientation of outer boundary. If their orientations are same, the GeometryValidator (Fails OGC Valid, OGC version: 1.2.0) determines that the donut is invalid.

[Edited] In my quick test, the GeometryValidator didn't repair the inconsistency, and the donut has been output via the Failed port.[/Edited]

In the interim, another possible workaround is to insert an Orientor before the GeometryValidator, and force the orientation to "Left hand rule" or "Right hand rule".

Userlevel 1
Badge +21

Hi @franciscocamell, I was able to reproduce the same situation as yours with a donut geometry. As @egomm mentioned, the reason seems to be the inconsistency between the orientations of outer boundary and inner boundary. The orientation of inner boundary should be reversed against the orientation of outer boundary. If their orientations are same, the GeometryValidator (Fails OGC Valid, OGC version: 1.2.0) determines that the donut is invalid.

[Edited] In my quick test, the GeometryValidator didn't repair the inconsistency, and the donut has been output via the Failed port.[/Edited]

In the interim, another possible workaround is to insert an Orientor before the GeometryValidator, and force the orientation to "Left hand rule" or "Right hand rule".

In the interim, another possible workaround is to insert an Orientor before the GeometryValidator, and force the orientation to "Left hand rule" or "Right hand rule". Even easier then, no need to rebuild donuts at all.
Userlevel 2
Badge +17

Hi @franciscocamell, I was able to reproduce the same situation as yours with a donut geometry. As @egomm mentioned, the reason seems to be the inconsistency between the orientations of outer boundary and inner boundary. The orientation of inner boundary should be reversed against the orientation of outer boundary. If their orientations are same, the GeometryValidator (Fails OGC Valid, OGC version: 1.2.0) determines that the donut is invalid.

[Edited] In my quick test, the GeometryValidator didn't repair the inconsistency, and the donut has been output via the Failed port.[/Edited]

In the interim, another possible workaround is to insert an Orientor before the GeometryValidator, and force the orientation to "Left hand rule" or "Right hand rule".

Sorry, I was wrong. The GeometyValidator didn't repair the inconsistency, so it's not a bug. Anyway, the Orientor would be a workaround.

 

 

Badge

Hi @egomm and @takashi, following your instructions I put for first in the workflow, in sequence:

deaggregator - orientor(forcing rigth hand rule) - geometryvalidator and works very fine, it's sparing me a precious time, thanks a lot guys.

Reply