等值線圖能直觀地展現數據的變化趨勢,是衆多領域展現成果的重要圖建之一,被普遍應用於石油勘探、礦物開採、氣象預報等衆多領域。等值線的繪製是指從大量採樣數據中提取出具備相同值的點的信息,並生成形態完整、位置精確的等值線的過程,包括等值線網格化、等值線追蹤、等值線光滑、等值線填充與標註幾個處理步驟。算法
PIE支持算法功能的執行,下面對矢量成成等值線算法功能進行介紹。ide
第一步工具 |
算法參數設置spa |
第二步rest |
算法執行code |
第三步視頻 |
結果顯示blog |
算法名稱教程 |
矢量等值線生成內存 |
|
C#算法DLL |
PIE.CommonAlgo.dll |
|
C#算法名稱 |
PIE.CommonAlgo. VectorToContourLineFaceAlgo |
|
參數結構體 |
VectorToContourLineFace_Exchange_Info |
|
參數說明 |
||
InputFeatureDataset |
IFeatureDataset |
輸入矢量數據集 |
m_sFieldName |
string |
字段名字 |
m_nRow |
Int |
格點行 |
m_nCol |
intl |
格點列 |
m_numberOfNearestNeighbors |
int |
插值計算相關臨近點數 |
m_unDefData |
double |
不參與計算的數值 |
m_bGenerateFace |
bool |
是否生成等值線面 |
m_vecContourValue |
IList<double> |
等值線值 |
m_sOutputLineFilePath |
string |
輸出等值線路徑 |
m_sOutputFaceFilePath |
string |
輸出等值面路徑 |
Extent |
IEnvelop |
輸入範圍(爲空時使用圖層的範圍) |
BOutMemDataset |
Bool |
是否生成內存數據集 |
OutputFaceFeatureDataset |
IFeatureDataset |
輸出面內存數據集 |
OutputLineFeatureDataset |
IFeatureDataset |
輸出線內存數據集 |
數據路徑 |
百度雲盤地址下/ PIE示例數據/矢量數據/省會城市.shp |
視頻路徑 |
百度雲盤地址下/PIE視頻教程/10.算法調用/實用工具/矢量等值線生成.avi |
示例代碼 |
|
1 /// <summary> 2 /// 矢量數據生成等值線算法示例 3 /// </summary> 4 public void Test_VectorToContourLineFaceAlgo() 5 { 6 PIE.CommonAlgo.VectorToContourLineFace_Exchange_Info info = new VectorToContourLineFace_Exchange_Info() 7 string filePath =@"D:\data\China1\省會城市.shp"; 8 info.InputFeatureDataset=DatasetFactory.OpenFeatureDataset(filePath); 9 info.m_sFieldName = "GDP";//"根據選擇矢量數據要生成等值線的字段而定"; 10 info.m_nRow = 400; 11 info.m_nCol = 400; 12 info.m_numberOfNearestNeighbors = 8; 13 info.m_unDefData = -9999.0; 14 info.m_bGenerateFace = true; 15 info.m_sOutputLineFilePath = @"D:\temp\line.shp"; 16 info.m_sOutputFaceFilePath = @"D:\temp\face.shp"; 17 for (int i = 0; i < 300; i += 10) 18 { 19 info.m_vecContourValue.Add(i); 20 } 21 PIE.CommonAlgo.VectorToContourLineFaceAlgo algo = new VectorToContourLineFaceAlgo(); 22 algo.Params = info; 23 bool result = algo.Execute(); 24 return; 25 } |