Skip to main content
Question

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


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

4 replies

matt_ccc
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • 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
  • 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
  • November 7, 2019
chrisatsafe wrote:

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
  • November 7, 2019
matt_ccc wrote:

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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings