Skip to main content
Solved

Duplicate point reader creates a multipoint writer

  • March 29, 2016
  • 4 replies
  • 39 views

rbovard
Contributor
Forum|alt.badge.img

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

Best answer by mark2atsafe

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
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

erik_jan
Contributor
Forum|alt.badge.img+23
  • Contributor
  • March 29, 2016

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.


mark2atsafe
Safer
Forum|alt.badge.img+59
  • Safer
  • March 30, 2016

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?


mark2atsafe
Safer
Forum|alt.badge.img+59
  • Safer
  • Best Answer
  • March 31, 2016

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

rbovard
Contributor
Forum|alt.badge.img
  • Author
  • Contributor
  • April 1, 2016

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