public void GetThicknessData(IRasterLayer rAlamoSurface, IFeatureLayer fThicknessProfile) { try { IFeature fProfile = fThicknessProfile.FeatureClass.GetFeature(11); IPointCollection pPointCollection = null; IPolyline pPolyLine = null; IGeometry pGeom = null; Double dCellSize = 30; IRasterBandCollection pRasterBands = null; pRasterBands = rAlamoSurface.Raster as IRasterBandCollection; IRasterBand pRasterBand = pRasterBands.Item(0); IRasterSurface pRasterSurface = null; //I get the error here....trying to cast an IRasterBand to an IRasterSurface //pRasterSurface.RasterBand = pRasterBand as IRasterSurface; //I've found other VB.net references that use: //pRasterSurface.RasterBand = pRasterBand; //In every case I try the pRasterSurface is null. pRasterSurface = rAlamoSurface.Raster as IRasterSurface;
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.