I have a shapefile representing image footprints with as attribute the image name.
I have a shapefile containing multiple polygons with an attribute ‘name’ representing buffered lines.
I have a workbench that selects all the image footprints per line and copies the images to a folder, fanned out with the line name.
It does that perfectly, but some images exist in multiple lines and my wb only copies the image to the first line and doesn’t copy it to the other lines.
How can I solve that?
Page 1 / 1
Hi,
I just tested it in FME 2024 and it seems to be working for me. Where is the attribute file_dest_dataset coming from in your writer? In my writer that is not a standard format attribute. What are you using it for and can you try removing it and running the workbench again?
In the attributekeeper just in front of it, I added the UGECOD because I use that as a fanout expression.
By adding that the extra dataset appeared, but I don’t use it.
Here is the same wb with some more explanation.
If I understand correctly you want to write to 1 location but if you for example have geometry 1,2 and 3 and a file named test.txt you want to have a result of 1_test.txt, 2_test.txt, 3_test.txt. If this is what you are looking for you can rename your files using the filecopy_dest_filename attribute and turning off the feature fanout. If you want to use subfolders you can use an attribute value in the subfolder settings of the writer.
@birgit
No, that's not what I want.
We flew over several high voltage lines and took pictures with an air sensor. Now I want the photos per high voltage line in a folder with the name of the respective high voltage line.
Of the photos I have a shapefile with the image name as an attribute. This way I can easily create the path to the images.
I also have a shapefile with the high voltage lines (polygons) with their name as attribute.
This way, I can easily select the images per power line and fan them out into a folder with the name of the power lines.
Now the problem. Some images are part of multiple powerlines and what I can see is that these images are only copied to one powerline and not the others.
Hi @koenvdw
Any chance by replacing the SpatialFilter with a SpatialRelator (Generate List enabled - and your name attribute as a Selected Attribute) and a ListExploder?
Jasper
I agree with Jasper, if you use a spatialrelator and a list exploder you get a feature per image per powerline and if you have an image that belongs to two powerlines then you wil get 2 features, one for powerline a and one for powerline b. Then you need to turn off fanout on the writer you have and use the attribute containing the power line name as the subfolder. You probably do need to change the settings of your writer in the navigator so that it will also create the subfolder because you probably turned it off.
@jasperwis
Thanks that did it. I’ll use this method from now on.