Question

Raster alignment

  • 22 October 2017
  • 8 replies
  • 41 views

Badge

Hi everybody,

I need to align two multi-band raster with the same resolution. Is there an FME equivalent of Q-GIS raster alignment tool ?


8 replies

Userlevel 4
Badge +30

Hi @beatricemontele,

Please, try to use the transformer RasterMosaicker.

Into configuration you have so many tools:

Thanks,

Danilo

Badge

Hi @beatricemontele,

Please, try to use the transformer RasterMosaicker.

Into configuration you have so many tools:

Thanks,

Danilo

Hi Danilo, Thanks for answering. Raster Mosaiker is not the solution I was searching since I don't want one single raster as output, but two different rasters aligned and with the same grid. The rasters I have don't have the same value interpretation, they store completely different values (one has precipitation as input, the other an index for vegetation monitoring).

 

 

Badge +22

Do the rasters cover the same area? Are they the same number of rows and columns?

If I have two rasters that should have identical georeferencing, but have minor variations (generally due to floating point errors) I extract the information from one raster (RasterPropertyExtractor) merge it onto the other raster (FeatureMerger or occassionally Clipper with merge attributes) and then use the RasterGeoreferencer.

If I have two rasters that don't have the same extent, and I need the larger area, then I branch the larger raster and set all of it's values to NoData and sent that to a RasterMosaicker with the smaller raster, making sure the smaller Raster is prioritized to be on top, that will give you the smaller raster with the resolution and extents of the larger raster, padded with NoData where needed.

Badge +5

Has there been a solution or workaround for this? I am also looking for a realignment tool in FME to make rasters the same dimensions of another raster.

Badge +1

@woltersIf I've understood the realignment requirement correctly, I suggest you take a look at the RasterResampler transformer - that allows you to resample rasters to the desired (common) dimensions. You might need to use it in combination with the other transformers mentioned already.

Badge +8

Hi @beatricemontele, I followed the approach of @jdh, which worked fine, see the attachment alignrasters.fmw. First I do a reprojection to the dutch cadastre coordinate system, since that is rectangular and works best (I expect). Then I split off (sampler) one raster from the stream, which will serve as the master file. The properties of the master are copied onto the other raster files (FeatureMerger) and after that the RasterGeoreferencer (in Extents mode) transforms the rasters on the same coordinates as the master. After that a RasterResampler is used to convert the slave raster files to the same number of rows and cols of the master file. And finally the rasterbandcombiner puts all the rasters into one big stack.

Badge +5

Has there been a solution or workaround for this? I am also looking for a realignment tool in FME to make rasters the same dimensions of another raster.

Solution as suggested by @helmoet is working
Badge +5
Solution as suggested by @helmoet is working
Further testing reveals this works only for small rasters; larger rasters, even when making sure the extent and projection are the same, will shift the raster significantly.

 

 

Reply