I need to create IRasterWorkspaceEx to use it for creating IMADtedLayer. This is how:
IWorkspaceFactory wsf = new RasterWorkspaceFactoryClass(); IRasterWorkspaceEx rasterwsEx = (IRasterWorkspaceEx)wsf.OpenFromFile(foldername, 0); //then create IRasterCatalog and etc.
Every time I get error on casting IWorkspace (output of OpenFromFile) to IRasterWorkspaceEx. Is there anyone to answer this question? 😞
But I'm a little sad, because I couldn't use IMADtedLayer for this purpose. I used IRasterLayer. When I add the layer to axMapControl, something like this appears:
By the way, is there any built-in function for get "Line of Sight" of a specific points?
What path are you passing in? This interface, as mentioned in the developer help, is only available for personal, file, and sde geodatabases. So, if you're not passing in a path to a geodatabase then the cast will fail because the factory is not returning a class type that implements this interface.
But I'm a little sad, because I couldn't use IMADtedLayer for this purpose. I used IRasterLayer. When I add the layer to axMapControl, something like this appears:
By the way, is there any built-in function for get "Line of Sight" of a specific points?