If I read you correctly you want a CSV file per feature with the coordinates of the bounding box as the filename.
You can do this as follows:
- Use a BoundsExtractor your features box. This will store the min and max x and y coordinates in a set of attributes (_xmin, _ymin, _xmax and _ymax by default, you can change those names if you want to)
- Set up the CSV File name in the output feature type properties to be a concatenation of those attrbitues.
Keep in mind though that this will generate really unwieldy filenames.
@redgeographics thanks for the reply, I apologise for the unclear question it was written on a very tired Friday morning! I want one file with all the features inside the bounding box in the file with the filename set as the X&Y; Max & Min values. I have tried using @Value(_xmin) etc. however when I run this it returns
"Features With No Schema defined
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
371
342240 1
==============================================================================
Total Features NOT Written 372"
Hi Phil (@phil_peters)
I've created an example workspace that I think does what you need. It's for FME 2016 and you can find it (as a template with data) here: https://www.dropbox.com/s/s7y4nyq7s2kia0j/CSVBoundsFilename.fmwt?dl=0
Hope this helps
Mark
Hi Phil (@phil_peters)
I've created an example workspace that I think does what you need. It's for FME 2016 and you can find it (as a template with data) here: https://www.dropbox.com/s/s7y4nyq7s2kia0j/CSVBoundsFilename.fmwt?dl=0
Hope this helps
Mark
Hi Mark, thanks for this. I am however using FME 2014 so am unable to see most of the transformers.
Thanks though!
I guess that you have set Dynamic properties to the writer feature type. If so, there could be a wrong setting in the options (e.g. schema definition name).
The user interface for dynamic properties setting has been changed drastically in FME 2015.1, I forgot the interface of FME 2014. If you post some screenshots illustrating your settings for the feature type properties and dynamic properties options, it might help us to find what is wrong.
Hi Mark, thanks for this. I am however using FME 2014 so am unable to see most of the transformers.
Thanks though!
OK, try this: https://www.dropbox.com/s/761ikonn97len9y/CSVBoundsFilename2014.fmwt?dl=0
Brilliant thanks so much Mark, I now have this working after some tweeking getting it into my project!