com.esri.arcgis.controls
Class IARGlobeProxy

java.lang.Object
  extended by com.esri.arcgis.interop.Dispatch
      extended by com.esri.arcgis.controls.IARGlobeProxy
All Implemented Interfaces:
IARGlobe, Externalizable, Serializable

public class IARGlobeProxy
extends com.esri.arcgis.interop.Dispatch
implements IARGlobe, Serializable

Provides access to members that control the ARGlobe.

Description

The IARGlobe interface is a starting point for navigating around the globe, setting globe properties, and accessing any layer's contained within the globe.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

See Also:
Serialized Form

Field Summary
 boolean noncastable
           
 
Fields inherited from class com.esri.arcgis.interop.Dispatch
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF, objRef
 
Constructor Summary
  IARGlobeProxy()
           
  IARGlobeProxy(Object obj)
           
protected IARGlobeProxy(Object obj, String iid)
           
 
Method Summary
 void addListener(String iidStr, Object theListener, Object theSource)
           
 void centerAt(double longitude, double latitude)
          Moves the observer over the specified point.
 void centerAtBookmark(Object vBookmarkID)
          Zooms the globe display to the bookmark.
 int getAnimationCount()
          The number of animations in the globes's animation collection.
 String getAnimationName(int index)
          The name of the animation.
 IARLayer getARLayer(int index)
          The layer at the specified index.
 int getARLayerCount()
          The number of layers in the globe's layer collection.
 double getAzimuth()
          The azimuth of the observer in degrees.
 int getBookmarkCount()
          The number of bookmarks in the globe’s bookmark collection.
 String getBookmarkName(int index)
          The name of the bookmark.
 double getElevation()
          The distance between observer location and globe’s surface.
 int getGlobeUnits()
          The geographical units of the globe.
 void getObserverLocation(double[] longitude, double[] latitude, double[] elev)
          Gets the current observer location.
 double getPitch()
          The pitch of the observer in degrees.
 String getSpatialReferenceName()
          The name of the globe’s spatial reference.
 boolean getSurfacePoint(int x, int y, double[] longitude, double[] latitude, double[] elev)
          Converts a point in device coordinates (typically pixels) to coordinates in latitude and longitude.
 IARFeature locateARFeature(int x, int y)
          Searches the globe along a ray trace, returns the first feature in the ray.
 void playAnimation(Object vAnimationID)
          Plays an animation.
 IARFeatureSet queryARFeatures(IARSearchDef pSearchDef)
          Searches the globe using a search definition and returns an ARFeatureSet.
 void removeListener(String iidStr, Object theListener)
           
 IARFeatureCursor searchARFeatures(IARSearchDef pSearchDef)
          Searches the globe using a search definition and returns an ARFeatureCursor.
 void setAzimuth(double azimuth)
          The azimuth of the observer in degrees.
 void setElevation(double elev)
          The distance between observer location and globe’s surface.
 void setObserverLocation(double longitude, double latitude, double elev)
          Sets the current observer location.
 void setPitch(double pitch)
          The pitch of the observer in degrees.
 void zoomToBookmark(Object vBookmarkID)
          Zooms the globe display to the bookmark.
 void zoomToFullExtent()
          Zoom to the full extent of the globe.
 
Methods inherited from class com.esri.arcgis.interop.Dispatch
bindUsingMoniker, constructVtblPosTable, convertToNative, cookieForListener, createDispatch, createObjrefMonikerDisplayName, equals, getActiveObject, getActiveObject, getDefaultProperty, getDispatchIdOfName, getLastErrorCode, getMtsObjectContext, getObjRef, getPropertyByName, getPropertyByName, getVtblPos, hashCode, initDispatch, invoke, invokeMethodByName, invokeMethodByName, invokeMethodByName, invokePropertyGetByName, invokePropertyPutByName, invokePropertyPutByRefByName, isNativeMode, isObjRef, optimizedVtblInvoke, queryInterface, readExternal, release, setNativeMode, setPropertyByName, toString, vtblInvoke, writeExternal
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

noncastable

public boolean noncastable
Constructor Detail

IARGlobeProxy

public IARGlobeProxy()

IARGlobeProxy

public IARGlobeProxy(Object obj)
              throws IOException
Throws:
IOException

IARGlobeProxy

protected IARGlobeProxy(Object obj,
                        String iid)
                 throws IOException
Throws:
IOException
Method Detail

addListener

public void addListener(String iidStr,
                        Object theListener,
                        Object theSource)
                 throws IOException
Overrides:
addListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

removeListener

public void removeListener(String iidStr,
                           Object theListener)
                    throws IOException
Overrides:
removeListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

getBookmarkCount

public int getBookmarkCount()
                     throws IOException,
                            AutomationException
The number of bookmarks in the globe’s bookmark collection.

Description

The BookmarkCount property returns the number of spatial bookmarks within the ARGlobe.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Specified by:
getBookmarkCount in interface IARGlobe
Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getBookmarkName

public String getBookmarkName(int index)
                       throws IOException,
                              AutomationException
The name of the bookmark.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Specified by:
getBookmarkName in interface IARGlobe
Parameters:
index - The index (in)
Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

zoomToBookmark

public void zoomToBookmark(Object vBookmarkID)
                    throws IOException,
                           AutomationException
Zooms the globe display to the bookmark.

Description

Zooms to the spatial bookmark to make it visible on the display as the new viewing extent, changing the observer location. A bookmark name, or index within the bookmark collection, can be passed as the vBookmarkID parameter.

Specify a BookmarkName or a zero-based index to zoom to a spatial bookmark. For example, to zoom to the first spatial bookmark in the collection, pass an index of 0, and to zoom to the last spatial bookmark in the layer collection, pass an index of (BookmarkCount - 1).


Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Specified by:
zoomToBookmark in interface IARGlobe
Parameters:
vBookmarkID - A Variant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

centerAtBookmark

public void centerAtBookmark(Object vBookmarkID)
                      throws IOException,
                             AutomationException
Zooms the globe display to the bookmark.

Description

Centers the spatial bookmark in the display to make it visible. ARGlobe::Elevation and ARGlobe::Pitch, which partly determine the ARGlobe observers location and view, will change to that of the observer location when the spatial bookmark was created.

Specify a BookmarkName or a zero-based index to center a spatial bookmark. For example, to center the first spatial bookmark in the collection, pass an index of 0, and to center the last spatial bookmark in the layer collection, pass an index of (BookmarkCount - 1).

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Specified by:
centerAtBookmark in interface IARGlobe
Parameters:
vBookmarkID - A Variant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getAnimationCount

public int getAnimationCount()
                      throws IOException,
                             AutomationException
The number of animations in the globes's animation collection.

Description

The AnimationCount property returns the number of Animations within the ARGlobe animation collection. The ARGlobe animation collection only contains animations published with the currently open document.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Specified by:
getAnimationCount in interface IARGlobe
Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getAnimationName

public String getAnimationName(int index)
                        throws IOException,
                               AutomationException
The name of the animation.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Specified by:
getAnimationName in interface IARGlobe
Parameters:
index - The index (in)
Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

playAnimation

public void playAnimation(Object vAnimationID)
                   throws IOException,
                          AutomationException
Plays an animation.

Description

Plays the animation. An animation name, or index within the animation collection, can be passed as the vAnimationID parameter.

Remarks

The Animation Window is visible depending on the value of the showAnimationWindow parameter. The Animation Window provides simple controls to play and stop animations. By default showAnimationWindow is false and animations are played without the window.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Specified by:
playAnimation in interface IARGlobe
Parameters:
vAnimationID - A Variant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getARLayerCount

public int getARLayerCount()
                    throws IOException,
                           AutomationException
The number of layers in the globe's layer collection.

Description

The ARLayerCount property returns the number of ARLayers within the ARGlobe.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Specified by:
getARLayerCount in interface IARGlobe
Returns:
The count
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getARLayer

public IARLayer getARLayer(int index)
                    throws IOException,
                           AutomationException
The layer at the specified index.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Specified by:
getARLayer in interface IARGlobe
Parameters:
index - The index (in)
Returns:
A reference to a com.esri.arcgis.controls.IARLayer
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSpatialReferenceName

public String getSpatialReferenceName()
                               throws IOException,
                                      AutomationException
The name of the globe’s spatial reference.

Description

Returns the name of the spatial reference the ARGlobe is using to display data.

Remarks

For PMF's published from ArcGlobe 9.2, this property will always return GCS_WGS_84.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Specified by:
getSpatialReferenceName in interface IARGlobe
Returns:
The sSpatialReference
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getGlobeUnits

public int getGlobeUnits()
                  throws IOException,
                         AutomationException
The geographical units of the globe.

Description

GlobeUnits provide context to measurements of distance and elevation.

Remarks

GlobeUnits are determined prior to publishing the PMF document, by setting the Globe Display units within ArcGlobe.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Specified by:
getGlobeUnits in interface IARGlobe
Returns:
A com.esri.arcgis.controls.esriARUnits constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setElevation

public void setElevation(double elev)
                  throws IOException,
                         AutomationException
The distance between observer location and globe’s surface.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Specified by:
setElevation in interface IARGlobe
Parameters:
elev - The elev (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getElevation

public double getElevation()
                    throws IOException,
                           AutomationException
The distance between observer location and globe’s surface.

Description

The altitude, relative to sea level, of the current observer location.

Remarks

Elevation is measured in Kilometers.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Specified by:
getElevation in interface IARGlobe
Returns:
The elev
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

centerAt

public void centerAt(double longitude,
                     double latitude)
              throws IOException,
                     AutomationException
Moves the observer over the specified point.

Description

The CenterAt method positions the supplied geographic coordinates in the center of the ARGlobe display area. ARGlobe::Pitch and ARGlobe::Elevation remain unchanged.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Specified by:
centerAt in interface IARGlobe
Parameters:
longitude - The longitude (in)
latitude - The latitude (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSurfacePoint

public boolean getSurfacePoint(int x,
                               int y,
                               double[] longitude,
                               double[] latitude,
                               double[] elev)
                        throws IOException,
                               AutomationException
Converts a point in device coordinates (typically pixels) to coordinates in latitude and longitude.

Description

Given a screen coordinate in pixels, this method returns the longitude and latitude of the point on the ARGlobe surface at the screen X and Y location. It also returns the elevation of the globe surface at that point.

Remarks

Latitude and longitude are measured in decimal degrees. Elevation is measured in Kilometers.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Specified by:
getSurfacePoint in interface IARGlobe
Parameters:
x - The x (in)
y - The y (in)
longitude - The longitude (in/out: use single element array)
latitude - The latitude (in/out: use single element array)
elev - The elev (in/out: use single element array)
Returns:
The bHitGlobe
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

zoomToFullExtent

public void zoomToFullExtent()
                      throws IOException,
                             AutomationException
Zoom to the full extent of the globe.

Description

Changes the ARGlobe's viewing extent to show the full extent of all data layers, causing the observer location to change. The ZoomToFullExtent method automatically refreshes the ARGlobe display area.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Specified by:
zoomToFullExtent in interface IARGlobe
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryARFeatures

public IARFeatureSet queryARFeatures(IARSearchDef pSearchDef)
                              throws IOException,
                                     AutomationException
Searches the globe using a search definition and returns an ARFeatureSet.

Description

Queries the ARGlobe based upon an attribute or spatial query as defined by the ARSearchDef. Only ARLayer objects with a Searchable property set to true within the ARGlobe will be searched.

All ARFeature objects matching the query are instantiated in the ARFeatureSet. If the number of features could be very large, this may not be desirable as it may result in a long delay and consume a large amount of memory. Instead use the SearchARFeatures method. If there are no features matching the query the IARFeatureSet::ARFeatureCount property will return 0.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Specified by:
queryARFeatures in interface IARGlobe
Parameters:
pSearchDef - A reference to a com.esri.arcgis.controls.IARSearchDef (in)
Returns:
A reference to a com.esri.arcgis.controls.IARFeatureSet
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

searchARFeatures

public IARFeatureCursor searchARFeatures(IARSearchDef pSearchDef)
                                  throws IOException,
                                         AutomationException
Searches the globe using a search definition and returns an ARFeatureCursor.

Description

Searches the ARGlobe based upon an attribute or spatial query as defined by the ARSearchDef. Only ARLayer objects with a Searchable property set to true within the ARGlobe will be searched.

Use the ARFeatureCursor to retrieve each ARFeature one at a time. If there are no ARFeature objects matching the query the first call to IARFeatureCursor::NextARFeature will return nothing.

Remarks

The SearchARFeatures method will return an error if the currently loaded document was not published with permission to QueryFeatures. Use the IARControl::HasDocumentPermission method to determine this.
If there is an error with the query, such as ill-formed SQL, the error returned will contain an error description from the underlying database.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Specified by:
searchARFeatures in interface IARGlobe
Parameters:
pSearchDef - A reference to a com.esri.arcgis.controls.IARSearchDef (in)
Returns:
A reference to a com.esri.arcgis.controls.IARFeatureCursor
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

locateARFeature

public IARFeature locateARFeature(int x,
                                  int y)
                           throws IOException,
                                  AutomationException
Searches the globe along a ray trace, returns the first feature in the ray.

Description

Given a screen coordinate in pixels, this method returns the first ARFeature located along an imaginary line from the observer location to the specified point on the ARGlobe surface.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Specified by:
locateARFeature in interface IARGlobe
Parameters:
x - The x (in)
y - The y (in)
Returns:
A reference to a com.esri.arcgis.controls.IARFeature
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setObserverLocation

public void setObserverLocation(double longitude,
                                double latitude,
                                double elev)
                         throws IOException,
                                AutomationException
Sets the current observer location.

Description

Sets the current observer location. The observer location is described as a point on the ARGlobe’s surface above which the observer is located at a given elevation. The point on the ARGlobe's surface is intersected by an imaginary line from the center of the globe to the observers location. Elevation sets the altitude, relative to sea level, of the observer location.

Remarks

Observer location latitude and longitude are measured in decimal degrees. Observer location elevation is measured in Kilometers.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Specified by:
setObserverLocation in interface IARGlobe
Parameters:
longitude - The longitude (in)
latitude - The latitude (in)
elev - The elev (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getObserverLocation

public void getObserverLocation(double[] longitude,
                                double[] latitude,
                                double[] elev)
                         throws IOException,
                                AutomationException
Gets the current observer location.

Description

Returns the current observer location. The current observer location is described using a point on the ARGlobe’s surface beneath the current observer location and the current observer elevation. The point on the ARGlobe's surface is intersected by an imaginary line from the center of the globe to the observers location. Elevation returns the altitude, relative to sea level, of the current observer location.

Remarks

Observer location latitude and longitude are measured in decimal degrees. Observer location elevation is measured in Kilometers.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Specified by:
getObserverLocation in interface IARGlobe
Parameters:
longitude - The longitude (in/out: use single element array)
latitude - The latitude (in/out: use single element array)
elev - The elev (in/out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getPitch

public double getPitch()
                throws IOException,
                       AutomationException
The pitch of the observer in degrees.

Description

Pitch is an angle between the line of sight, and the tangent of the observer’s imaginary circular orbit.

Remarks

Setting the ARGlobe::Pitch = 0 will orientate the observer to look straight down towards the ARGlobe surface, likewise, setting the ARGlobe::Pitch = 180 will orientate the observer to look straight up away from the ARGlobe surface.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Specified by:
getPitch in interface IARGlobe
Returns:
The pitch
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setPitch

public void setPitch(double pitch)
              throws IOException,
                     AutomationException
The pitch of the observer in degrees.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Specified by:
setPitch in interface IARGlobe
Parameters:
pitch - The pitch (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getAzimuth

public double getAzimuth()
                  throws IOException,
                         AutomationException
The azimuth of the observer in degrees.

Description

The azimuth is an angle, measured clockwise in decimal degrees, that represents the observers view direction relative to the North Pole.

Remarks

Setting the ARGlobe::Azimuth = 0 will orientate the observer to look directly North, likewise, setting the ARGlobe::Azimuth = 180 will orientate the observer to look directly south. The Azimuth property can be used to rotate the observer on a point.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Specified by:
getAzimuth in interface IARGlobe
Returns:
The azimuth
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setAzimuth

public void setAzimuth(double azimuth)
                throws IOException,
                       AutomationException
The azimuth of the observer in degrees.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Specified by:
setAzimuth in interface IARGlobe
Parameters:
azimuth - The azimuth (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.