Skip to main content

I have a workspace that is supposed to clip a bunch of DEM's and DSM's to the same boundary. Unfortunately the outputs from the clipper transform are slightly different in size which causes me problems later on in the workspace as I need the DEM and DSM for the same clipping boundary to be the exact same size. I've tried toggling the settings for the clipper but I haven't had any success. Any suggestions is much appreciated. Below are some screenshots.

 

Capture15Capture16

I would think having the preserve clippee extents set to no would solve my problem but it doesn't.

How much is the difference? Are the DEM's and DSM's covering the same area and do they have the same resolution?

What's possibly happening here is that the clipper boundary doesn't line up perfectly with the pixel edges. Since rasters don't like to have partial pixels they'll be filled out to whole pixels.


@Hans van der Maarel​ The difference is small. For example the inputs are DSM: 105x104, DEM: 103x104. The ouptut files are DSM:105x103, DEM:103x103. I believe you are right and that it has to do with the boundary of the raster not lining up.

 

The reason why I need them to be the same size is because I want to create a CHM from both of them and to do that I was using the "rastercellvaluecalc" transformer that needs both inputs to be the same number of pixels.


Maybe you could try this trick: Mosaick both files togetter and use a rastercellevaluator to set all the cells to no data (-9999). Then use a RasterNoDataSetter to realy make it NoData. Then use this as input for a new RasterMosaiker. This way the files should have the same size, with NoData values at the border.

 

But it could mean it shifts your values because they not align correctly.

 


Try to set tolerance to 0. Sometimes it works, most times it's as @Hans van der Maarel​ says, the pixels just don't align


Reply