I using geometry validator to rectify the geometry errors . Input of the geometry validator is polygon data from PostGIS database and repaired geometry need to update in same table. While executing the FME it shows "Geometry type (Polygon) does not match column type (MultiPolygon)" . Please advise to clear this error.
Hi @kumarkannan1980,
It appears that the GeometryValidator may be changing polygons to multipolygons (or vice versa) during its cleaning process. However, the attribute postgis_type still contains the original type, leading to a mismatch when writing. The easiest fix is to expose the format attribute postgis_type in the source feature type Properties, then use an AttributeRemover transformer to remove it. The PostGIS writer will then determine the type from the actual geometry, instead of the attribute, resolving the mismatch.
Hi @kumarkannan1980,
It appears that the GeometryValidator may be changing polygons to multipolygons (or vice versa) during its cleaning process. However, the attribute postgis_type still contains the original type, leading to a mismatch when writing. The easiest fix is to expose the format attribute postgis_type in the source feature type Properties, then use an AttributeRemover transformer to remove it. The PostGIS writer will then determine the type from the actual geometry, instead of the attribute, resolving the mismatch.
Hi @daveatsafe ,
Thanks for the reply, after exposing the attribute postgis_type I am getting same error. Please find the relevant screenshot.
Hi @daveatsafe ,
Thanks for the reply, after exposing the attribute postgis_type I am getting same error. Please find the relevant screenshot.
Hi @kumarkannan1980,
After the AttributeExposer, please use an AttributeRemover to remove the postgis_type attribute.
Hi @daveatsafe ,
Thanks for the reply, after exposing the attribute postgis_type I am getting same error. Please find the relevant screenshot.
Hi @daveatsafe
Thanks for the reply.
I am getting same error after implementing attribute remover. please find the snapshot.
Hi @daveatsafe ,
Thanks for the reply, after exposing the attribute postgis_type I am getting same error. Please find the relevant screenshot.
Do you still get the error if the Snapper is disabled? Adding the separate stream of features through the Snapper will result in duplicate records being sent to the database.
Hi @daveatsafe ,
Thanks for the reply, after exposing the attribute postgis_type I am getting same error. Please find the relevant screenshot.
Hi @daveatsafe ,
Thanks for your reply.
I tried as per your suggestion and got the same error.