Skip to main content

Hi all,

Working with PostGIS, I noticed a strange behaviour concerning geometry type when duplicating reader to writer:

  • postgis_point > postgis_multipoint
  • postgis_multipolygon > postgis_multipolygon
  • postgis_multilinestring > postgis_multilinestring

Why the points are handled like that (point > multipoint)? And is there a way to avoid that?

Thanks in advance.

Rémi

I do not know the reason for this behavior.

But the way to avoid this is creating (or setting the value of) an attribute postgis_type with value postgis_point before writing.

That can be done by using the AttributeCreator (or AttributeManager in 2016) transformer.


I filed a problem report with our developers. It is PR#69242

Basically I can see why we might want to do that, but I want to get clarification. In this example it certainly does not help you! I assume you have the parameter 'Create Generic Spatial Columns" set to No?


Hi @rbovard

I discussed this with our developers and this is something that works as designed. I suppose that it is more inclusive to set the field type to multipoint. It's one of those things that helps in other scenarios, but not in yours. In short, we won't be making any changes to this behaviour.

In this scenario one option is to set the Generic Spatial Columns parameter to Yes. Then it should create plain point columns. Another solution is to manually set the column type in the workspace. Thirdly, you could also use the SQL Statement to Execute before Translation parameter to manually create the table.

Hope this helps.

Regards

Mark

Mark Ireland

 

Product Evangelist

 

Safe Software

Hi @Mark2AtSafe,

Thanks for your detailed answer. You're right, this behaviour isn't optimal for me (I still don't get the benefit of it) but I can live with it.

The second solution you proposed is what I'm doing, but it takes some time.

Best regards.

Rémi


Reply