This document is archived and information here might be outdated. Recommended version. |
Provides access to members that manipulate the height properties of a globe layer. Note: the IGlobeHeightProperties interface has been superseded byIGlobeHeightProperties2. Please consider using the more recent version.
The IGlobeHeightProperties interface can be used to manage the height properties of a data layer in globe.
Name | Description | |
---|---|---|
Apply | Apply to the corresponding layer. | |
ApplyFeatureProperties | Obtain feature geometry with the correct properties. | |
BaseLayer | The base layer. | |
BaseLayerName | The base layer name persisted. | |
BaseOption | The base option. | |
ElevationExpression | The elevation expression for features, in globe units. | |
ElevationExpressionString | The elevation expression string for features, in globe units. | |
ExtrusionExpression | The extrusion expression object. | |
ExtrusionExpressionString | The extrusion expression string. | |
ExtrusionType | The extrusion type. | |
HasElevationValues | Indicates whether the feature layer has elevation values. | |
Offset | The constant elevation offset in meters. | |
UseElevationValues | Indicates whether elevation values in the feature layer are used. | |
ZFactor | The z factor. |
CoClasses and Classes | Description |
---|
The code below illustrates how we can use IGlobeHeightProperties set the base height of a draped layer, present in the TOC, to a raster elevation surface.
public void Drape_Layer_On_ElevationRaster(IGlobeDisplay pGlobeDisplay, ILayer pLayer)
{
IGlobeDisplayLayers pGlobeDispLyrs=(IGlobeDisplayLayers) pGlobeDisplay;
//Create elevation raster layer
IRasterLayer pElevLayer=new RasterLayerClass();
pElevLayer.CreateFromFilePath("C:\\temp\\elev_raster");
//Create and add the GlobeLayerProperties extension
//with the Type set to ElevationData
IGlobeLayerProperties pLyr_GlobeLayerProps=new GlobeLayerPropertiesClass();
pLyr_GlobeLayerProps.Type=esriGlobeDataType.esriGlobeDataElevation;
ILayerExtensions pLyrExt=(ILayerExtensions) pElevLayer;
pLyrExt.AddExtension(pLyr_GlobeLayerProps);
//Set the base option for pLayer to be esriGlobeLayerBaseLayer
//and its base layer to be pElevLayer
IGlobeLayerProperties pDrapeLyr_GlobeLayerProps;
pDrapeLyr_GlobeLayerProps =pGlobeDispLyrs.FindGlobeProperties(pLayer);
IGlobeHeightProperties pDrapeLyr_GlobeHeightProps;
pDrapeLyr_GlobeHeightProps=pDrapeLyr_GlobeLayerProps.HeightProperties;
pDrapeLyr_GlobeHeightProps.BaseLayer=pElevLayer;
pDrapeLyr_GlobeHeightProps.BaseOption=esriGlobeLayerBaseOption.esriGlobeLayerBaseLayer;
//Apply the height properties of the pLayer
pDrapeLyr_GlobeHeightProps.Apply(pGlobeDisplay.Globe, pLayer);
pGlobeDisplay.RefreshViewers();
}