VERIFIED SOLUTION i

Issues regarding output differences noted between the Resample method used in Mentum Planet and the Resample method used by the MapInfoProRaster API

Product affected: MapInfo Pro Advanced™, MapInfoProRaster API™
 

Issue

A customer has questions concerning differences noted between the Resample method used in the MapInfo Pro add-on "Mentum  Planet" and the Resample method used by the MapInfoProRaster API.

[Planet]
Use Rsample in Raster Operations.

Input File: Test1
Resample Method: Nearest
Current Cell Size: 25
New Cell Size: 125
Output File: Test1_Resample.mrr

Remark: Output Setting is default.

[MapInfoProRaster API]
Below are the settings when using the method of MapInfoProRaster API:

inputFile = Test1.mrr
outputFile = Test1_Resample_PET.mrr
driverid = MI_MRR
newCellSize = 125
newCellSize = 125
method = Nearest

using (IRasterProgressTracker tracker = RasterProgressFactory.Create(ProgressTrackerCallBack))
{
RasterProcessing.Resample(inputFile, outputFile, driverid, newCellSize, newCellSize, method, true, null, tracker);

Cause

Difference is occurring because user enabled the "usePyramids" option while calling the Resample API.

Resolution

UPDATED: April 25, 2019
If the user disables this option, the exact same output from Planet and the MIRaster API will be observed.

Please use the code found below:.

using (IRasterProgressTracker tracker = RasterProgressFactory.Create(ProgressTrackerCallBack))
{
RasterProcessing.Resample(inputFile, outputFile, driverid, newCellSize, newCellSize, method, false, null, tracker); }