Skip to main content
Question

GeometryValiator and OGC Standartd

  • November 5, 2023
  • 7 replies
  • 52 views

abdullah83
Contributor
Forum|alt.badge.img+5

Hi, I need help and guidance. I have 2 questions.

 

1st. I've been using the GeometryValidator transformer and selected the OGC standard checks. When I run it, all my geometry fails. How can I check what is failing and how to fix it? If possible, please provide an example of how to fix it.

 

2nd. I've read the OGC Geopackage standard and found that there are some tables that need to be included in the Geopackage file, such as gpkg_spatial_ref_sys and gpkg_contents Table. Is there an automatic way in FME to create these tables, or do I need to do it manually?

 

Hereby, I am attaching the file for your reference, tqvm all.

7 replies

joepk
Influencer
Forum|alt.badge.img+20
  • Influencer
  • November 6, 2023

For your first question:

you can expose the _issues{} list attribute in the features of your Failed port. In the list attribute the issue location (xyz coordinates) can be found and in _isues{}.issue_found attribute you can find what check failed. The issues{}.supplementary_info{}.details field can provide you with more information.

 image Looks like this in your Table ViewimageIf you set Attempt Repair in the GeometryValidator to Yes, most issues will be solved. If not you can probably find most information needed to repair the issues yourself in the aforementioned fields.

 

Glad to help if you have specific issue information!


nielsgerrits
VIP
Forum|alt.badge.img+62

2nd. I've read the OGC Geopackage standard and found that there are some tables that need to be included in the Geopackage file, such as gpkg_spatial_ref_sys and gpkg_contents Table. Is there an automatic way in FME to create these tables, or do I need to do it manually?

 

If you use the "OGC GeoPackage" (Feature)Writer, these tables are created by the writer. You can see this by reading the written geopackage with a "SQLite Non-Spatial" (Feature)Reader. A geopackage is sqlite db with a spatial extension.


nielsgerrits
VIP
Forum|alt.badge.img+62

For your first question:

you can expose the _issues{} list attribute in the features of your Failed port. In the list attribute the issue location (xyz coordinates) can be found and in _isues{}.issue_found attribute you can find what check failed. The issues{}.supplementary_info{}.details field can provide you with more information.

 image Looks like this in your Table ViewimageIf you set Attempt Repair in the GeometryValidator to Yes, most issues will be solved. If not you can probably find most information needed to repair the issues yourself in the aforementioned fields.

 

Glad to help if you have specific issue information!

This.

 

Personally, I think a general tip for everyone starting to use FME is to work with 2 screens, one for the workflow, one for the results. Then run workspace on one screen and view results on the second screen in the Data Inspector.

 

Go to Tools --> Options --> Tab Workbench, enable the checkbox "Inspect with Data Inspector when Visual Preview window closed" and then close the Visual Preview window in workbench itself.

 

In the Data Inspector, when selecting a feature, you can see the complete structure of a feature in the Feature Information window on the right side. Including unexposed attributes, geometry type, geometry structure etc. I think this is really important for the learning curve, to actually see what a feature is.

 

Feature Information can also be enabled in the Visual Preview window, but it is already cramped with Translation Log, table and graphic. I also see people putting the Translation Log on a tab, never seeing the warnings and errors pass.

 

Might also be I'm getting old and have a hard time to adept to the new developments :)


abdullah83
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • November 6, 2023

For your first question:

you can expose the _issues{} list attribute in the features of your Failed port. In the list attribute the issue location (xyz coordinates) can be found and in _isues{}.issue_found attribute you can find what check failed. The issues{}.supplementary_info{}.details field can provide you with more information.

 image Looks like this in your Table ViewimageIf you set Attempt Repair in the GeometryValidator to Yes, most issues will be solved. If not you can probably find most information needed to repair the issues yourself in the aforementioned fields.

 

Glad to help if you have specific issue information!

Firstly, thank you for the guidance, but I have tried to expose some attributes (location_sample.x/y/z), but their values are <missing>. I also couldn't

find the attribute _issues{0}.supplementary_Info{0} in the 'port fail' feature,

 it only exists in 'port invalidpart,'

but its value is also <missing>. What is actually happening, and how can I fix it

because setting the transformer to 'Attempt Repair' doesn't help.


abdullah83
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • November 6, 2023

2nd. I've read the OGC Geopackage standard and found that there are some tables that need to be included in the Geopackage file, such as gpkg_spatial_ref_sys and gpkg_contents Table. Is there an automatic way in FME to create these tables, or do I need to do it manually?

 

If you use the "OGC GeoPackage" (Feature)Writer, these tables are created by the writer. You can see this by reading the written geopackage with a "SQLite Non-Spatial" (Feature)Reader. A geopackage is sqlite db with a spatial extension.

I previously opened the geopackage file in QGIS and then brought the layers from QGIS into PostGIS. However, in QGIS, I can only see the feature table that I set up in FME. I can't find tables like gpkg_spatial_ref_sys and gpkg_contents. Additionally, when I tried to export from QGIS to PostGIS, those tables are missing.

I also tried uploading the geopackage file directly to PostGIS, but it failed because PostGIS couldn't read the file.

 

i also try to checking using FME inspector but cant find that table. need your help.


joepk
Influencer
Forum|alt.badge.img+20
  • Influencer
  • November 8, 2023

Firstly, thank you for the guidance, but I have tried to expose some attributes (location_sample.x/y/z), but their values are <missing>. I also couldn't

find the attribute _issues{0}.supplementary_Info{0} in the 'port fail' feature,

 it only exists in 'port invalidpart,'

but its value is also <missing>. What is actually happening, and how can I fix it

because setting the transformer to 'Attempt Repair' doesn't help.

Try using the ListExploder instead of an AttributeExposer on your Failed features. List attributes are a little more tricky than regular attributes.


geomancer
Evangelist
Forum|alt.badge.img+60
  • Evangelist
  • November 8, 2023

I previously opened the geopackage file in QGIS and then brought the layers from QGIS into PostGIS. However, in QGIS, I can only see the feature table that I set up in FME. I can't find tables like gpkg_spatial_ref_sys and gpkg_contents. Additionally, when I tried to export from QGIS to PostGIS, those tables are missing.

I also tried uploading the geopackage file directly to PostGIS, but it failed because PostGIS couldn't read the file.

 

i also try to checking using FME inspector but cant find that table. need your help.

Probably these tables are not missing from the geopackage, but QGIS simply does not show them.

I have sometimes used DB Browser for SQLite to look inside a geopackage file (the geopackage format is a variant of SQLite).