- Practical GIS
- Gábor Farkas
- 533字
- 2021-07-02 22:49:13
Vector topology - the right way
More complex geometries have more theoretical possibilities, which leads to added complexity. Defining a point is unequivocal, that is, it has only one coordinate tuple. Multi-points and line strings are neither much more complex--they consist of individual and connected coordinate tuples respectively. Polygons, on the other hand, can contain holes, the holes can contain islands (fills), and theoretically, these structures can be nested infinitesimally. This structure adds a decent complexity for a GIS software. For example, QGIS only supports polygons to the first level--with holes.
The real complexity, however, only comes with topology. Different features in a layer can have relationships with each other. For example, in our administrative boundary layer, polygons should share borders. They shouldn't have gaps and overlaps. Another great example is a river network. Streams flow into rivers, rivers flow into water bodies. In a vector model, they should be connected like in the real world.
The topological geometry model (or vector model) is the sophisticated way to solve these kinds of relational problems. In this model, points are stored as nodes while other geometries form a hierarchical structure. Line segments contain references to nodes, line strings, and polygons consist of references to segments. By using this hierarchical structure, we can easily handle relationships. This way, if we change the position of a node, every geometry referring to the node changes. Take a look at the following screenshot:

Not every GIS software enforces a topological model. For example, in QGIS, we can toggle topological editing. Let's try it out by checking Enable topological editing in Settings | Snapping Options. If we edit the boundaries layer again, we can see the neighboring feature's geometry following our changes.
While QGIS does not enforce a topological model, it offers various tools for checking topological consistency. One of the tools is the built-in Topology Checker plugin. We can find the tool under the Add layer buttons.
If we activate the tool, a new panel appears docked under the Processing Toolbox. By clicking on Configure, we can add some topology rules to the opened vector layers. Let's add two simple rules to the administrative boundaries layer--they must not have gaps or overlaps. Consider the following screenshot:

The only thing left to do is to click on the Validate All or Validate Extent button. If we have some errors, we can navigate between them by clicking on the items one by one.
- HTML5+CSS3王者歸來
- Spring Boot 2實(shí)戰(zhàn)之旅
- 大學(xué)計(jì)算機(jī)應(yīng)用基礎(chǔ)實(shí)踐教程
- Effective C#:改善C#代碼的50個有效方法(原書第3版)
- arc42 by Example
- Java高手真經(jīng)(高級編程卷):Java Web高級開發(fā)技術(shù)
- Hands-On Natural Language Processing with Python
- Highcharts Cookbook
- Node.js全程實(shí)例
- jQuery Mobile移動應(yīng)用開發(fā)實(shí)戰(zhàn)(第3版)
- Getting Started with Eclipse Juno
- ArcGIS for Desktop Cookbook
- 零基礎(chǔ)學(xué)Scratch 3.0編程
- JQuery風(fēng)暴:完美用戶體驗(yàn)
- 高性能PHP 7