Skip to main content
Question

RasterExtentsCoercer in a directory with multiple raster

  • November 6, 2018
  • 2 replies
  • 39 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

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

danilo_fme
Celebrity
Forum|alt.badge.img+51
  • Celebrity
  • 2077 replies
  • November 6, 2018

Hi @vazquezsuarezyo

 

Use the transformer FeatureReader after the Directory and File Pathnames.

 

Thanks,

Danilo

 


mark2atsafe
Safer
Forum|alt.badge.img+56
  • Safer
  • 2554 replies
  • 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.