Creates a graphical representation of all the visible areas of the terrain, within a field of view, from a given viewing point.The user can define viewer height and radius of viewshed analysis. The calculated route viewshed can be displayed as:
§ Individual viewshed results for each selected point along the route
§ A single composite viewshed showing visible area from any of the route’s waypoints
§ A series of individual viewshed results that display according to a set timespan
JavaScript |
|
|
|
|
CreateViewshedOnRoute( Route, AnalysisType, ViewerHeight, Distance, SampleInterval, RaySpacing, DistanceBetweenWaypoints, TimeStart, TimeEnd, GroupID = 0, Description = "") |
C# |
|
|
|
|
int CreateViewshedOnRoute( ILineString Route, MultipleViewshedAnalysisType AnalysisType, double ViewerHeight, double Distance, double SampleInterval, double RaySpacing, double DistanceBetweenWaypoints, object TimeStart, object TimeEnd, int GroupID = 0, string Description = "") |
C++ |
|
|
|
|
HRESULT CreateViewshedOnRoute( ILineString* Route, MultipleViewshedAnalysisType AnalysisType, double ViewerHeight, double Distance, double SampleInterval, double RaySpacing, double DistanceBetweenWaypoints, VARIANT TimeStart, VARIANT TimeEnd, LONG_PTR GroupID, BSTR Description, LONG_PTR* pTreeItemId) |
Parameters
Route
An ILineString object representing the geometry that defines the route.
AnalysisType
An enum that determines the Viewshed analysis type. The following are the possible Analysis Type values:
· MVT_VIEWSHED_ON_ROUTE = 0
Displays the viewshed as individual viewshed results for each waypoint along the route.
· MVT_TIMESPAN_VIEWSHED_ON_ROUTE = 1
Displays the viewshed as a series of individual viewshed results that display according to a set timespan.
· MVT_CUMULATIVE_VIEWSHED_ON_ROUTE = 2
Displays the viewshed as a single composite viewshed showing visible area from any of the route’s waypoints.
ViewerHeight
The height of the viewer waypoints on the route.
Distance
The radius of the viewshed analysis from each of the route’s waypoints.
SampleInterval
The distance between terrain samples for the measurement along each ray. A smaller sample size is more accurate but slower to calculate.
RaySpacing
The space in degrees between each ray that TerraExplorer samples. TerraExplorer samples several rays (lines of sight) in the area sector. The smaller the ray spacing, the more accurate the measurement, but the longer it takes to calculate.
DistanceBetweenWaypoints
The distance between viewsheds along the route.
TimeStart
The start time assigned to the Viewshed on Route results. The value can be any of the following:
· Javascript DateTime object
· VT_DATE
Note: DateTime (e.g. in JavaScript) is automatically converted to VT_DATE.
· _time_t
Int or long values representing the number of seconds elapsed since 00:00:00 on January 1, 1970, Coordinated Universal Time.
· double
double values representing the number of milliseconds elapsed since 00:00:00 on January 1, 1970, Coordinated Universal Time.
· C# DateTime object
TimeEnd
The end time assigned to the Viewshed on Route results. The value can be any of the following:
· Javascript DateTime object
· VT_DATE
Note: DateTime (e.g. in JavaScript) is automatically converted to VT_DATE.
· _time_t
Int or long values representing the number of seconds elapsed since 00:00:00 on January 1, 1970, Coordinated Universal Time.
· double
double values representing the number of milliseconds elapsed since 00:00:00 on January 1, 1970, Coordinated Universal Time.
· C# DateTime object
GroupID
The Project Tree group in which the model is created. If it is set to zero, the object is created under the root. You can obtain the GroupID by one of the following methods:
§ Create the group using IProjectTree61.CreateGroup.
§ Find the group, if you know the name, using IProjectTree61.FindItem.
§ Traverse the Tree using IProjectTree61 methods such as GetNextItem (), until you come to the desired GroupID.
Description
The name of the viewshed object as it appears in the Project Tree. If an empty string is passed into this parameter, TerraExplorer assigns it a unique name.
Return Value
pTreeItemId
The ID that represents the viewshed object in the Project Tree.
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.