Skip to main content
Question

Polygon can't be written to file geodatabase

  • 11 February 2013
  • 4 replies
  • 55 views

I'm reading polygons from SDE and selecting them with the spatial filter transformer. I add and calculate a few attributes and then output to file geodatabase but I get an error message saying that non poly feature can't be written to poly feature class in file gdb.

 

 

Why the error? Data is coming from SDE so geometry is fine, and I'm not altering it in my script. 

 

 

This always seem to occur with the same polygon. Any ideas or suggestions?

 

 

thanks

 

 

Hi,

 

 

you could check all your geometry with the GeometryFilter and GeometryValidator (in FME 2013) first. Just to make sure, that there are no geometry issues.

 

 

This is my first idea... maybe it helps...

 

 

Best regards,

 

Stefan
Do check Stefan's suggestion, but also if you are joining to another geometry type to get your additional attributes, check that you are not joining onto your feature a geometrytype attribute from another file geodatabase. It's common that if you get attributes from the same format that you are writing to you can quite by accident end up attaching an attribute to a polygon that defines it as a point and then the writer rejects it. With geodatabase I think you need to have a look at the attribute geodb_type from your incoming features and remove it before the join.
Hello guys,

 

 

I tried the GeometryFilter before but had the same problem. Unfortunately I was asked to write the script in FME 2012 so the GeometryValidator is out of question.

 

 

I will check feature mergers, to make sure the geodb_type is not causing any trouble. Thank you both for the suggestions.
Solved. The offending transformer was LineOnAreaOverlayer. The Area port is carrying features with fme_geometry = fme_line, I don't know why.

 

 

I used a GeometryCoercer after the above transformer and set it to fme_polygon and it works.

 

 

Thank you for the feedback.

Reply