Skip to main content

So I'm having a bit of an issue using the fme postgis reader/writer combo. I have a big model that works perfectly using shapefiles (with some adaptations) or using esri gdb. The thing is that I'm trying to only use postgis as entry files and output files. The entry files arepolylines and the output files are polygons. The issue is with the ouput. The input of polylines from postgis seams to affect the ouput.

1. Shapefile reader: No problem

2. .gdb reader: No problem

3. postgis reader: polygons are converted to polylines

A few things to note:

1. When using the postgis reader I can still write the polygons in a shapefile

2. When using a shapefile or a gdb as input I can write the polygons in postgis format.

The issue to me seems that the spatial column is carried out from the entry data and I don't know how to get it to a blank slate.

Sorry for my bad english.

I've looked further into this issue and I'm pretty sure the error comes from the featureMerger. If I try writing to postgis before the featureMerger, it writes polygons and if I write after the transformer it writes Polylines. The suppliers are polylines and the requestor polygons. I've attached a snapshot of the transformer.


Ok so I just found a solution. I find it kind of stupid though and I don't know why it works... I just buffered the polylines coming into the featureMerger. Now that the supplier are polygons it works. What I don't understand is how that makes a difference. I guess the geometry column is carried out form the supplier, but why is it since the featureMerge type is set to attributes only.


I've looked further into this issue and I'm pretty sure the error comes from the featureMerger. If I try writing to postgis before the featureMerger, it writes polygons and if I write after the transformer it writes Polylines. The suppliers are polylines and the requestor polygons. I've attached a snapshot of the transformer.

If you don't need the supplier geometry (polylines), you can insert a GeometryRemover on the suppliers just before the FeatureMerger.


If you don't need the supplier geometry (polylines), you can insert a GeometryRemover on the suppliers just before the FeatureMerger.

That works! Thanks, I just don't know why the geometry column of the supplier would be carried


Reply