Skip to main content

I have over 30 000 .png files that have been georeferenced. However, some of the files have up to 3 or four bands when only 1 band is necessary. So I want to change this. 

 

I want to change the number of band from 4 or 3 to 1 for each file and then replace the old one with the new så I dont loose the accompanied georeferencing files. 

I also want some type of iterator for this, since i have my files in a directory tree: Directory → Subdir → folder → Files

You can select multiple .png files by hitting the drop-down button in Dataset section of the Reader, and clicking on “Select Multiple Folders/Files”.

From there, you can use the combination of the RasterSelector to select the band that you would like to keep, together with the RasterBandKeeper that retains only the selected band. 

Afterwards you can right your new single band rasters to a new png file, using the fme_basename as a raster file name, so all your input images will be writter eperately. 

Hope this helps! 


You can select multiple .png files by hitting the drop-down button in Dataset section of the Reader, and clicking on “Select Multiple Folders/Files”.

From there, you can use the combination of the RasterSelector to select the band that you would like to keep, together with the RasterBandKeeper that retains only the selected band. 

Afterwards you can right your new single band rasters to a new png file, using the fme_basename as a raster file name, so all your input images will be writter eperately. 

Hope this helps! 


You can also use wildcards in the file path :)
http://docs.safe.com/fme/2013/html/FME_QuickTranslator/content/fme%20configuration/dataset_wildcards.htm


Reply