Description
AgAreaTypePatternCollection used to access
the List of coords of the AreaTarget AreaType
Object Model
Public Methods
Add |
Adds a lat lon value. Lat
parameter uses Latitude Dimension. Lon parameter uses Longitude
Dimension. |
Insert |
Inserts a lat lon value
(the value is inserted into the specified index without having to
remove all elements) Lat parameter uses Latitude Dimension. Lon
parameter uses Longitude Dimension. |
Remove |
Remove an Item using a
given index. |
RemoveAll |
Remove all the elements of
the collection. |
ToArray |
Returns the lat lons as a
two dimensional array. |
Public Properties
Count |
Returns the number of lat
lons. |
Item |
Returns the lat lon with
the Index. |
Example
Define area target
boundary and position from list of lat/lon/alt
[C#] |
Copy Code
|
root.BeginUpdate();
areaTarget.AreaType = AgEAreaType.ePattern;
IAgAreaTypePatternCollection patterns = areaTarget.AreaTypeData as IAgAreaTypePatternCollection;
patterns.Add(48.897, 18.637);
patterns.Add(46.534, 13.919);
patterns.Add(44.173, 21.476);
root.EndUpdate();
|
|
List all points in an
area target
[C#] |
Copy Code
|
if (areaTarget.AreaType == AgEAreaType.ePattern)
{
IAgAreaTypePatternCollection patternPoints = areaTarget.AreaTypeData as IAgAreaTypePatternCollection;
Array areaTargetPoints = patternPoints.ToArray();
Console.WriteLine("All points in Area Target");
for (int i = 0; i < areaTargetPoints.GetLength(0); ++i)
{
Console.WriteLine(" Latitude {0} Longitude: {1}",
Convert.ToDouble(areaTargetPoints.GetValue(i, 0)),
Convert.ToDouble(areaTargetPoints.GetValue(i, 1)));
}
}
|
|
Define area target
boundary and position from list of lat/lon/alt
[Visual Basic .NET] |
Copy Code
|
root.BeginUpdate()
areaTarget.AreaType = AgEAreaType.ePattern
Dim patterns As IAgAreaTypePatternCollection =
TryCast(areaTarget.AreaTypeData, IAgAreaTypePatternCollection)
patterns.Add(48.897, 18.637)
patterns.Add(46.534, 13.919)
patterns.Add(44.173, 21.476)
root.EndUpdate()
|
|
List all points in an
area target
[Visual Basic .NET] |
Copy Code
|
If areaTarget.AreaType = AgEAreaType.ePattern
Then
Dim
patternPoints As
IAgAreaTypePatternCollection = TryCast(areaTarget.AreaTypeData,
IAgAreaTypePatternCollection)
Dim
areaTargetPoints As Array = patternPoints.ToArray()
Console.WriteLine("All
points in Area Target")
Dim i
As Integer = 0
While i
<>
Console.WriteLine("
Latitude {0} Longitude: {1}",
Convert.ToDouble(areaTargetPoints.GetValue(i, 0)),
Convert.ToDouble(areaTargetPoints.GetValue(i, 1)))
System.Threading.Interlocked.Increment(i)
End
While
End If
|
|
Define area
target boundary and position from list of lat/lon/alt
[MATLAB] |
Copy Code
|
% IAgStkObjectRoot root: STK Object Model Root
% IAgAreaTarget areaTarget: AreaTarget object
% By using the fine grained interfaces,
% BeginUpdate/EndUpdate prevent intermediate redraws
root.BeginUpdate();
areaTarget.AreaType = 'ePattern';
patterns = areaTarget.AreaTypeData;
patterns.Add(48.897, 18.637);
patterns.Add(46.534, 13.919);
patterns.Add(44.173, 21.476);
root.EndUpdate();
areaTarget.AutoCentroid = true;
|
|
CoClasses that Implement
IAgAreaTypePatternCollection