Skip to main content

I have a shapefile in which the download URLs of many tiff images are written in the attribute "RGB". I have to download all tiffs and save to my filesystem.

 

I first tried with the HTTPcaller transformer which downloaded the files but named them all after the header description. I couldn't find a way to determine the filename in the transformer when "save response Body to" was set to "file".

 

Then I saw a post from Takashi in which the FeatureReader transformer was used to download files. This downloads the files into an fme-Temp directory and I am able to name the indivual files according to an attribute in the Shapefile, but after the transformer has done it's work, all the tiffs are automatically deleted.

 

Unfortunately I have no idea what's doing on here but i'm sure i'm only a short step away from being able to download the tiff files to a directory of my choice with the correct filename.

 

Could anyone show me what i'm forgetting?

 

DownloadTiffs

I would just use the HTTPCaller, but upstream of it you need to define the path you want to write to for each record in the shape, based off the filename in the rgb column.

 

You can do this with an AttributeCreator transformer. Then feed that attribute in the HTTPCaller.

 

2021-11-05_10h56_23 


@nielsgerrits​ has the correct solution here - but to illustrate it I made this one of my question-of-the-week and added it to a video here: https://youtu.be/uyF7MEuBdK0


Reply