Question

RasterExtentsCoercer in a directory with multiple raster

  • 6 November 2018
  • 2 replies
  • 2 views

Hi,

 

I am trying to get the footprint of multiple rasters that are stored in the same directory.

I am using a Directory and File Path names to read the directory and the RasterExtentsCoercer transformer to generate a shapefile with all of them.

But only works when the reader is a single raster.

Any idea?

 

Thank you


2 replies

Userlevel 4
Badge +30

Hi @vazquezsuarezyo

 

Use the transformer FeatureReader after the Directory and File Pathnames.

 

Thanks,

Danilo

 

Userlevel 4
Badge +25

The Directory and Path Names reader only reads a list of files. It doesn't read the file itself. As @danilo_fme says, you could add a FeatureReader after the Directory/Path reader, to actually read the file content.

Alternatively:

  • Create a raster reader and set it to read the entire folder (screenshot below)
  • If the raster features have wld files (or similar) you may be able to read them with the text reader and extract the extents from there - which would save FME having to read the raster files

The other possibility is that you created your reader using "[get] Feature Type Name From File Name" - which means if you pick one file and then run it on a whole series, the rest of them will be ignored. An Unexpected Input message in the log will show that this is what is happening. Better to select "From Format Name" instead, or set a Merge Filter on the source, which would prevent this issue.

Reply