Skip to main content
Question

Error : Geometry type (Polygon) does not match column type (MultiPolygon)


Forum|alt.badge.img+1

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

6 replies

daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • November 2, 2023

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.


Forum|alt.badge.img+1
daveatsafe wrote:

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.

 

Capture1 

Capture


daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • November 3, 2023
kumarkannan1980 wrote:

Hi @daveatsafe​ ,

 

Thanks for the reply, after exposing the attribute postgis_type I am getting same error. Please find the relevant screenshot.

 

Capture1 

Capture

Hi @kumarkannan1980​,

After the AttributeExposer, please use an AttributeRemover to remove the postgis_type attribute.


Forum|alt.badge.img+1
kumarkannan1980 wrote:

Hi @daveatsafe​ ,

 

Thanks for the reply, after exposing the attribute postgis_type I am getting same error. Please find the relevant screenshot.

 

Capture1 

Capture

Hi @daveatsafe​ 

Thanks for the reply.

 

I am getting same error after implementing attribute remover. please find the snapshot.

 

Capture


daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • November 6, 2023
kumarkannan1980 wrote:

Hi @daveatsafe​ ,

 

Thanks for the reply, after exposing the attribute postgis_type I am getting same error. Please find the relevant screenshot.

 

Capture1 

Capture

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.


Forum|alt.badge.img+1
kumarkannan1980 wrote:

Hi @daveatsafe​ ,

 

Thanks for the reply, after exposing the attribute postgis_type I am getting same error. Please find the relevant screenshot.

 

Capture1 

Capture

Hi @daveatsafe​ ,

 

Thanks for your reply.

 

I tried as per your suggestion and got the same error.

 

 

Capture


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings