Question

fme_basename of WKT files not loading correctly

  • 14 October 2019
  • 2 replies
  • 2 views

Hi,

I am using the WKT reader for text files containing each one WKT polygon.

I want to write them to shapefiles, using their basename as fanout.

But all files are getting the same value for fme_basename.

 

 


2 replies

Userlevel 1
Badge +21

I see the same behaviour, can you use a text reader followed by a geometryreplacer as a workaround?

Badge +2

Hi @jwisb,

Another option here is to use a Directory and File Pathnames Reader and point to the folder containing the WKT files. Then use a FeatureReader to read in the files using the path_windows attribute that is created by the Directory and Pathnames reader to set the dataset parameter in the FeatureReader:

You can then expose the fme_basename in the Attribute and Geometry Handling Section of the FeatureReader in the <Generic> Port > Attributes to Expose.

Not quite as fast as using the WKT reader but gives you options if you want to fanout based on the basename.

Hope that helps.

Reply