水文分析提取河网_基于图的河网段地理信息分析排序算法
水文分析提取河網(wǎng)
The topic of this article is the application of information technologies in environmental science, namely, in hydrology. Below is a description of the algorithm for ranking rivers and the plugin we implemented for the open-source geographic information system QGIS.
本文的主題是信息技術(shù)在環(huán)境科學(xué)(即水文學(xué))中的應(yīng)用。 以下是對河流進(jìn)行排名的算法的說明,以及我們?yōu)殚_源地理信息系統(tǒng)QGIS實(shí)現(xiàn)的插件。
An important aspect of hydrological surveys is not only the collection of information received from research expeditions and automatic devices but also the analysis of all the obtained data, including the use of GIS (geoinformation systems). However, exploration of the spatial structure of hydrological systems can be difficult due to a large amount of data. In such cases, we cannot do research without using additional tools that allow us to automate the process.
水文調(diào)查的一個(gè)重要方面不僅是收集從研究考察和自動(dòng)裝置獲得的信息,而且還包括對所有獲得的數(shù)據(jù)進(jìn)行分析,包括使用GIS(地理信息系統(tǒng))。 然而,由于大量的數(shù)據(jù),探索水文系統(tǒng)的空間結(jié)構(gòu)可能很困難。 在這種情況下,如果不使用允許我們使過程自動(dòng)化的其他工具,我們將無法進(jìn)行研究。
Visualization plays an important role when working with spatial data. Correct visual representation of the results of the analysis helps to better understand the structure of spatial objects and to know something new. For the image of rivers in classical cartography, the following method is used: rivers are represented as a solid line with a gradual thickening (depending on the number of tributaries that flow into the river) from the source to the mouth of the river. Moreover, segments of the river network often need to be ranked by the degree of distance from the source. This type of information is important not only for visualization, but also for a more complete perception of the data structure, its spatial distribution, and subsequent processing.
在處理空間數(shù)據(jù)時(shí),可視化起著重要作用。 分析結(jié)果的正確視覺表示有助于更好地了解空間對象的結(jié)構(gòu)并了解新知識。 對于經(jīng)典制圖中的河流圖像,使用以下方法:河流表示為一條實(shí)線,從源頭到河口逐漸增粗(取決于流入河流的支流的數(shù)量)。 此外,河網(wǎng)的各部分通常需要按距水源的距離程度進(jìn)行排序。 這類信息不僅對于可視化很重要,而且對于更完整地了解數(shù)據(jù)結(jié)構(gòu),其空間分布和后續(xù)處理也很重要。
The problem of ranking rivers can be illustrated as follows (Fig. 1):
河流排名問題可以說明如下(圖1):
Thus, each segment of the river needs to be mapped to a value that shows how many segments flow into this section.
因此,河流的每個(gè)部分都需要映射到一個(gè)值,該值顯示有多少部分流入該部分。
Modern GIS, such as ArcGIS or its open-source competitor QGIS, have tools for working with river networks. However, the river ranking tool requires a large number of additional auxiliary materials and, as it seems to us, unnecessary transformations. For example, for an existing GIS tool to start working with river networks you need to prepare a digital elevation model. A significant disadvantage, in addition to complex and multi-stage data preparation, is the inability to use already prepared vector layers with a river network for analysis, which limits the possibility of using digital bases from open sources (OpenStreetMap or Natural Earth).
諸如ArcGIS或其開源競爭對手QGIS之類的現(xiàn)代GIS具有用于河網(wǎng)的工具。 但是,河流排名工具需要大量其他輔助材料,并且在我們看來,這是不必要的改造。 例如,要使一個(gè)現(xiàn)有的GIS工具開始與河網(wǎng)一起工作,您需要準(zhǔn)備一個(gè)數(shù)字高程模型。 除復(fù)雜且多階段的數(shù)據(jù)準(zhǔn)備外,一個(gè)重要的缺點(diǎn)是無法將已經(jīng)準(zhǔn)備好的矢量層與河流網(wǎng)絡(luò)一起使用來進(jìn)行分析,這限制了使用來自開源(OpenStreetMap或Natural Earth)的數(shù)字基礎(chǔ)的可能性。
Of course, you can assign attribute values to segments without using algorithms, but this approach is no longer relevant if you need to rank the network with several thousand segments.
當(dāng)然,可以在不使用算法的情況下將屬性值分配給段,但是如果需要對具有數(shù)千個(gè)段的網(wǎng)絡(luò)進(jìn)行排名,則此方法不再適用。
We decided to automate this procedure by representing the river network as a graph and then applying graph traversal algorithms. To simplify the user’s work with the implemented algorithm, a plugin for the QGIS geoinformation system — “Lines Ranking” was written. The code is distributed freely and is available in the QGIS repository, as well as on GitHub.
我們決定通過將河流網(wǎng)絡(luò)表示為圖形然后應(yīng)用圖形遍歷算法來自動(dòng)化此過程。 為了簡化用戶使用已實(shí)現(xiàn)算法的工作,編寫了QGIS地理信息系統(tǒng)的插件“行排名”。 該代碼是免費(fèi)分發(fā)的,可以在QGIS存儲庫以及GitHub中獲得 。
Installation
安裝
The plugin requires QGIS version >= 3.14, as well as the following dependencies: python libraries — networkx, pandas.
該插件要求QGIS版本> = 3.14,以及以下依賴項(xiàng):python庫-networkx,pandas。
For Linux:
對于Linux:
$ locate pip3
$找到pip3
$ cd <your system pip3 path from previous step>
$ cd <上一步中的系統(tǒng)pip3路徑>
$ pip3 install pandas
$ pip3安裝熊貓
$ pip3 install networkx
$ pip3安裝networkx
For Windows:
對于Windows:
In command line OSGeo4W:
在命令行OSGeo4W中:
$ pip install pandas
$ pip安裝熊貓
$ pip install networkx
$ pip安裝networkx
Using
使用
Input data is a vector layer consisting of objects with a linear geometry type (Line, MultiLine). Custom attributes are stored in the input layer to the output layer.
輸入數(shù)據(jù)是一個(gè)矢量層,由具有線性幾何類型(線,多線)的對象組成。 定制屬性存儲在輸入層到輸出層中。
We do not recommend using a field named “fid” for the input layer. At the stage of connecting gaps in the river network, using the built — in module of the GRASS package- v.clean where this field name is the “system” one.
我們不建議在輸入層使用名為“ fid”的字段。 在連接河網(wǎng)中的差距的階段,使用GRASS軟件包v.clean的內(nèi)置模塊,此字段名稱為“系統(tǒng)”。
Also, an obligatory input parameter is a point (Start Point Coordinates) that determines the position of the mouth of the river network. It can be set from the map, from a file, or from a layer uploaded to QGIS. The position of the river mouth can be approximate. The calculation is based on the segment of the river network closest to the point (the closing vertex of the future graph).
同樣,強(qiáng)制性輸入?yún)?shù)是確定河網(wǎng)口位置的點(diǎn)(起點(diǎn)坐標(biāo))。 可以從地圖,文件或上傳到QGIS的圖層中進(jìn)行設(shè)置。 河口的位置可以近似。 該計(jì)算基于最接近該點(diǎn)(未來圖形的閉合頂點(diǎn))的河網(wǎng)段。
Optional input data:
可選輸入數(shù)據(jù):
- the threshold for “tightening” gaps in the river network (Spline Threshold). This operation involves the use of a package of GRASS for QGIS. If the specified package is missing, you should fix the gaps in another way and leave this field empty; 縮小河網(wǎng)差距的閾值(樣條閾值)。 此操作涉及將GRASS軟件包用于QGIS。 如果缺少指定的程序包,則應(yīng)以其他方式解決差距,并將此字段留空;
- custom field names for the output layer. Allows the user to assign a field name to record the rank of each segment (Rank fieldname), the number of tributaries (Flow field name), and the distance from the mouth in meters (Distance field name). If parameters are not set , the default names of the fields are Rank, Value, and Distance; 輸出層的自定義字段名稱。 允許用戶分配一個(gè)字段名稱,以記錄每個(gè)段的等級(等級字段名稱),支流數(shù)量(流字段名稱)以及到嘴的距離(以米為單位)(距離字段名稱)。 如果未設(shè)置參數(shù),則字段的默認(rèn)名稱為Rank,Value和Distance;默認(rèn)值為0。
- location of the output file. If this parameter is omitted, a temporary layer will be created and added to the QGIS layer stack; 輸出文件的位置。 如果省略此參數(shù),將創(chuàng)建一個(gè)臨時(shí)層并將其添加到QGIS層堆棧中。
We can define the task performed by the algorithm as follows: compare the total number of tributaries flowing into each segment of the river, calculate the number of tributaries for each segment, as well as the distance of the farthest point of the segment from the mouth.
我們可以定義算法執(zhí)行的任務(wù),如下所示:比較流入河流各段的支流總數(shù),計(jì)算各段支流的數(shù)量,以及該段最遠(yuǎn)點(diǎn)到河口的距離。
算法說明 (Algorithm description)
In GIS, data can be presented in two main formats: raster and vector. A raster is a matrix where a certain parameter value is stored in each pixel. Satellite images, reanalysis grids, various output layers from climate models, and others are often represented in raster format in environmental science. Vector data is represented as simple geometric objects, such as points, lines, and polygons. Each object in a vector format can be associated with some information in the form of attributes. All the actions described below will be performed on the vector layer of the river network.
在GIS中,數(shù)據(jù)可以兩種主要格式表示:柵格和矢量。 柵格是一個(gè)矩陣,其中某個(gè)參數(shù)值存儲在每個(gè)像素中。 衛(wèi)星圖像,重新分析網(wǎng)格,氣候模型的各種輸出層等在環(huán)境科學(xué)中通常以柵格格式表示。 矢量數(shù)據(jù)表示為簡單的幾何對象,例如點(diǎn),線和多邊形。 向量格式的每個(gè)對象都可以與屬性形式的某些信息相關(guān)聯(lián)。 下面描述的所有動(dòng)作將在河網(wǎng)的矢量層上執(zhí)行。
As a result, the algorithm returns a vector layer in which each object is assigned attributes that determine the distance of segments from the river mouth and the total number of tributaries that flow into this segment.
結(jié)果,該算法返回一個(gè)向量層,在該向量層中為每個(gè)對象分配了屬性,這些屬性確定了各段距河口的距離以及流入該段的支流的總數(shù)。
Preprocessing input data
預(yù)處理輸入數(shù)據(jù)
Note that the topology of the original vector layer may be corrupted. The reason for this may be export / import between different GIS, incorrect file creation, etc. Corrupted layer topology can be expressed in the absence of connections between objects, i.e. the formation of various breaks (Fig. 2), creating additional closures, intersections, etc.
請注意,原始矢量層的拓?fù)淇赡芤褤p壞。 造成這種情況的原因可能是在不同的GIS之間進(jìn)行導(dǎo)出/導(dǎo)入,文件創(chuàng)建不正確等。在對象之間沒有連接的情況下,也可以表示損壞的層拓?fù)?#xff0c;即形成各種中斷(圖2),從而創(chuàng)建其他閉合,交叉點(diǎn)等
Figure 2. Corrupted topology of vector objects圖2.矢量對象的損壞的拓?fù)?Therefore, the first stage of preprocessing is to correct the topology of objects: “tighten” the nodes, make the original vector layer consistent. To do this, use the tools from the data analysis panel in QGIS — “Fix geometries” (fixgeometries built-in) and v.clean (from the GRASS package).
因此,預(yù)處理的第一步是糾正對象的拓?fù)?#xff1a;“擰緊”節(jié)點(diǎn),使原始矢量層保持一致。 為此,請使用QGIS中數(shù)據(jù)分析面板中的工具-“修復(fù)幾何”(內(nèi)置的固定幾何)和v.clean(來自GRASS軟件包)。
After the topology is fixed, the layer is divided into segments at the points where the lines have intersections. The result after splitting is illustrated below (Fig. 3).
固定拓?fù)浜?#xff0c;在直線相交的點(diǎn)將圖層分為幾部分。 拆分后的結(jié)果如下圖所示(圖3)。
Figure 3. Split linear objects into segments圖3.將線性對象分割成段Thus, using the “splitwithlines” tool in QGIS, we divide the source layer into segments.
因此,使用QGIS中的“ splitwithlines”工具,我們將源層劃分為多個(gè)段。
For each segment, we use QGIS to calculate the length and enter data in the attribute table of the layer (Fig. 4). the segment Length is calculated according to the user settings of the project (Project -> Properties -> General -> Ellipsoid).
對于每個(gè)段,我們使用QGIS計(jì)算長度并將數(shù)據(jù)輸入到圖層的屬性表中(圖4)。 段長度是根據(jù)項(xiàng)目的用戶設(shè)置(項(xiàng)目->屬性->常規(guī)->橢圓形)計(jì)算的。
Figure 4. Calculating the length of segments圖4.計(jì)算段的長度After that, using the “l(fā)ine intersection” tool (built-in tool), we get a point vector layer, where information about segment intersections is set in the attribute table. This attribute table can be interpreted as an adjacency list.
之后,使用“線相交”工具(內(nèi)置工具),獲得一個(gè)點(diǎn)矢量層,其中在屬性表中設(shè)置了有關(guān)線段相交的信息。 該屬性表可以解釋為鄰接表。
The preprocessing steps are shown in the following image (Fig. 5).
下圖顯示了預(yù)處理步驟(圖5)。
Figure 5. Steps for preprocessing a vector linear layer to represent it as a graph圖5.預(yù)處理矢量線性層以將其表示為圖形的步驟As a result of preprocessing, the graph is formed as a mathematical object of the networkx Python library. Thus, the river segments are vertices in the graph. If the segments are connected to each other (they have intersections), then there are edges between the graph vertices.
預(yù)處理的結(jié)果是,該圖被形成為networkx Python庫的數(shù)學(xué)對象。 因此,河段是圖中的頂點(diǎn)。 如果線段彼此連接(它們具有交點(diǎn)),則圖頂點(diǎn)之間將存在邊。
Algorithm for ranking linear objects
線性物體排序算法
After the graph is formed, we know which vertex to start the search from (the point where it flows from the main river into the lake or sea). Let’s call this vertex the closing one, since all other segments of the river network (vertexes) “flow” into it. We have divided the algorithm into several parts:
形成圖后,我們知道從哪個(gè)頂點(diǎn)開始搜索(從主要河流流入湖泊或海洋的點(diǎn))。 我們將此頂點(diǎn)稱為閉合頂點(diǎn),因?yàn)楹泳W(wǎng)的所有其他部分(頂點(diǎn))都“流入”其中。 我們將算法分為幾個(gè)部分:
Both stages are divided into several blocks, but the main idea is a two-stage scheme for assigning attributes.
這兩個(gè)階段都分為幾個(gè)塊,但是主要思想是分配屬性的兩階段方案。
The assignment of the attributes “rank” and “offspring”
屬性“等級”和“后代”的分配
The first stage of graph traversal is to rank vertexes by the degree of distance from the closing one. We planned to carry out the assignment of the attribute “rank” with iterative breadth-first search (BFS). Thus, starting from the closing vertex, we would move further and further away at each step, and at the same time, we would assign an attribute “rank”. But in this case, the following conflict may occur (animation below).
圖遍歷的第一階段是按距封閉頂點(diǎn)的距離程度對頂點(diǎn)進(jìn)行排名。 我們計(jì)劃使用迭代廣度優(yōu)先搜索(BFS)來分配屬性“等級”。 因此,從閉合頂點(diǎn)開始,我們將在每一步上走得越來越遠(yuǎn),同時(shí),我們將分配一個(gè)屬性“等級”。 但是在這種情況下,可能會(huì)發(fā)生以下沖突(以下動(dòng)畫)。
And what rank should we assign to this segment? There may be other problems with this attribute assignment algorithm, but we have listed one of the most vital.
我們應(yīng)該給這個(gè)細(xì)分市場分配什么等級? 此屬性分配算法可能還有其他問題,但我們列出了最重要的問題之一。
Suggested solution: we can determine the ranks for some part of the river network (the main river), and rank segments based on this information. This approach can be seen on the following picture (Fig. 6).
建議的解決方案:我們可以確定河網(wǎng)某些部分(主要河流)的等級,并根據(jù)此信息對路段進(jìn)行等級劃分。 在下面的圖片中可以看到這種方法(圖6)。
Figure 6. Conflict resolution by introducing a reference route in the graph圖6.通過在圖中引入?yún)⒖悸窂絹斫鉀Q沖突Thus, subgraphs can only join the reference route through 1 edge, and the other edges are excluded.
因此,子圖只能通過1條邊加入?yún)⒖悸窂?#xff0c;而其他邊則不包括在內(nèi)。
This raises the following problem : how can we find such a route? — We will assume that the shortest route between the two most distant vertices in the graph, one of which is the closing one, is the reference route (we will soon add an update so that the user can set this route if they have knowledge of which river is the main one, but in the absence of such information, the reference route is determined by this way). This route can be obtained using the A* (A-star) algorithm, but this algorithm works with a weighted graph, and there are no weights on the edges of our graph yet. But we can set weights for the edges of the graph based on the segment lengths (we calculated them earlier).
這引起了以下問題:我們?nèi)绾握业竭@樣的路線? —我們將假設(shè)圖中兩個(gè)最遠(yuǎn)頂點(diǎn)之間的最短路徑是參考路徑(其中一個(gè)是閉合頂點(diǎn))(我們將很快添加一個(gè)更新,以便用戶在了解以下情況時(shí)可以設(shè)置此路徑)哪條河流是主要河流,但是在沒有此類信息的情況下,參考路線是通過這種方式確定的。 可以使用A *(A-star)算法獲得此路線,但是該算法適用于加權(quán)圖,并且圖的邊緣上還沒有權(quán)重。 但是我們可以根據(jù)段的長度設(shè)置圖形邊緣的權(quán)重(我們之前已經(jīng)對其進(jìn)行了計(jì)算)。
- Assigning weights to the graph edges based on the lengths of segments. Simultaneously with this stage, one component is selected in the graph. The movement of the column is carried out using a breadth-first search. The assignment of weights can be demonstrated by the following figure (Fig. 7) 根據(jù)線段的長度為圖形邊緣分配權(quán)重。 在此階段的同時(shí),圖中選擇了一個(gè)組件。 使用廣度優(yōu)先搜索進(jìn)行列的移動(dòng)。 權(quán)重的分配可以通過下圖(圖7)進(jìn)行演示。
Thus, each vertex of the graph has the “l(fā)ength” attribute, which indicates the length of this segment of the river in meters. We also move attribute values from the graph vertices to the edges iteratively, starting to traverse the graph using BFS from the closing vertex.
因此,圖形的每個(gè)頂點(diǎn)都具有“長度”屬性,該屬性指示河流的這一段的長度(以米為單位)。 我們還將屬性值從圖頂點(diǎn)反復(fù)移動(dòng)到邊,開始使用BFS從封閉頂點(diǎn)遍歷圖。
This task is performed by the following function, where are
此任務(wù)由以下功能執(zhí)行,其中
- G — graph G —圖
- start — the vertex from which to start traversal start —從其開始遍歷的頂點(diǎn)
- dataframe — pandas dataframe with 2 columns: id_field (segment/vertex ID) and ‘length’ (the length of this segment) 數(shù)據(jù)框—具有2列的熊貓數(shù)據(jù)框:id_field(段/頂點(diǎn)ID)和“ length”(此段的長度)
- id_field — the field in the dataframe to use for mapping IDs to graph vertexes id_field —數(shù)據(jù)框中用于將ID映射到圖形頂點(diǎn)的字段
- main_id — index for the main river in the river network (default = None) main_id —河網(wǎng)中主要河流的索引(默認(rèn)=無)
- A* (A-star) search for the shortest path on a weighted graph between the closing vertex and one of the most distant vertices (a segment in the river network). This shortest route between the two most distant vertices in the graph is called “reference route”; A *(A星)在權(quán)重圖上的最接近頂點(diǎn)和最遠(yuǎn)頂點(diǎn)之一(河網(wǎng)中的一段)之間的最短路徑上搜索。 圖中兩個(gè)最遠(yuǎn)頂點(diǎn)之間的最短路徑稱為“參考路徑”;
- Ranking by distance of all vertexes in the reference route. Vertex, from where we start the traversal, the value is assigned rank 1, the next vertex is 2, then — 3, etc. 按參考路徑中所有頂點(diǎn)的距離排序。 頂點(diǎn),從此處開始遍歷,將值指定為等級1,下一個(gè)頂點(diǎn)為2,然后為3,依此類推。
- Iterative traversal of a graph with the beginning at the vertices of the reference route with isolation of the considered subgraphs. If one of the graph branches already has a connection to the vertices of the reference route, the edges that link the subgraph to other reference vertices are removed. 在參考路徑的頂點(diǎn)處開始且沒有考慮的子圖分離的情況下,迭代遍歷圖。 如果圖形分支之一已經(jīng)與參考路徑的頂點(diǎn)建立了連接,則將子圖鏈接到其他參考頂點(diǎn)的邊將被刪除。
You can see the source code here
您可以在此處查看源代碼
- G — graph G —圖
- start — the vertex from which to start traversal start —從其開始遍歷的頂點(diǎn)
- last_vertex — one of the farthest vertices from the closing one in the graph last_vertex-距離圖中結(jié)束點(diǎn)最遠(yuǎn)的頂點(diǎn)之一
You can see a demonstration of the described algorithm in the animation below.
您可以在下面的動(dòng)畫中看到所描述算法的演示。
Thus, the reference route can be considered as the main river in the river network, when all other segments are tributaries to the main one.
因此,當(dāng)所有其他路段均是主要路段的支流時(shí),參考路線可被視為河網(wǎng)中的主要河段。
Moreover, this approach allows you to achieve good results when ranking rivers in “difficult” places, such as the mouth, where some branches first depart from the main river, and then, gaining new tributaries, flow into the main river again.
此外,當(dāng)在“困難”的地方(例如河口)對河流進(jìn)行排名時(shí),這種方法可以使您獲得良好的效果,在這些地方,一些分支首先從主要河流中流出,然后獲得新的支流,再次流入主要河流。
Assigning the “value” and “distance” attributes
分配“值”和“距離”屬性
So, on the graph, all vertices are assigned the values of the “rank” and “offspring” attributes.
因此,在圖形上,所有頂點(diǎn)都被分配了“等級”和“后代”屬性的值。
If the vertex has no offspring, it means that no tributaries flow into this segment of the river network. Therefore, this vertex must be assigned the value “value” — 1. Then, for each node that has descendants (the rank of the descendants is always 1 less than the rank of the considering vertex) with the value “value” equal to 1, we need to count the number of descendants. The sum of “value” of all descendants of the considering vertex — the “ value” for considering vertex. Then, this procedure is repeated for other ranks.
如果頂點(diǎn)沒有后代,則意味著沒有支流流入河網(wǎng)的這一部分。 因此,必須為該頂點(diǎn)分配值“值” -1。然后,對于每個(gè)具有后代的節(jié)點(diǎn)(后代的等級始終比考慮的頂點(diǎn)的等級小1),其值“值”等于1 ,我們需要計(jì)算后代的數(shù)量。 考慮頂點(diǎn)的所有后代的“值”之和-考慮頂點(diǎn)的“值”。 然后,對其他等級重復(fù)此過程。
Thus, we iteratively move to the closing vertex.
因此,我們迭代地移至封閉頂點(diǎn)。
At the same time as assigning the “value” attribute to the graph vertices, the “distance” attribute is assigned, which characterizes the distance of segments from the mouth not by the number of segments that must be overcome to reach the closing one, but by the distance in meters that will need to be overcome to reach the river mouth.
在將“值”屬性分配給圖形頂點(diǎn)的同時(shí),還分配了“距離”屬性,該屬性表示段到嘴的距離不是通過達(dá)到閉合點(diǎn)必須克服的段數(shù)來表征的,而是到達(dá)河口需要克服的距離(以米為單位)。
The result of using the algorithm can be seen in figure 8. the Distance of river network segments is shown based on the “rank” attribute and the total number of tributaries is shown based on the “value” attribute.
使用該算法的結(jié)果如圖8所示。河網(wǎng)段的距離基于“等級”屬性顯示,支流總數(shù)基于“值”屬性顯示。
Figure 8. Results of using the algorithm (OpenStreetMap data, the Distance of river network segments is shown based on the “rank” attribute, the Total number of flowing tributaries is shown based on the “value” attribute”)圖8.使用該算法的結(jié)果(OpenStreetMap數(shù)據(jù),基于“ rank”屬性顯示了河網(wǎng)段的距離,基于“ value”屬性顯示了支流的總數(shù))結(jié)論 (Conclusion)
As you can see, the presented algorithm allows you to rank rivers without using additional information, such as digital elevation model. The obligatory input parameter, except for the main layer of the river network, is the position of the closing segment (where the river flows into the sea or lake), which can be specified as a point.
如您所見,該算法可以讓您對河流進(jìn)行排名,而無需使用其他信息,例如數(shù)字高程模型。 除河網(wǎng)的主層外,強(qiáng)制性輸入?yún)?shù)是閉合線段的位置(河流流入大海或湖泊的位置),可以指定為一個(gè)點(diǎn)。
Thus, with the minimum amount of required input data, it is possible to obtain structured derived information that characterizes the elements of the river basin using the implemented algorithm.
因此,利用最少的所需輸入數(shù)據(jù)量,可以使用所實(shí)現(xiàn)的算法來獲得表征流域要素的結(jié)構(gòu)化派生信息。
An open implementation of the algorithm in Python, as well as a plugin for QGIS, can be used by anyone. All processing is carried out by one thread, the user does not need to run all the functions separately.
任何人都可以使用Python中算法的開放式實(shí)現(xiàn)以及QGIS插件。 所有處理均由一個(gè)線程執(zhí)行,用戶無需單獨(dú)運(yùn)行所有功能。
We are glad to answer your questions and see your comments.
我們很高興回答您的問題并查看您的評論。
Repository with the code:
帶有代碼的存儲庫:
https://github.com/ChrisLisbon/QGIS_LinesRankingPlugin
https://github.com/ChrisLisbon/QGIS_LinesRankingPlugin
Feel free to contact us by e-mail:
隨時(shí)通過電子郵件與我們聯(lián)系:
mik_sar@mail.ru
mik_sar@mail.ru
翻譯自: https://medium.com/swlh/the-algorithm-for-ranking-the-segments-of-the-river-network-for-geographic-information-analysis-b25cffb0d167
水文分析提取河網(wǎng)
總結(jié)
以上是生活随笔為你收集整理的水文分析提取河网_基于图的河网段地理信息分析排序算法的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 队列的链式存储结构及其实现_了解队列数据
- 下一篇: 女的做梦梦到蛇是什么意思