Skip to main content
Solved

Dynamically writing MultiPoint features to a shapefile

  • October 2, 2020
  • 2 replies
  • 75 views

simon_maddern
Contributor
Forum|alt.badge.img+1

For some background on what I'm doing, I am trying to create a workspace to export some data from an Oracle database and write to a shapefile. As I don't know the attributes/geometry types ahead of time I'm making use of the SchemaSetter and dynamic options in a FeatureWriter. 

 

This is mostly working fine, but I'm having issues when it comes to MultiPoint features.

 

I've created and attached a very simple workspace that demonstrates the problem I'm having.  I'm using six creators to create two features of each geometry type, then aggregating these together to create a MultiPolygon, MultiLine and MultiPoint. I'm then running these three features through a SchemaSetter and writing to a shapefile, with a Geometry type of 'First Feature Defines Geometry Type'.

 

The MultiPolygon and MultiLine features get written to the file and look as I'd expect in a GIS program.  The MultiPoint doesn't however, as the log states that:

2020-10-02 15:09:00|   1.1|  0.0|WARN  |Shapefile Writer: Feature type 'Creator_6' recieved an incompatible geometry type 'MultiPoint', expected 'Point'. The following feature cannot be written to this file and will be discarded

I could filter out the different geometry types and send them to different writers (or different ports within the same FeatureWriter) with the geometry type hardcoded, but I'd rather not go down this route as my workflow is a lot more complex than the attached workspace suggests. Basically, if there are any MultiPoint features then it'd be likely that regular Point features would also be present, which I'd want to combine in a single file (with a geometry type of MultiPoint). I can see this logic getting a bit messy if I start hardcoding the geometry types and sending the data down various paths.

 

I'm wondering if anyone can think of a cleaner solution to this problem? I'm using FME Desktop 2019.2 in case that changes things.

 

Thanks in advance.

Best answer by ebygomm

I'd advise sending this to Safe, it looks like an issue with the SHAPEFILE writer - if you use the old writer format - ESRISHAPE - your workspace runs as expected

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.

2 replies

ebygomm
Influencer
Forum|alt.badge.img+46
  • Influencer
  • Best Answer
  • October 5, 2020

I'd advise sending this to Safe, it looks like an issue with the SHAPEFILE writer - if you use the old writer format - ESRISHAPE - your workspace runs as expected


simon_maddern
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • October 6, 2020

Thanks very much for the help @ebygomm​ , I can confirm that the old writer works as expected.

 

I've submitted a bug report to Safe.