Skip to main content

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.

 

 

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


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