QGIS Plugin: Dynamic Flow
Dynamic Flow是QGIS軟體外掛程式用於估算時空梯度流,基於點資料的屬性值,例如加總後的手機移動數據。
Dynamic Flow is a QGIS plugin to estimate the spatio-temporal 3D gradient flow from the point observation of the attributes values such as aggregated cell-phone mobility data.
Dynamic Flow的演算法介紹可以參考以下論文:
For an introduction to the algorithm of Dynamic Flow, please refer to the following paper:
Bo-Cheng Lin, Ta-Chien Chan*, 2022, “Visualizing Population Mobility from Spatio-temporally Aggregated Mobile Phone Data via a 3D Gradient Approach”, TRANSACTIONS IN GIS
https://doi.org/10.1111/tgis.13008
一、安裝Dynamic Flow外掛程式: 在QGIS軟體主選單上[Plugins] -> [Manager and install Plugins …]直接搜尋Dynamic Flow並安裝。
![](https://gis.rchss.sinica.edu.tw/wp-content/uploads/2024/04/Dynamic_Flow_1-1024x642.png)
二、安裝完成後,可以透過主選單 [Processing] -> [Toolbox] 找到Dynamic Flow工具
![](https://gis.rchss.sinica.edu.tw/wp-content/uploads/2024/04/Dynamic_Flow_2.png)
三、練習資料可以從以下論文下載:
The tutorial data can be download from following paper:
Bergroth, C., Järv, O., Tenkanen, H., Manninen, M., Toivonen, T., 2022. A 24-hour population distribution dataset based on mobile phone data from Helsinki Metropolitan Area, Finland. Scientific Data 9, 39. https://doi.org/10.1038/s41597-021-01113-4 (https://zenodo.org/records/4726996)
四、以下為Dynamic Flow工具操作範例
輸入資料所需內容
- 匯入網格空間(點或面)的SHP檔,其屬性必須包含網格編號(唯一識別碼)以及至少三個時段的資料
![](https://gis.rchss.sinica.edu.tw/wp-content/uploads/2024/04/Dynamic_Flow_3.png)
使用者介面參數設定
- 在Processing Toolbox中選擇Flow Estimate項目並執行
![](https://gis.rchss.sinica.edu.tw/wp-content/uploads/2024/04/Dynamic_Flow_4.png)
- Open SHP File:選取要輸入的SHP檔案
- Grid ID:輸入網格編號欄位名稱
- Time Peroid: 至少選擇連續的3個時間
![](https://gis.rchss.sinica.edu.tw/wp-content/uploads/2024/04/Dynamic_Flow_5.png)
- Accumulated Spatial Mask Size:累加的空間範圍(設定正方形的罩窗大小,數值必須為奇數)
- Output Initial Vector File:是否輸出每個時間的初始人流結果(.csv)
- Output Vector Components File:是否輸出每個時間的初始梯度向量的分量(.csv)
- Output layer:輸出包含資料夾位置的檔案名稱
輸出資料說明
- SHP檔:欄位包含網格編號、方位角(azi)以及梯度值(gradient)
![](https://gis.rchss.sinica.edu.tw/wp-content/uploads/2024/04/Dynamic_Flow_6.png)
- CSV檔:
- 原檔名_initvec.csv:為每個時段的初始向量,Ai欄位代表第i個時段的方位角,Gi欄位代表第i個時段的梯度量。
![](https://gis.rchss.sinica.edu.tw/wp-content/uploads/2024/04/Dynamic_Flow_7-1024x653.png)
- 原檔名_vcomp.csv:為每個時段初始向量的三個分量,v_i_x代表第i個時段的梯度x分量,v_i_y代表第i個時段的梯度y分量,v_i_t代表第i個時段的梯度t分量。
![](https://gis.rchss.sinica.edu.tw/wp-content/uploads/2024/04/Dynamic_Flow_8-1024x653.png)
展示符號設定
- 開啟Symbology
![](https://gis.rchss.sinica.edu.tw/wp-content/uploads/2024/04/Dynamic_Flow_9.png)
- 符號類型選Graduated
- Value 選 gradient
- 點選Symbol
![](https://gis.rchss.sinica.edu.tw/wp-content/uploads/2024/04/Dynamic_Flow_10.png)
- Simple Marker換成箭頭符號
- 開啟Rotation的進階選項
![](https://gis.rchss.sinica.edu.tw/wp-content/uploads/2024/04/Dynamic_Flow_11.png)
- 點選Field type,會跳出視窗提供可以選擇的數值欄位,並選擇azi欄位
![](https://gis.rchss.sinica.edu.tw/wp-content/uploads/2024/04/Dynamic_Flow_12.png)
- Method選擇Size
- 設定Size from … to …
- 分類模式Mode選擇Natural Breaks
- 按Classify按鈕
- 最後按下確定
- 套上底圖之後如下
![](https://gis.rchss.sinica.edu.tw/wp-content/uploads/2024/04/Dynamic_Flow_13-1024x679.png)
參考文件: