yanliz

ESRI.ArcGIS.GeoAnalyst.RasterReclassOp does not work correctly in ArcGIS 9.3.1

Discussion created by yanliz on Jun 13, 2011
I have a project that worked very well for the past three years. However, it does not work with ArcGIS 9.3.1 now. I checked very carefully and found the problem is with Lookup method. The codes are:

ESRI.ArcGIS.GeoAnalyst.IReclassOp pReclassOp = new ESRI.ArcGIS.GeoAnalyst.RasterReclassOp() as ESRI.ArcGIS.GeoAnalyst.IReclassOp;

IRaster pRLand = (IRaster) pReclassOp.Lookup((IGeoDataset)pRLandW, "fieldName");

IRasterLayer pRL = new ESRI.ArcGIS.Carto.RasterLayer();
pRL.CreateFromRaster(pRLand);
pRL.Name = sName;
pMap.AddLayer((ILayer)pRL );


Error message points to pRL.CreateFromRaster and I guess that Lookup does not create the raster properly, am I right? Any suggestions would be greatly appreciated.

Outcomes