Skip to main content

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

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


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".


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.

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.

 

 


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