I have been working with ArcObjects Java for a short time and have not been able to find a solution to the following problems:
How to get the Raster object from a IRaster reference?
IRaster raster = rasterDataset.createDefaultRaster() Raster rs = (Raster)raster
This gives classcastexception: com.esri.arcgis.geodatabase.IRasterProxy cannot be cast to com.esri.arcgis.datasourcesraster.Raster
I have been unable to find the documentation of IRasterProxy. Apparently it is deprecated!!
How to over write pixel values of an existing raster and store it permanently?
I am following this example but to no avail. I can see the pixel array is altered but when I open the raster in ArcMap I see no change.
How to get Raster Info?
RasterDataset streamOrderRas = (RasterDataset)streamOrderRaster Raster raster = new Raster() raster.appendBands(streamOrderRas) IRasterInfo rasterInfo = raster.getRasterInfo()
I get AutomationException: No such interface supported, stacktrace shows it goes inside com.esri.arcgis.datasourcesraster.Raster.getRasterInfo()
Please forgive if the questions appear stupid. If some one can show some working examples of the above problems, i'd be very grateful.