3

I'm trying to find out how to deal with the below scenario with FME 2012 on board. I have a bunch of geotiff's tiles (A) and a bunch of others geotiff's tiles (B) that I would like to mosaick together. The name of each tile from (A) match eaxactly one tile in (B). I would like the process to be run tile by tile due to the amount of the tile I have to process (roughly 13k).

What whould be the scenario with FME to: - take a pair of tiles with exact names from A and B, - run a workbench, - output the result, - take another pair of tiles with exact names from A and B, ... and so on.

The problem is that I actually don't know how to force FME to read a tile A then find a coresponding tile in B (not reading all tiles from B) and run a workbench for the matching pair.

Thanks in advance for help with that. G.

2 Answers 2

2

I can think of two possible ways to do this.

(1) The simpler way. Use a single GeoTIFF reader to read in absolutely every GeoTIFF, both (A) and (B). Then, in RasterMosaicker use the "Group By" and set this to "fme_basename" (which is already exposed). Any tiles that share their names will be mosaiced together into the same image.

(2) More complex but may be quicker to execute (just guessing), you could use the WorkspaceRunner. The external workbench would execute a mosaicker workbench using the transformer.

The External workbench would read in only Group A and do so using a Directory and File Pathnames reader type. The *path_windows* attribute will contain the path of the original file (A), and using some string manipulation and probably *path_rootname*, you can figure out what the (B) file should be called (You may wish to use feature inspection to see what you have available). Put a quote around each then concatenate these two together with a space (so: "path\to\A" "path\to\B"). You then pass this attribute to the Internal (Mosaicker) workbench.

The Internal workbench would simply consist of a geotiff reader a mosaicker and the output. All the magic (telling it which files to read) has been passed to it direct from the external workspace.

Hopefully that's clear. See also: http://fmepedia.safe.com/articles/Samples_and_Demos/WorkspaceRunner and related.

2
  • Jonathan,Thanks for an swift answer. I was aware about solution (1), but isn't it going to read and cache all the data in one process (roughly 13k of tiles) ? Then it may botlleneck when trying to fanout by fmebasname while writing to output files ?. Will have to check it however. IF speaking about (2) - Could you please elaborate more about "the mosaicer workbench would pass sufficient information to allow that workbench to establish..." ?
    – user6501
    Jul 13, 2012 at 13:39
  • I believe solution (1) will load everything into RAM because of the Grouper. Obviously sub-optimal but if there's no hurry worth a try. I've edited my answer to give more detail on (2); it will use up to as many cores as you're licensed for (2012 SP2), just set "wait for Job to Complete" to "No". Jul 13, 2012 at 14:02
2

RE: Reading and caching everything via solution 1 -- it is not a problem because raster features actually don't hold any data(!) -- they are just pointers to the real data. So 13000 will not be a problem at all. At least it shouldn't!

Good luck!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.