Skip to main content

Hello, I have a folder of photos with filenames that contain pointid's (e.g. 123456_photo1.jpg). Each point may have more than one photo associated with it. So there may be many photos containing the same point id in their name. I'd like to create a list of photos per point and assign the list to a field and write to geojson.

I tried using the tester and feature merger but I can't seem to get it to work.

I basically want for every point id, check if the filename contains the point id, add photo file name to list, then assign list to field called 'photos'.

Thanks!

I would start by using the "Directory and File Path" reader.

That reader returns the file names (not the file contents).

Then use the AttributeSplitter (split on _) to get the point_id.

Then the Aggregator (on point_id), using a list to get all file names per point and if needed a ListConcatenator to create the comma separated list of photo's).

Or the Sorter to sort by point ID before outputting to whatever you want.


Reply