Build A Surface On A Sphere


This command will convert a Raster dataset into a globe including texture coordinates, which will allow for the use of a picture fill symbology. The output is a 3D multipatch shapefile representing the elevation from the input dataset, but on a designated sized sphere. Therefore, the appropriate use of such a command would be to convert a Digital Elevation Model (DEM) of the Earth, or other planetary objects, such as Mars, to its representation as a sphere.

How to use:

    Steps for adding a command/tool from a DLL:

  1. Register the DLL: BuildSurfaceSphere.dll.
  2. In ArcScene's Customize dialog, click on 'Add from file' and select this sample's dll.
  3. Under the Commands| 3D Developer Samples tab, drag the 'Build Surface Sphere' command to a toolbar or menu. Dismiss the Customize dialog.

    Specify the parameters of the command:

  1. Specify the Raster elevation model and the path to the output shapefile. Optionally, designate a BMP image file to use as the feature symbology.
  2. Sphere size: Designate the size of the sphere by an explicit radius measurement, or by scaling the size proportionally to the total change in elevation of the Raster.
  3. Sphere origin: Specify three origin coordinates for the sphere.
  4. Normals Factor: Normals are 3D measurements stored in the vertices of a multipatch which designate a vector determining illumination properties at that location. The 'Normals Factor' is multiplied to the sample cellsize of the Raster while determining these 'normals'.
  5. Z Exaggeration: This value is multiplied to the elevation value at each sampling location of the Raster DEM.
  6. Sampling Resolution Factor: The Sampling Resolution Factor is multiplied to the min and max longitude delta before determining the step size for reading the base Raster, and is therefore proportional to the output globe resolution.


Difficulty: Advanced

Visual Basic
File Description
clsSurfaceSphereOp.cls Underlying command implementation for creating the spehre.
clsSurfaceSphere.cls ICommand implementation for the dialog.
frmMain.frm Dialog to designate command parameters.
BuildSurfaceSphere.vbp Visual Basic Project file for this command.
BuildSurfaceSphere.dll Additional code module for the command.
(3D Analyst Developer Sample utilties) This project also references shared code located in Visual Basic code modules. To compile this project, these files are necessary in the location: '<ARCGIS INSTALL PATH > \ArcObjects Developer Kit\Samples\3D Analyst\Utilities\ '

Key CoClasses: TriangleStrip, GeometryEnvironment
Key Interfaces: IRasterProps, IRawPixels, IRasterDataset, IVector3D, IRasterBand, IEncode3DProperties, IMultiPatch
Key Members: IVector3D::PolarSet, IEncode3DProperties::PackTexture2D