Question

Unexpected resampling in raster mosaicker

  • 2 October 2022
  • 2 replies
  • 2 views

Badge +6

I want to transfer the sum of all attributes from a given vector-layer (risikokort.tab in this case) to a tiled map, and export as raster. An overlap-analysis basically.

When I pass my tiles through rastermosaicker, a resampling occurs which changes the output. To test it I ran the rastermap through RasterCellCoercer, which clearly shows output-raster and the input tiles are very different.

I would expect the input tiles and the output tiles to be the same. Am I wrong in that assumption?

I hope the workspace is self-explanatory, and if some of the gurus open it, all feedback is appreciated.


2 replies

Userlevel 2
Badge +10

Hi @mathiku​, the RasterMosaicker determines the grid it will align itself to through the first raster - all subsequent rasters are then resampled and snapped to the grid of the first raster. If the first raster has an origin and spacing that align with the vector grid, then the rest should fall into place.

 

Based on this, you could theoretically use the RasterRGBCreator/RasterNumericCreator to create a dummy raster that would help the rest of the rasters align to the vector grid. You just need to make sure that every value in the dummy raster to be nodata or have alpha values of 0.

 

Hope this helps.

Badge +6

Thank you - I feel like it becomes a bit of a clumsy solution. Especially since the RasterNumericCreator seems to need a manual input.

Reply