Solved

Using RasterToPolygon Coercer results in Hole Outside of Shell Geometry Error. The Geometry Validator is set to OGC. Attempt to repair results in no repaired geometries.


I’m currently receiving polygon geometry from various consultants, using various methods for deriving the polygons from Raster’s (GeoTiff).

As part of our Data Validation process I validate all geometries to OGC Standards. Which, depending on software used, results in different issues, or not.

While working through methodologies, to provide consultants with Software Specific guidance, I noticed that when using FME to generate the polygons it results in a Hole Outside of Shell geometry Issue's see Image below.

 

fme_geom_issues 

We have only come accross this issue in FME, we have used ArcMap, ArcGIS Pro, QGIS and GDAL/OGR. The ESRI products result in 'Self Intersections', but the ArcGIS Pro 'Repair Geometry' Tool set ot OGR, fixes the issue. Both QGIS and GDAL/OGR are the only tools tested which by default result in OGC Compliant Geometries as outputs.

I would like to be in a position to generate OGC compliant outputs from FME, considering we are using FME for our Validation process.

I am aware that a buffer of 1mm of the affected geometries or the Issue Locations would also fix the error, but I want to avoid a situation where the polygons differ from the raster's.

icon

Best answer by DanAtSafe 4 April 2023, 18:11

View original

7 replies

Userlevel 1
Badge +11

Hi @richemcd​ This error hasn't been seen in the Dissolver for a long time. Which FME build are you using? Please submit a case at https://community.safe.com/s/submit-case Thanks!

Hi @richemcd​ This error hasn't been seen in the Dissolver for a long time. Which FME build are you using? Please submit a case at https://community.safe.com/s/submit-case Thanks!

Hi @danatsafe​ , im using FME Desktop 2021. If I update to the curent version, will that issue be resolved?

 

Userlevel 1
Badge +11

Hi @danatsafe​ , im using FME Desktop 2021. If I update to the curent version, will that issue be resolved?

 

I can't guarantee that FME 2022 will solve this problem. (2023 betas aren't available right now.) However if you submit a case and we verify the issue, the fix will only be in FME 2022.2+ or FME 2023.+, not FME 2021.

Hi @danatsafe​ , im using FME Desktop 2021. If I update to the curent version, will that issue be resolved?

 

Thanks for your help, I have submitted a case as you suggested.

Hi @danatsafe​ , I would just want to take the oppertunity to give some update on the issue and also asking some followup queries.

So FME 2022 does now generate OGC Compliant geometries, when checked via the Geometry Validator. As a sanity check, I re-ran the data which was detected as invalid, which to my supprise, it was passed. This would suggest that the Validator has been updated and not the Raster Coercer. So whats my question.....

 

Does the Validator now accept "Hole Outside of Shell" as a valid output? or was the Validator incorrectly classifying the geometries as "Hole Outside of Shell"??.

 

I think its important to get an answere to this..

Userlevel 1
Badge +11

Hi @danatsafe​ , I would just want to take the oppertunity to give some update on the issue and also asking some followup queries.

So FME 2022 does now generate OGC Compliant geometries, when checked via the Geometry Validator. As a sanity check, I re-ran the data which was detected as invalid, which to my supprise, it was passed. This would suggest that the Validator has been updated and not the Raster Coercer. So whats my question.....

 

Does the Validator now accept "Hole Outside of Shell" as a valid output? or was the Validator incorrectly classifying the geometries as "Hole Outside of Shell"??.

 

I think its important to get an answere to this..

Hi @richemcd​ Are you able to share any sample data with C689682? thanks

Hi @danatsafe​ I cant share the data, its commercially sensative, but I completed some additional checking and my results where as follows.

The machine/workbench (FME 2021 Build 21302) where the original issues where detected, reported the following..

  1. For Polygon's generated through FME's RasterToPolygonCoerce, failurers where Hole Outside of Shell.
  2. For Polygons Generated through ESRI ArcGIS Pro, where shown to have Self Intersections
  3. Polygons Generated through GDAL/OGR (QGIS) showed no errors.

The geometrys where then fixed using the following methods..

  1. FME, on reccomendation from SAFE, Utilised the Generalizer, set to McMaster 99%
  2. ArcGIS Pro utilised the Repair Geometry tool setting the Validation Method to OGC
  3. GDAL/OGR (QGIS) No fix required

Following this, all geometry's Passed the Geometry Validator in FME 2021 Build 21302. We thought that was it and we had a solition we could go back to the Contractors with. That was until I was carrying out some additional checking. FME 2021 Build 21302 had been updated to FME 2022 Build 22795 but we still had one other machine with FME 2021 on it, but Build 21784.

Running the same tests on FME 2021 Build 21784 and following the same steps as above...

  1. For Polygon's generated through FME's RasterToPolygonCoerce, now PASS the Geometry Validator with no errors.
  2. Previously generated Polygons through FME Build 21302 PASS the Geometry Validator with no errors.
  3. Polygons Generated through ESRI ArcGIS Pro, where Self Intersections
  4. Polygons Generated through GDAL/OGR (QGIS) showed no errors.

I can also conform that the same results can be seen from using FME 2022 Build 22795...

  1. For Polygon's generated through FME Build 22795 RasterToPolygonCoerce, now PASS the Geometry Validator with no errors.
  2. Previously generated Polygons through FME Build 21302 RasterToPolygonCoerce PASS the Geometry Validator with no errors.
  3. Polygons Generated through ESRI ArcGIS Pro, where Self Intersections
  4. Polygons Generated through GDAL/OGR (QGIS) showed no errors.

Again, when I run the ArcGIS Pro Repair Geometry tool on the ArcGIS Generated data, it passes.

It would seem that the old 2021 version of FME Build 21302 had a problem with the validator, whats odd is that it was only for geometrys generated through FME, now it could be linked to the RasterToPolygonCoercer, but it passes in later versions.

It seems that we will have to be rigirous in testing of FME Updates in future, also waiting for 6-8 months after a new release before we adopt it, so as to minimise issues like this.

This has either clarified the current situation or has further muddied it all! Im hoping for clarifiation...

Reply