目標
從高壓電拉電線至工廠,需要成本最低的路徑。

Marco Modeler 操作
利用 assign 定義與分類出 worcwest 中每個區域的成本。使用 Edit. 建立一個avl. 檔案,為指派給 assign,取名為 friction,定義如下:
| Land Use | Friction |
|---|---|
| Water | 1000 |
| Deciduous Forest (1, 2, 3) | 4 |
| Coniferous Forest (1, 2) | 5 |
| Grass / Suburban | 1000 |
| Agriculture | 1 |
| Urban (Resid. , Comm.) | 1000 |
| Pavement (1, 2) | 1 |
| Gravel / Barren | 1 |
| |
worcwest 與分類的 avl. 檔案(friction) 連接 assign,output 的像素檔也取名為 friction。



建立 newplant 這個向量的像素檔,使用 pointras 產生需要參考的像素圖,所以要用 intital 連接任何一張像素圖,我這裡是連接 worcwest,output 的檔案取名為 blank。再把 blank 連接到 pointras ,pointras 內的資料如下圖:

目前的模型:

要計算成本,新增一個 cost ,output 的檔案取名為 costdistance , cost 中的 Algorithm 選擇 CostGrow。

再把 newplant 跟 friction 輸入進 cost 內,Source feature image 為 newplant;Fiction surface image 為 friction。

此時的模型如下圖:

可以按執行先 output 出 costdistance , cost 的部分會跑得比較久。output 的 costdistance 如下圖:

再從 Vector Layer 開啟高壓電電線 powerline,powerline 是一個向量檔,需要產生一個它的像素檔,使用 lineras 連接,output 的檔案取名為 powerline。
一樣把 blank 連接到 lineras 內,此時 lineras 內部的資料如下圖:


新增 pathway ,output 的檔案取名為 newline。pathway 內 Cost surface image 為 costdistance,Target image 為 powerline ,此時 pathway 內部的資料如下圖:

因為我們只要一條線,所以要把 Multiple pathways 的 Yes 改成 No,output 的結果如下圖:

結果
結果圖
加上圖層 newplant(工廠)與 powerline(高壓電),再去掉背景,就可以看到工廠接電線到高壓電最適合的路徑。

Marco Modeler 的所有流程

