Skip to main content
Question

Use a raster in HTMLReportGenerator

  • January 14, 2025
  • 0 replies
  • 55 views

geomancer
Evangelist
Forum|alt.badge.img+51

This is a HowTo.

I had a hard time adding a raster to an HTMLReportGenerator. Thanks to some remarks in an old Question of the Week I found a solution. Many thanks to ​@mark2atsafe!

I share my solution here for others that may encounter the same problem (and for myself, in case I encounter the problem once more in a few months 😉).

HTMLReportGenerator can't use a raster, but it can use an image. This image must be in binary encoding. The image can be embedded in the HTML, so it suffices to have a temporary image. The temporary image will be automaticaly removed when the workspace finishes.

So the process becomes:

  1. Use a TempPathnameCreator to provide a path for temporary storage of the image file
  2. Use a RasterExtractor to convert the raster to a blob
  3. Use an AttributeFileWriter to export the blob to a temporary file. Specify FME-binary Encoding
  4. In an HTMLReportGenerator embed the temporary file as an image

 

0 replies

Be the first to reply!

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