Skip to main content
Hi

 

Im trying to put together a PDF map using different WMS sources.

 

Setting the option TRANSPARENT=TRUE in the getmap requests, then using imageFetcher to retrieve images. And finaly I use PDF geospatial writer.

 

 

Result is multiple layers in the PDF, but however no transperancy..

 

I have tried using both PNG/GIF. It would be awesome if you have some suggestion.

 

 

Best regards
Hi giskis!

 

 

I think there is no support for transparency on the PDF WRITER. Not sure if this is a limitation of the FME PDF WRITER or a general PDF limitation. A workaround would be to "pre-generate" the layers before writing them. For instance if you your WMS is an ortophoto, and you have 3 different layers you want on top. You can rasterize each layer with the ortophoto, and write them as 3 layers. Yes, the file will now be 3 times larger, because the orthophoto is saved ones for each layer - however it might be a workaround you can use

 

 

Sigbjørn - Norway
Tack Sigbjorn!!

 

I dont follow exactly how you mean - three layers will give the same problem as before?

 

 

Im looking into pregenerating it into one image only now. Searching through the raster transformers but hav e a hard time finding a suitable ones for doing a ordered overlay.. Ill keep you posted if I can fix it.

 

Any other ideas are welcome!

 

giskis
Yes, transparency is not supported on PDF as far as I know.

 

 

For transformers to create Rasters, have a look at RasterMosaicer. If you have any input Vector-features to this you should use the ImageRasterizer on them first to get them as Rasters and then before merging all the layers into one (if you want that) you can use a Sorter on a "dummy attribute" to make sure that one feature/raster reaches the RasterMosaicer first.

 

 

ImageRasterizer->Sorter->RasterMosaicer

 

 

Have you looked through the Raster-webinar ? http://www.safe.com/solutions/for-data-types/raster/
Hello,

 

 

I've used the RasterExpressionEvaluator successfully to overlay rasters. If your images have an alpha (transparency) channel you can use an "alpha compositing" formula to overlay one image on another and if you have more than 2 images then either use multiple RasterExpressionEvaluators or make a looping custom transformer. The expressions can be a bit daunting to start with but if you break it down into channels (;) then it's much easier to understand. Dmitri has some examples on fmepedia. Here is one of mine:

 

 

A<0]*(B03]/256)+B50]*(1-(B(3]/256));A61]*(B13]/256)+B51]*(1-(B(3]/256));A62]*(B23]/256)+B52]*(1-(B(3]/256))

 

 

Simple 😛
Hi Richo, thanks!

 

Looked through RasterExpressionEvaluator but finaly did a custom transformer..

 

Consisting of a number of RasterCellValueCalculators basically doing

 

 

A + B - norm(A x 😎 x A

 

 

meaning image B is put on top of image A, and if present any "extra" background intensity is substracted.

 

 

SigTill - yes will definitly pick up on raster webinar as soon as time permits 🙂 Have a lot to learn

 

Cheers!!

Reply