u.egger

Altering the SpatialReference of a Esri grid raster failed in ArcMap 10.2.1

Discussion created by u.egger on Apr 16, 2014
Hi,

as I have installed the 10.2.1 update, I become an COMException by the call of AlterSpatialReference function on raster dataset (ESRI grid ASCII format).

The code:
IRasterWorkspace rasterWorkspace = OpenRasterWorkspace(sourceRasterWorkspacePath);
IRasterDataset rasterDataset = rasterWorkspace.OpenRasterDataset(sourceRasterName);
((IGeoDatasetSchemaEdit)rasterDataset).AlterSpatialReference(spatialReference); // <-COMException (HRESULT = E_FAIL)


Coordinate system is: ETRS_1989_UTM_Zone_32N_8stellen

Header of the file:

ncols          200
nrows          200
xllcorner      32259000
yllcorner       5597000
cellsize       1000
NODATA_value   -9999

It works with ArcMap 10.2.0 and earlier.
I use DeveloperKit10.1

Best regards

Outcomes