|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.controls.ARGlobe
public class ARGlobe
The ARGlobe container for the display of globe data.
Every PMF document that has been published from ArcGlobe contains an ARGlobe object. As a container for globe data, the ARGlobe is a single view that takes control of the main display area of the ArcReaderGlobeControl. It is the primary point for managing data layers, navigating around those data layers and finding particular features.
Constructor Summary | |
---|---|
ARGlobe(Object obj)
Construct a ARGlobe using a reference to such an object returned from ArcGIS Engine or Server. |
Method Summary | |
---|---|
void |
centerAt(double longitude,
double latitude)
Moves the observer over the specified point. |
void |
centerAtBookmark(Object vBookmarkID)
Zooms the globe display to the bookmark. |
boolean |
equals(Object o)
Compare this object with another |
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. |
int |
hashCode()
the hashcode for this object |
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. |
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 java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef |
---|
getJintegraDispatch, release |
Constructor Detail |
---|
public ARGlobe(Object obj) throws IOException
obj
to ARGlobe
. *
ARGlobe o = (ARGlobe)obj; // will not work
ARGlobe o = new ARGlobe(obj); // Use this constructor instead
* @param obj an object returned from ArcGIS Engine or Server
IOException
- if there are interop problems
ARGlobe theARGlobe = (ARGlobe) obj;
Method Detail |
---|
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public int getBookmarkCount() throws IOException, AutomationException
The BookmarkCount property returns the number of spatial bookmarks within the ARGlobe.
getBookmarkCount
in interface IARGlobe
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getBookmarkName(int index) throws IOException, AutomationException
getBookmarkName
in interface IARGlobe
index
- The index (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void zoomToBookmark(Object vBookmarkID) throws IOException, AutomationException
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).
zoomToBookmark
in interface IARGlobe
vBookmarkID
- A Variant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void centerAtBookmark(Object vBookmarkID) throws IOException, AutomationException
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).
centerAtBookmark
in interface IARGlobe
vBookmarkID
- A Variant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getAnimationCount() throws IOException, AutomationException
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.
getAnimationCount
in interface IARGlobe
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getAnimationName(int index) throws IOException, AutomationException
getAnimationName
in interface IARGlobe
index
- The index (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void playAnimation(Object vAnimationID) throws IOException, AutomationException
Plays the animation. An animation name, or index within the animation collection, can be passed as the vAnimationID parameter.
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.
playAnimation
in interface IARGlobe
vAnimationID
- A Variant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getARLayerCount() throws IOException, AutomationException
The ARLayerCount property returns the number of ARLayers within the ARGlobe.
getARLayerCount
in interface IARGlobe
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IARLayer getARLayer(int index) throws IOException, AutomationException
getARLayer
in interface IARGlobe
index
- The index (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getSpatialReferenceName() throws IOException, AutomationException
Returns the name of the spatial reference the ARGlobe is using to display data.
For PMF's published from ArcGlobe 9.2, this property will always return GCS_WGS_84.
getSpatialReferenceName
in interface IARGlobe
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getGlobeUnits() throws IOException, AutomationException
GlobeUnits provide context to measurements of distance and elevation.
GlobeUnits are determined prior to publishing the PMF document, by setting the Globe Display units within ArcGlobe.
getGlobeUnits
in interface IARGlobe
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setElevation(double elev) throws IOException, AutomationException
setElevation
in interface IARGlobe
elev
- The elev (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public double getElevation() throws IOException, AutomationException
The altitude, relative to sea level, of the current observer location.
Elevation is measured in Kilometers.
getElevation
in interface IARGlobe
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void centerAt(double longitude, double latitude) throws IOException, AutomationException
The CenterAt method positions the supplied geographic coordinates in the center of the ARGlobe display area. ARGlobe::Pitch and ARGlobe::Elevation remain unchanged.
centerAt
in interface IARGlobe
longitude
- The longitude (in)latitude
- The latitude (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean getSurfacePoint(int x, int y, double[] longitude, double[] latitude, double[] elev) throws IOException, AutomationException
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.
Latitude and longitude are measured in decimal degrees. Elevation is measured in Kilometers.
getSurfacePoint
in interface IARGlobe
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)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void zoomToFullExtent() throws IOException, AutomationException
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.
zoomToFullExtent
in interface IARGlobe
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IARFeatureSet queryARFeatures(IARSearchDef pSearchDef) throws IOException, AutomationException
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.
queryARFeatures
in interface IARGlobe
pSearchDef
- A reference to a com.esri.arcgis.controls.IARSearchDef (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IARFeatureCursor searchARFeatures(IARSearchDef pSearchDef) throws IOException, AutomationException
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.
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.
searchARFeatures
in interface IARGlobe
pSearchDef
- A reference to a com.esri.arcgis.controls.IARSearchDef (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IARFeature locateARFeature(int x, int y) throws IOException, AutomationException
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.
locateARFeature
in interface IARGlobe
x
- The x (in)y
- The y (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setObserverLocation(double longitude, double latitude, double elev) throws IOException, AutomationException
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.
Observer location latitude and longitude are measured in decimal degrees. Observer location elevation is measured in Kilometers.
setObserverLocation
in interface IARGlobe
longitude
- The longitude (in)latitude
- The latitude (in)elev
- The elev (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void getObserverLocation(double[] longitude, double[] latitude, double[] elev) throws IOException, AutomationException
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.
Observer location latitude and longitude are measured in decimal degrees. Observer location elevation is measured in Kilometers.
getObserverLocation
in interface IARGlobe
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)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public double getPitch() throws IOException, AutomationException
Pitch is an angle between the line of sight, and the tangent of the observer’s imaginary circular orbit.
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.
getPitch
in interface IARGlobe
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setPitch(double pitch) throws IOException, AutomationException
setPitch
in interface IARGlobe
pitch
- The pitch (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public double getAzimuth() throws IOException, AutomationException
The azimuth is an angle, measured clockwise in decimal degrees, that represents the observers view direction relative to the North Pole.
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.
getAzimuth
in interface IARGlobe
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setAzimuth(double azimuth) throws IOException, AutomationException
setAzimuth
in interface IARGlobe
azimuth
- The azimuth (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |