Why is Mosaic or Merge of Rasters shifting them slightly?

573
1
01-25-2018 09:02 AM
shawnstanley
New Contributor III

hello

I have a .net script where I am clipping and then merging rasters based on user input.  I notice that for one raster that everything is working fine, but for another raster that the Merge or Mosaic command shifts the resultant merged raster slightly.

The offending line of code is:

pRasterGeometryProc.Mosaic(strFile, pRasterWorkspace, "GRID", pRasterInfo.CellSize.X, pSR, pRaster)

The two individual rasters which are part of the RasterBandCollection are in the correct location, but once merged they're not.

Has anybody else experienced this?

0 Kudos
1 Reply
DuncanHornby
MVP Notable Contributor

What do you mean by shifting slightly?

Sounds like a coordinate thing to me; do they have the same coordinate system and do their extents align?

0 Kudos