Skip to main content
Question

RasterExtentsCoercer in a directory with multiple raster


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

danilo_fme
Evangelist
Forum|alt.badge.img+44
  • Evangelist
  • November 6, 2018

Hi @vazquezsuarezyo

 

Use the transformer FeatureReader after the Directory and File Pathnames.

 

Thanks,

Danilo

 


mark2atsafe
Safer
Forum|alt.badge.img+44
  • Safer
  • November 7, 2018

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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings