Skip to main content
Solved

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


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

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.

View original
Did this help you find an answer to your question?

3 replies

nielsgerrits
VIP
Forum|alt.badge.img+54
  • 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+54
nielsgerrits wrote:

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+28
  • Contributor
  • February 2, 2023
nielsgerrits wrote:

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.


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