Skip to main content
Solved

Is it possible to set stacking order of incoming rasters before running the RasterMosaicer?

  • February 1, 2023
  • 3 replies
  • 30 views

aron
Supporter
Forum|alt.badge.img+16
  • Supporter
  • 135 replies

Imagine having a raster with transparent gaps (null) and wanting to fill these gaps with another dataset (presumably of lower resolution). If this second source is placed under the first the secondary data would "shine through" the gaps. This is how one would solve it in Photoshop, and I'm trying to figure out if the same solution is possible in FME. Is it posible to set the layering/stacking order of incoming datasources before running the RasterMosaicer?

 

(This is a follow up question to: https://community.safe.com/s/feed/0D5Dm000007hjgQKAQ)

Best answer by nielsgerrits

Yes this works as the gaps are NoData, the RasterMosaicker is set to Overlapping values = Last and Nodata Overwrites Data = No.

 

One way to do this is to create an attribute "order" and give it a value 1 or 2 using an AttributeCreator for each raster. Then use a Sorter to make sure the top raster arrives as the last one.

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.

3 replies

nielsgerrits
VIP
Forum|alt.badge.img+60
  • 2938 replies
  • Best Answer
  • February 1, 2023

Yes this works as the gaps are NoData, the RasterMosaicker is set to Overlapping values = Last and Nodata Overwrites Data = No.

 

One way to do this is to create an attribute "order" and give it a value 1 or 2 using an AttributeCreator for each raster. Then use a Sorter to make sure the top raster arrives as the last one.


nielsgerrits
VIP
Forum|alt.badge.img+60
  • 2938 replies
  • February 1, 2023

Yes this works as the gaps are NoData, the RasterMosaicker is set to Overlapping values = Last and Nodata Overwrites Data = No.

 

One way to do this is to create an attribute "order" and give it a value 1 or 2 using an AttributeCreator for each raster. Then use a Sorter to make sure the top raster arrives as the last one.

Added workspace demonstrating this.

RasterMosaikerOrderSampleThanks, learned something new today.


jdh
Contributor
Forum|alt.badge.img+36
  • Contributor
  • 2001 replies
  • February 2, 2023

Yes this works as the gaps are NoData, the RasterMosaicker is set to Overlapping values = Last and Nodata Overwrites Data = No.

 

One way to do this is to create an attribute "order" and give it a value 1 or 2 using an AttributeCreator for each raster. Then use a Sorter to make sure the top raster arrives as the last one.

@nielsgerrits​  is correct that the best way to deal with this is a sorter before the RasterMosaiker.

I need to add a caveat that the RM uses the resolution of the first image, so if you are using a lower resolution image to fill the gaps you need to either supersample it first to match the higher resolution image or clone the higher resolution and have one with an order value of 0 and the other with an order value of 2.