Question

Requesting WMS/WFS and saving as image in a file ?


Badge

Hello,

I'm trying to find a way to store WMS image (URL link) into a file on my PC so I could use them again in my report.

Do you think its possible to do that in FME ?

Thank you very much for your answers.


6 replies

Userlevel 2
Badge +17

Hi @mi,

You can use the WMS reader to request the image from the service, then send it to a PNG or JPEG writer to produce the image file.

Badge

Hello Dave,

Thank you very much for your answer.

Another question please:

Is it possible to add a background map (orthophoto) for each WMS ?

Thank you.

Userlevel 2
Badge +17

Hi @mi,

Yes, you can use the RasterMosaicker to mosaic the WMS image over the orthophoto image before writing. If the WMS image has an alpha band for transparency, please set the Overlapping Values parameter in the transformer to 'Composite using Alpha Band'. This will allow the orthophoto to show through the WMS transparent areas.

Badge

Hi @DaveAtSafe,

Thank you for your answer.

I used the RasterMosaicker as suggested but I didn't get what I need, they were rejected:

Those were the parameters:

Any Ideas why the transformer couldn't do the job ?

Thank you in advance for your answer.

Userlevel 2
Badge +17

Hi @DaveAtSafe,

Thank you for your answer.

I used the RasterMosaicker as suggested but I didn't get what I need, they were rejected:

Those were the parameters:

Any Ideas why the transformer couldn't do the job ?

Thank you in advance for your answer.

Hi @mi,

 

 

The orthophoto may not have an alpha band. Please use a RasterInterpretationCoercer to force the orthophoto to RGBA. It may be a good idea to do the same to the WMS result as well, in case you only get an RGB image.

 

 

In the Workspace Navigator window, please make sure that the ortho reader is above the WMS reader. This will send the ortho into the RasterMosaicker first, so that the WMS image is laid on top.

 

 

Badge

Hi @DaveAtSafe,

Thank you for your answer and for your time.

I'm still having the same error.

I have another idea, that it might gave me the result I need. I'm going to try it.

Thank you again for your time.

Best regards.

Reply