ITerrainSurfaceExtractWatershed Method |
Extracts the surface watershed information from the terrain surface.
Namespace: Autodesk.Civil.DatabaseServicesAssembly: AeccDbMgd (in AeccDbMgd.dll) Version: 13.8.0.292
SyntaxObjectIdCollection ExtractWatershed(
SurfaceExtractionSettingsType settingsType
)
Function ExtractWatershed (
settingsType As SurfaceExtractionSettingsType
) As ObjectIdCollection
ObjectIdCollection^ ExtractWatershed(
SurfaceExtractionSettingsType settingsType
)
Parameters
- settingsType SurfaceExtractionSettingsType
-
Specify SurfaceExtractionSettingsType.Plan to extract the watershed information using the plan visual style settings,
or SurfaceExtractionSettingsType.Model to use the model settings.
Return Value
ObjectIdCollection
An ObjectIdCollection of the extracted entities. The extracted entities can be Polyline3d or Hatch.
If the surface has no watershed information, this method returns an empty ObjectIdCollection.
Example 1
2
3
4ObjectId surfaceId = _civildoc.GetSurfaceIds()[0];
5TinSurface surface = surfaceId.GetObject(OpenMode.ForRead) as TinSurface;
6
7
8
9ObjectIdCollection watershedData;
10watershedData = surface.ExtractWatershed(SurfaceExtractionSettingsType.Plan);
11write("# of extracted data components: " + watershedData.Count + "\n");
12
13foreach (ObjectId dataId in watershedData)
14{
15
16
17 Polyline3d watershedLine = dataId.GetObject(OpenMode.ForRead) as Polyline3d;
18 if (watershedLine != null)
19 {
20 write(String.Format("Watershed line start:{0} end:{1}\n",
21 watershedLine.StartPoint.ToString(), watershedLine.EndPoint.ToString()));
22 }
23
24 Hatch watersheHatch = dataId.GetObject(OpenMode.ForRead) as Hatch;
25 if (watersheHatch != null)
26 {
27 write(String.Format("Watershed hatch area:{0} origin:{1}\n",
28 watersheHatch.Area, watersheHatch.Origin.ToString()));
29 }
30}
No code example is currently available or this language may not be supported.
See Also