ISceneGraph scenegraph = SC1.SceneGraph;
IScene scene = scenegraph.Scene;
ILayer layer = scene.get_Layer(1);
IRasterLayer rlayer = layer as IRasterLayer;
IRasterSurface rsurface = new RasterSurface();
IRaster raster = (IRaster)rlayer.Raster;
IRasterBandCollection rasterbands = raster as IRasterBandCollection;
IRasterBand rasterband = rasterbands.Item(0);
rsurface.RasterBand = rasterband;
ISurface surface = rsurface as ISurface;
ILayerExtensions layerextensions = layer as ILayerExtensions;
I3DProperties properties = new Raster3DPropertiesClass();
object p3d;
for (int i = 0; i < layerextensions.ExtensionCount; i++)
{
p3d = layerextensions.get_Extension(i);
if (p3d != null)
{
properties = (I3DProperties)p3d;
break;
}
}
properties.BaseOption = esriBaseOption.esriBaseSurface;
properties.BaseSurface = surface;
properties.Apply3DProperties(layer);
scenegraph = scene.SceneGraph;
scenegraph.RefreshViewers();
【转载】SceneControl+AE+设置栅格图层基高
最新推荐文章于 2020-05-02 20:58:16 发布