Skip to main content
Question

Convert WKTpolygon to polygon geom - Usual modifiers don't seem to be able to cope with it?

  • November 6, 2019
  • 4 replies
  • 53 views

matt_ccc
Contributor
Forum|alt.badge.img+2

Have data in a non-spatial SQL database stored in a field titled "WKTPolygon" with geometry structured as shown below:

MULTIPOLYGON (((257187.77487182617 252016.49029541016, 257197.35565185547 252041.80303955078, 257216.97064208984, etc etc

Tried all the suggestions from google searching and Geometry Replacer creates lots of individual vertex points for the polygon geometry, but not actual polygons, and all the others error on the first record.

 

Cheers. M

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

matt_ccc
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • 3 replies
  • November 6, 2019

Geometry Replacer does seem to work - when selecting MapInfo as the output.

Seems it is just .SHP output where the result is lots of vertex points.

FME 2018.1.1.2


chrisatsafe
Contributor
Forum|alt.badge.img+2
  • Contributor
  • 606 replies
  • November 6, 2019

Hi @matt_ccc,

If you inspect the output from the GeometryReplacer are the polygons being created correctly or are there multiple features with different geometry? Also, what do you have set for the Geometry Parameter in in the Shapefile Writer Feature Type Parameters?

If your dataset contains multiple geometries (i.e. POINT, MULTIPOLYGON, LINESTRING, etc.) you may need to use a GeometryFilter prior to the writer to ensure features of the same geometry are being sent to the same writer feature type.


matt_ccc
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • 3 replies
  • November 7, 2019

Hi @matt_ccc,

If you inspect the output from the GeometryReplacer are the polygons being created correctly or are there multiple features with different geometry? Also, what do you have set for the Geometry Parameter in in the Shapefile Writer Feature Type Parameters?

If your dataset contains multiple geometries (i.e. POINT, MULTIPOLYGON, LINESTRING, etc.) you may need to use a GeometryFilter prior to the writer to ensure features of the same geometry are being sent to the same writer feature type.

thanks, that will probably sort it.

 

probably more just confusion by why the .TAB exporter dealt with it without issue whereas the .SHP exporter needs extra processing.

 

kind regards. M


chrisatsafe
Contributor
Forum|alt.badge.img+2
  • Contributor
  • 606 replies
  • November 7, 2019

thanks, that will probably sort it.

 

probably more just confusion by why the .TAB exporter dealt with it without issue whereas the .SHP exporter needs extra processing.

 

kind regards. M

Hi @matt_ccc,

Main reason is that MapInfo and Shapefile have different specifications and geometry support. For example, you are able to do this with the MapInfo Writer because "a single MapInfo map file can contain many different types of geometry however, the associated attributes must have the same number and type of fields for each entity in the file." as per the documentation.