Library Reference  

GlobeCore Library Overview


Supported with: ArcGIS Engine with 3D Extension, ArcGIS Desktop with 3D Analyst, ArcGIS Server with 3D Extension

Library dependencies: System, SystemUI, Geometry, Display, Server, Output, GeoDatabase, GISClient, DataSourcesFile, DataSourcesGDB, DataSourcesOleDB, DataSourcesRaster, GeoDatabaseDistributed, Carto, NetworkAnalyst, Location, NetworkAnalysis, Controls, GeoAnalyst, 3DAnalyst


The GlobeCore library is the major library for working with the ArcGlobe application, an addition to ArcGIS 3D Analyst at version 9.0 for 3D visualization of multi resolution global data. The GlobeCore library contains objects for working with 2D and 3D data displayed on the surface of a globe, in a similar way that the Carto library contains objects for working with 2D maps.

The Globe object is one of the main objects of the library since it is the container for data layers, similar to the Map object. The GlobeDisplay object, analogous to the SceneGraph coclass of 3DAnalyst Library, is a container for data caching and for events that occur in the globe. These events include those that occur when there is a change in the active view to events that trigger to notify data caching state. The GlobeDisplay object has a central role in that it also manages, specifies and controls different optimization schemes of the application.

GlobeCore Library is also host for the GlobeCamera object that specifies the perspective of a 3D globe display rendering, to define the positioning of the globe relative to the observer. In ArcGlobe the 3D display window is represented by the GlobeViewer object. It is similar in its function and properties to the SceneViewer object in 3DAnalyst library. The 3DAnalyst Library overview includes discussions about the GlobeViewer, SceneViewer and 3DViewer - a class that has common properties and methods of the two viewers. The Globe can have one or more layers, these layers specify the data on the Globe and how the data is drawn. The GlobeLayerProperties coclass is one of the more important globe specific layer extension class that specifies among other things, layer drawing priority on the surface of the globe, controls cache data removal behavior, suggests symbology scaling factor, estimates visibility distance thresholds, determines data caching mode (on-demand Vs Full data cache), controls cache data compression options and quality, image resampling modes, feature level of detail, and feature data drawing mode (rasterized Vs vector). GlobeHeightProperties coclass provides access to members that manipulate the height properties of a globe layer including those specific to feature layers (as vectors) such as extrusion, Z factor applied to elevation layers and offset that can be applied to any layer. GlobeAdvancedOptions object is the class that allows the developer to set advanced globe properties such as whether to use disk cache or not, control near and far clipping planes, control application level of detail that gets applied only at draw time, the target frame rate for automatic control of display level of detail and various attributes stored in the registry.

In addition, just like the Scene object contains AnimatonTrack object(s), the Globe coclass contains the same object to make real time animation or video output, by manipulating globe display and layer properties.  There can be 0 or more AnimatonTrack objects in the Globe, which further contain one or more GlobeKeyframe objects. The AnimationTrack further contains AnimationType object. Through these objects one can control the behavior and type of animations. Refer to the 3DAnalyst Library Overview regarding Animation framework discussions in both ArcScene and ArcGlobe application of ArcGIS 3D Analyst extension.

The objects that implement this functionality are grouped into a number of library subsystems. These library subsystems are:  

Note, a GlobeControl and a set of globe commands exists in the Controls Library, together with a ToolbarControl, TOCControl and helper objects for creating your own custom commands.

Globe

The functionality of Globe coclass is analogous to Map and Scene coclasses, where the former is a container for 2D data and the latter is a container for 3D and 2D data in 3D Analyst's ArcScene Application. The Globe object is a container of 2D and 3D Layers. There are a lot of similarities that can be drawn between the Scene and Globe coclasses. The Globe object has properties that operate on all layers within the globe; Spatial Reference, Scale, etc. along with methods that manipulate the globe's layers. One major difference between the Globe object and Scene (and map) is that as a pre-requisite, any layer intended to be used in the application must have a spatial reference defined to it. There are many different types of layers that can be added to the globe. Different data sources often have an associated layer responsible for displaying the data on the globe; vector features are handled by the FeatureLayer object, Raster data (both image and surface data) by the RasterLayer, etc. Layers can, if required, handle all the drawing operations for its associated data, but it is more common for Layers to have an associated Renderer object. The properties of the renderer object control how the data is displayed in the globe. Renderers commonly use symbols from the Display library for the actual drawing, the renderer simply matches a particular symbol with the properties of the entity that is to be drawn. Similar to the Carto library, the GlobeCore library also contains support for annotation and globe tips. Similarly Globe coclass is a container for display and manipulation of data on the surface of the globe. The Globe object contains one major interface, IGlobe, along with many other important inherited interfaces required for manipulation and access of data. These include IBasicMap, IBasicScene, IScene, ISceneBookmarks and IAnimationTracks.

IGlobe interface allows the developer to have access to basic globe ingredients, such as GlobeLayers and to properties and methods of the globe itself. It is though this interface the developer can access adding layer types, according to their categories (Floating, Draped or Elevation), get access to globe background options, including sky and space colors, fading transition values as well as Globe tips properties and the linear units used in the globe.

GlobeDisplay

GlobeDisplay is a central object in ArcGlobe. It provides access to basic properties of the globe and layers to more advanced aspects of the application, including management of viewers, rendering and data caching. The GlobeDisplay coclass has 4 major interfaces: IGlobeDisplay, IGlobeDisplayRendering, IGlobeDisplayLayers, and lastly an inherited interface,IViewers3D.

ArcGlobe is an application that has a highly optimized data tiling, level of detail management and data caching architecture. Managed by the GlobeDisplay object and common to all data sets, there is a division of data in quadrilateral areas of the globe called tiles. At the lowest level the entire globe is divided into 6 major areas termed as face tiles. These consist of 4 around the equator and 2 at the poles. 

Globe Face subdivision as illustrated in the World Cube Projection.

Part of the application's notion of Level of Detail stems from the fact that these tiles are recursively sub divisible. At any particular level of detail the area coved by any tile is equal to 4 levels at the next level to a maximum resolution of the data set. 

ArcGlobe's Data Tiling scheme.

Each of the 6 major Faces is then divided into multiple tiles at different levels of detail. This data organization is termed as Data Tiling.

The GlobeDisplay object has a central role in that it manages and controls tile generation and subsequent storing of data tiles for future use, termed as Data Caching. Data tiles are always stored in a memory cache, and optionally also in a disk cache. The main advantage of data caching is to improve the visualization performance, as well as reducing repetitive data requests from data sources. The Tile Generator, IGlobeDisplayLayers.GenerateTiles, is used to pre-process data both in off-line mode, termed as Full Caching and in an interactive on-demand mode termed as On Demand Data Caching.

ArcGlobe Data caching structure.

Each data tile will be stored into memory and optionally into disk for future use. Using data caching improves visualization performance.

General globe properties are accessed via the IGlobeDisplayRendering interface. Commonly used globe properties include vertical exaggeration, background color(s), and sun position. The IGlobeDisplayLayers interface provides access to globe specific layer properties as well as general purpose functions. From GlobeDisplay you gain access to one or more GlobeViewers being used by the application. These are the 3-D display windows. You can change the perspective displayed in a GlobeViewer through its Camera. The GlobeDisplay can be acquired from an ArcGlobe document's Globe object via IGlobe.GlobeDisplay.

Most of the members from IGlobeDisplayLayers interface are used for internal purposes. Developers should not directly use members from this Interface directly but rather should use methods and properties from IGlobeLayerProperties.

IGlobeDisplayLayers:IViewers3D provides access to members that control the ActiveViewer, indicate the 3D display navigation mode, control redrawing into all viewers as well us registering and unregistering any additional viewers.

GlobeViewer

Similar to the SceneViewer, the GlobeViewer is a 3d display window in ArcGlobe. See the SceneViewer/GlobeViewer discussion in the 3DAnalyst Library overview.

GlobeLayerProperties

GlobeLayerProperties coclass is the layer extension that contains globe specific layer properties. These include layer drawing priority on the surface of the globe, exposed as IGlobeLayerProperties.BaseImageDrawingPriority. This value relates to the position of the layers that are part of the base globe (i.e., draped layers and elevation layers) in the drawing order. To get an ordered list of layers in the base globe use IGlobeDrawingOrder.OrderedLayers. Note that elevation layers are always on top of the ordered list followed by draped layers. GlobeLayerProperties object also controls the layers cache data removal behavior via IGlobeLayerProperties.CacheRemovalOption. The default setting is the cache to be removed when exiting the application or removing the layer. IGlobeLayerProperties.IsDynamicallyRasterized property Indicates if the feature data is to be rasterized or not. Feature layers will be treated as rasterized if this property is set to True. By default all 2d feature data is rasterized where as 3d data (including multipatch feature classes) will be treated as vectors. One would get advanced symbology support (any symbology supported in ArcMap will be honored when a feature layer is treated as rasterized) as well as better draping of feature data onto the surface of the globe, especially if elevation data is present. Symbol sizes that are usually expressed in terms of points, will need to have a scaling factor when used in an application that uses real world units. The IGlobeLayerProperties.SymbologyScalingFactor property is the scaling factor of meters-per-point to be applied to symbol sizes during rasterization. This means, a symbol that has a size of 8 points would be converted to real world unit multiplied by the factor as suggested by IGlobeLayerProperties.SymbologyScalingFactor. Visibility distance thresholds, IGlobeLayerProperties.MaximumDistance and IGlobeLayerProperties.Minimumdistance govern the distance where a layer becomes visible or not. These values are automatically set for feature data when the property IGlobeLayerProperties.MaxFeatureLevelOfDetail is set. The user will get a prompt to set this value when adding feature data to the application, especially if the data is to be treated as vector. Similarly, the developer needs to explicitly set this property when adding feature data to the application.

[C#]

IGlobeDisplayLayers ipGlobeDisplayers;
IGlobeLayerProperties ipGlobLayerprops;
ipGlobeDisplayers= (IGlobeDisplayLayers) m_glbdisp;
ILayer iplayer;
IEnumLayer ipEnum; ipEnum=
m_glbdisp.Globe.get_GlobeLayers(null,false,true,true);//return all the layers in the base globe sorted by drawing priority
iplayer= ipEnum.Next();
{
	ipGlobLayerprops= ipGlobeDisplayers.FindGlobeProperties(iplayer);
	int MaxLod=0;
	int LOD= 2; //set it to a prefered LOD value..
	while(iplayer!= null)
		if (ipGlobLayerprops.maxLOD== -1)// a value of -1 indicates that the Level of Detail is not yet set
			ipGlobLayerprops.maxLOD=LOD;
			ipGlobeDisplayers.RefreshLayer(iplayer);
	iplayer= ipEnum.Next();
}
 			

GlobeCamera

GlobeCamera defines the global and perspective viewing of data on the globe. Developers should use the GlobeCamera object to obtain Observer and Target positions via the GlobeCamera object instead of Camera because GlobeCamera works with latitude and longitude values instead of local coordinate system. IGlobeCamera is the major interface, that has properties and methods to control navigation orientation, IGlobeCamera.OrientationMode which can be set to surface or global modes, the offset for the roll angle in degrees via IGlobeCamera.RollOffset and methods to get/set Observer and Target positions via IGlobeCamera.SetObserverLatLonAlt (latDD, lonDD, altKMs) and IGlobeCamera.SetTargetLatLonAlt (latDD, lonDD, altKMs) as a combination of latitude and longitude in decimal degrees plus altitude in kilometers. IGlobeCamera.GetLocalOrientation (plocalAzi, pLocalIncl, pLocalRoll) gets the azimuth, inclination and roll angles relative to the current target on surface.  

GlobeServer

GlobeServer coclass allows users to get access to an ArcGIS Globe layers bound to a GlobeServer object. It further allows globe server layers to be capable of being queried and  identified (via the Find and Identify methods). GlobeServer can be used in either desktop, intranet (LAN/WAN), or internet development environments.In a desktop environment, GlobeServer objects can be created in-process within your application. GlobeServer objects are run within ArcGIS Server. When running in ArcGIS Server, GlobeServer objects can be accessed via the Server API over TCP/IP (intranet), or can be accessed over HTTP using SOAP/XML (internet) and a binary messaging framework.

ArcGIS Desktop and ArcGIS Engine developers can also consume server objects via the Server API. If you want to work with the fine-grained ArcObjects, you must use the Server API. You can use the GISServerConnection to connect to the GIS server, or you can obtain a reference to the ServerObjectManager through GISClient (TCP/IP connection only).

The GlobeServer coclass contains several important interfaces with basic functions for starting and stomping an ArcGIS Server (IObjectActivate), for initializing a globe server object from an ArcGlobe document (*.3dd file) and methods for defining the physical and virtual directories of a web service (IGlobeServerSetup ) as well as an interface (IGlobeServerObject) for getting an ArcGIS Globe layer. IGlobeServer interface contains methods for performing query and find on an ArcGIS Globe Server layer. In addition IGlobeServer also contains methods for getting components of a globe server layer, such as animation files, tiles and associated textures either as a URL or binary data.

GlobeServer coclass is also home for IRequestHandler and IRequestHandler2, interfaces that provide access to members that control handing of request messages (binary or Soap).

GlobeServerLayer

GlobeServerLayer coclass allows users to get access to an ArcGIS Globe Server layer, which is the basic ingredient of an ArcGIS Globe Service.

GlobeServerLayer  coclass contains several interfaces. Some of the important ones include, IGlobeServerLayer, which encapsulates methods for connecting to an ArcGIS Server and properties for querying layer properties, IlayerEffects with properties to manipulate layer transparency and IcompositeLayer with a Count property returning the exact layer count in the GlobeServerLayer. Note unlike a mapserver layer, calls to get the layer count, or layer transparency will be honored and applied. Since the working ingredients of a globeserver are layers, the developer has the ability to access each individual layer properties. Furthermore, a GlobeServerLayer is different from a mapserver layer in that it supports being expanded, via  the Expanded property of IcompositeLayer2. This in effect enables globeserver layers to be accessed per the layer level. This is an integral property of GlobeServerLayer in that it allows you to 'mix and match' layers from different globe services and consume them as separate entities. 
 
Other notable interfaces implemented by the class include, IlayerExtensions, with methods and properties to add layer extensions, IlayerPosition with a property to get or set a layers drawing position in the Globe, and IpublishLayer enabling GlobeServerLayers to support publishing.

GlobeLayerInfo

GlobeLayerInfo coclass can be considered as the coclass that provides detailed information about a globe server layer. This coclass can be looked as the globe server layer equivalent of the class GlobeLayerProperties, which is an important layer extension object that contains globe specific layer properties. The bulk of the properties of GlobeLayerInfo are members of IGlobeLayerInfo. Some of these members include, layer drawing priority on the surface of the globe, exposed as IGlobeLayerInfo.BaseImageDrawingPriority, IGlobeLayerInfo.DataType, that describes the type of the layer (whether it is a rater, elevation, or feature data).

GlobeLayerInfos

A container class for a Globe Layer Info , which provides detailed information about a globe sever layer.

GlobeServerIdentifyResult

The Globe Server Find Result coclass provides information about a 'find result'.

GlobeServerIdentifyResults

A container class for Globe Server Find Result, which provides information about a 'find result'.

GlobeServerFindResult

The Globe Server Find Result coclass provides information about a 'find result'.

GlobeServerFindResults

A container class for Globe Server Find Result, which provides information about a 'find result'.

GlobeServerLayerFactory

GlobeServerLayerFactory CoClass provides access to the available properties of a layer factory for globe server layers.

 

GlobeHeightProperties

GlobeHeightProperties object is contained in GlobeLayerProperties coclass. There is only one GlobeHeightProperties object at any time. Access to a layer's elevation property is obtained through the GlobeHeightProperties coclass. This coclass is important in that it's through this object that a layer gets its height property and accordingly, where to be displayed in the type tab of the application.

In ArcGlobe Application, there are three categories where a layer can belong to. Draped layers are, layers that are draped on the surface of the globe. These can be feature layers or raster layers. Floating layers are layers that do not drape onto the surface of the globe but have an offset. Offsets can be defined by a constant or expression. Elevation layers are only raster layers that define the surface of the globe. 

IGlobeHeightProperties.Offset is a constant value that can be applied to any layer in the draped or floating layer categories. Note that both  feature layers and raster images can not have an offset if in they are in the Draped Category. They'll need to be part of the Floating Layer cataloger to be able to use this property. Only feature layers treated as vectors would honor IGlobeHeightProperties.Offset while still part of the Draped Layers category. Similarly IGlobeHeightProperties.ElevationExpressionString and IGlobeHeightProperties.ElevationExpression, a constant or an expression value to  define any feature layer's elevation apply to feature layers as vectors. IGlobeHeightProperties.HasElevationValues, a boolean that indicates whether the feature layer has Z values or not, is one of the properties that can be used to define a layer's Z placement. Feature layers (as vectors) furthermore can have extrusion factors, to convert any 2d feature layer into 3D object (multipatch) by applying a conversion factor via IGlobeHeightProperties.ExtrusionExpression or IGlobeHeightProperties.ExtrusionExpressionString. 

GlobeAdvancedOptions

GlobeAdvancedOptions object is used to manipulate ArcGlobes advanced visualization and cache data management options. Using GlobeAdvancedOptions.IGlobeAdvancedOptions interface the developer can access properties such as,  IGlobeAdvancedOptions.CachePath where cache data will reside on the local machine, IGlobeAdvancedOptions.DefaultUse16ElevBits and IGlobeAdvancedOptions.DefaultUse16ColorBits default values for elevation and image color Compression, IGlobeAdvancedOptions.ClipNear and IGlobeAdvancedOptions.ClipFarFactor Near and Far Clipping planes that aid in performance optimization by clipping areas that do not fall within the applications' view, IGlobeAdvancedOptions.LevelOfDetail the  level of detail of image and elevation layers that gets applied during display, IGlobeAdvancedOptions.ManualLOD a boolean that indicates if manual LOD control is on and IGlobeAdvancedOptions.TargetFrameRate the target frame rate when using automatic control of  LOD.


IGlobeAdvancedOptions interface also has methods IGlobeAdvancedOptions.GetUseCache and IGlobeAdvancedOptions.SetUseCache, to get\set disk caching option and the amount of disk size to allocate for it, and a method to get the default lossy compression option for a data type and its quality from 1 to 100 IGlobeAdvancedOptions.GetDefaultCompression . IGlobeAdvancedOptions.RestoreClipPlaneDefaults and IGlobeAdvancedOptions.RestoreLODDefaults methods set the default Clipping planes and level of Detail settings to their default values respectively. Most of these advanced options will not be used until IGlobeAdvancedOptions.WriteToRegistry is used to commit the changes to systems registry.


 

GlobeLegendInfo

Coclass provides information about a globe layer. The legend information provided by a layer is usually provided by the renderer.

GlobeLegendInfos

A container class for a Globe Legend Info coclass, which provides information about a globe layer.

GlobeLayer

The GlobeLayer coclass is used internally and developers should not use it. It will be deprecated in future releases. Developers should use the abstract Layer class and add layer extensions such as GlobeLayerProperties and GlobeLayerHeight objects, to a layer to be able to access Globe specific properties.

There are two ways to achieve that:

When a layer is added to ArcGlobe Application, the layer extension GlobeLayerProperties and GlobeLayerHeight object will automatically be added to it with default values, and developers can get access to the properties and methods available from these objects.

[VB]

 ...
  Dim player As ILayer
  Set player = pRasLayer
  Dim pglobe As esriGlobeCore.IGlobe
  Dim pgmxdoc As esriArcGlobe.IGMxDocument
  Set pgmxdoc = pDoc
  Set pglobe = pscene
  pglobe.AddLayerType player, esriGlobeLayerTypeElevation
			

The other alternative is after co-creating a layer the developer needs to explicitly add GlobeLayerProperties layer extension and GlobeLayerHeight object before adding the layer to the application. It is important to note that when adding a feature data pragmatically, especially feature data as vector, the developer needs to set Level of Detail to a preferred value. When adding a layer from the application, users will be forced to set levels of detail values before displaying any feature data as vector.  The sample code below shows how to add the layer extension GlobeLayerProperties, the GlobeLayerHeight object and illustrates how to set some of the globe specific properties of a layer before adding it to ArcGlobe Application.

[VB]

Sub AddLyrExtension()
On Error GoTo Er

  'fire up an arcglobe session...and add the layer to the application..
  Dim papp As esriFramework.IApplication
  Dim pDoc As esriFramework.IDocument
  Set pDoc = New GMxDocument
  Set papp = pDoc.Parent
  'make the arcglobe session visible...
  papp.Visible = True
  Dim pOF As esriFramework.IObjectFactory
  Set pOF = papp
  Dim pUID As New UID
  Dim SID As String
  Dim pRasLayer As esriCarto.IRasterLayer
  'note that its critical that you create any object within ArcGlobe application workspace - not in VB.
  'Marshalling objects b\n VB and the application is costly and is not gauranteed to work.
  'Avoid creating objects via new method as in 'Set pRasLayer = new RasterLayer'
  SID = "esricarto.RasterLayer"
  pUID.Value = SID
  Set pRasLayer = pOF.Create(pUID)
  pRasLayer.CreateFromFilePath "D:\ArcGlobe\redlands\gdredlands"

  'Create GlobeLayerPropeties Extension...
  Dim pglbLyrPrp As IGlobeLayerProperties
  SID = "esriglobecore.GlobeLayerProperties"
  Set pglbLyrPrp = pOF.Create(SID)
  'set some of the propertes...
  pglbLyrPrp.Type = esriGlobeDataElevation  'this will force the raster to be elevation source
  pglbLyrPrp.ImageSamplingMode = esriGlobeImageSamplingNearest 'will not be honored for elevation data..
  pglbLyrPrp.PutLossyCompressionOption True, 70
  pglbLyrPrp.Use16ElevationBits = False

  'Create GlobeHeightProperteis..
  Dim pglblyrHghtProp As IGlobeHeightProperties
  SID = "esriglobecore.GlobeHeightProperties"
  Set pglblyrHghtProp = pOF.Create(SID)
  'set some of the properties..
  pglblyrHghtProp.ZFactor = 0.0348 'apply factor to convert from feet to meters
  'add the layer height properties...
  Set pglbLyrPrp.HeightProperties = pglblyrHghtProp

  'add the extension..
  Dim player As ILayer
  Dim plyrExt As ILayerExtensions
  Set player = pRasLayer 'QI for layer
  Set plyrExt = player 'QI for layerExension
  plyrExt.AddExtension pglbLyrPrp


  'Check to see if extension is added..

    For j = 0 To plyrExt.ExtensionCount - 1
        If TypeOf plyrExt.Extension(j) Is IGlobeLayerProperties Then
            Set pglblyrprop = plyrExt.Extension(j)
            Debug.Print plyrExt.ExtensionCount
          End If
      Next

  Dim pglbDisp As esriGlobeCore.IGlobeDisplay
  Dim pglobe As esriGlobeCore.IGlobe
  Dim pscene As esri3DAnalyst.IScene
  Dim pgmxdoc As esriArcGlobe.IGMxDocument
  Set pgmxdoc = pDoc
  Set pscene = pgmxdoc.Scene
  Set pglobe = pscene
  Set pglbDisp = pglobe.GlobeDisplay
  Dim pglbdispLyr As esriGlobeCore.IGlobeDisplayLayers
  Set pglbdispLyr = pglbDisp
  Dim pglbLyrPropsCurr As esriGlobeCore.IGlobeLayerProperties
  'query to see if the Globelayer property set above is honored.
  'note by default when a raster layer is added, it will be treated as an image.
  'However since we set pglbLyrPrp.Type = esriGlobeDataElevation it should be add as an elevation layer.
  Set pglbLyrPropsCurr = pglbdispLyr.FindGlobeProperties(player)
  Dim pglbdatatype As esriGlobeCore.esriGlobeDataType
  pglbdatatype = pglbLyrPropsCurr.Type
  Debug.Print pglbdatatype
  pgmxdoc.Addlayer player
  Exit Sub
Er:
    Debug.Print Err.Description
End Sub