Skip to main content
Question

fme_basename of WKT files not loading correctly


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

ebygomm
Influencer
Forum|alt.badge.img+39
  • Influencer
  • October 14, 2019

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


chrisatsafe
Contributor
Forum|alt.badge.img+2
  • Contributor
  • October 17, 2019

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.


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