dbran

No spatial Reference.

Discussion created by dbran on Sep 15, 2011
Hey all:

Trying to run a segment of code like this:

IRasterWorkspace2 rasWS = (IRasterWorkspace2)fileGDB;
IRasterDataset rasDS = rasWS.CreateRasterDataset(fileGDB.PathName + "\\" + curTileName + "_Raster", "TIFF", pnt, rowsColumns[0], rowsColumns[1], intervals[0], intervals[1], 1, rstPixelType.PT_FLOAT, spaRef);


It reports "No spatial reference exists." as a COM error.  Can someone explain this to me? It can't be that the geodatabase doesn't have a spatial reference; you can't set that.  The SpatialReference parameter is optional in the raster dataset so I don't think it has anything to do with that...

Thanks.
DB

Outcomes