Analysis接口中对洪水淹没做了定义,个人觉的这个不是特别有使用价值。只是做个示意罢了简单介绍一下参数的构成。
CreateFloodSingleWaterRise :当水位上涨时创建一组多边形显示淹没区域。返回多边形的ID可以获取淹没区域的几何属性。
//水淹分析的中心源点
double OriginX = sg65.Navigate.GetPosition().X;
double OriginY = sg65.Navigate.GetPosition().Y;
//半径
double Radius = 2000;
//总共淹没的高度
double TotalWaterLevelRaise = 100;
//采样间隔
double SampleInterval = 20;
string DES = "WaterRise";
try
{
sg65.Analysis.CreateFloodSingleWaterRise(OriginX, OriginY, Radius, TotalWaterLevelRaise, SampleInterval, "", DES);
}
catch (Exception EX)
{
MessageBox.Show(EX.Message);
}
CreateFloodContinuousWaterRise :在设定时间内当水以恒定速率(用户设置的上升速率和上升区间集)持续增长时,创建一组多边形显示被水淹没的地区。可以通过时间滚动条动态的查看变化。
double OriginX = sg65.Navigate.GetPosition().X;
double OriginY = sg65.Navigate.GetPosition().Y;
//覆盖的半径
double Radius = 6000;
//水面上升的速率(米/小时)
double WaterRiseRate = 6;
//采样间隔的距离
double SampleInterval = 600;
//采样时间间隔
double TimeSampleIntervalHours = 2;
object StartTime = sg65.DateTime.Current;// sg65.DateTime.FixedLocalTime;
object EndTime = System.DateTime.Now.AddDays(10);
string myDes = "ContinuousWaterrise";
try
{
sg65.Analysis.CreateFloodContinuousWaterRise(OriginX, OriginY, Radius, WaterRiseRate, SampleInterval, TimeSampleIntervalHours, StartTime, EndTime, "", myDes);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
示例代码。