7. 拓扑学

GentleLogo

目标:

了解矢量数据中的拓扑

关键词:

矢量、拓扑、拓扑规则、拓扑错误、搜索半径、捕捉距离、简单要素

7.1. 概述

Topology 表示在GIS中连接或相邻的矢量要素(点、多段线和多边形)之间的空间关系。拓扑或基于拓扑的数据对于检测和纠正数字化错误(例如,道路向量层中不完全在交叉点处相交的两条线)很有用。拓扑是执行某些类型的空间分析(例如网络分析)所必需的。

Imagine you travel to London. On a sightseeing tour you plan to visit St. Paul's Cathedral first and in the afternoon Covent Garden Market for some souvenirs. Looking at the Underground map of London (see 图 7.2) you have to find connecting trains to get from Covent Garden to St. Paul's. This requires topological information (data) about where it is possible to change trains. Looking at a map of the underground, the topological relationships are illustrated by circles that show connectivity.

../../_images/london_underground.png

图 7.2 伦敦地铁网络的拓扑结构。

7.2. 拓扑错误

There are different types of topological errors and they can be grouped according to whether the vector feature types are polygons or polylines. Topological errors with polygon features can include unclosed polygons, gaps between polygon borders or overlapping polygon borders. A common topological error with polyline features is that they do not meet perfectly at a point (node). This type of error is called an undershoot if a gap exists between the lines, and an overshoot if a line ends beyond the line it should connect to (see 图 7.3).

../../_images/topology_errors.png

图 7.3 当本应相互连接的数字化矢量线不完全接触时,就会出现未及点(1)。如果一条线的终点超出了它应该连接到的线,就会发生过冲(2)。当两个多边形的顶点在其边界上不匹配时,就会出现碎屑(3)。

过冲和欠冲误差的结果是在行尾出现所谓的“悬挂节点”。在特殊情况下,悬挂节点是可以接受的,例如,如果它们附着在死胡同上。

拓扑错误会中断要素之间的关系。需要修复这些错误,以便能够使用网络分析(例如,找到穿越公路网的最佳路线)或测量(例如,找出河流长度)等程序来分析矢量数据。除了拓扑对网络分析和测量有用之外,创建或拥有具有正确拓扑的矢量数据也很重要和有用,还有其他原因。想象一下,你数字化了你所在省份的市政边界地图,而这些多边形会重叠或显示碎片。如果存在此类错误,您将能够使用测量工具,但您得到的结果将是不正确的。你将不知道任何一个城市的正确区域,你也不能准确地定义这些城市之间的边界。

不仅对您自己的分析创建并具有拓扑正确的数据很重要,而且对您向其传递数据的人也很重要。他们会期待您的数据和分析结果是正确的!

7.3. 拓扑规则

幸运的是,数字化矢量要素时可能发生的许多常见错误可以通过在许多GIS应用程序中实现的拓扑规则来防止。

除某些特殊的GIS数据格式外,默认情况下通常不强制使用拓扑。许多常见的地理信息系统(如QGIS)将拓扑定义为关系规则,并让用户选择要在矢量层中实现的规则(如果有的话)。

以下列表显示了可以为矢量地图中的真实要素定义拓扑规则的一些示例:

  • 直辖市地图的区域边缘不得重叠。

  • 市政地图的区域边缘不得有间隙(碎屑)。

  • 显示属性边界的多边形必须闭合。不允许在边界线上出现过冲或过冲现象。

  • 矢量线图层中的等高线不得相交(相互交叉)。

7.4. 拓扑工具

Many GIS applications provide tools for topological editing. For example in QGIS you can enable topological editing to improve editing and maintaining common boundaries in polygon layers. A GIS such as QGIS 'detects' a shared boundary in a polygon map so you only have to move the edge vertex of one polygon boundary and QGIS will ensure the updating of the other polygon boundaries as shown in 图 7.4 (1).

Another topological option allows you to prevent** polygon overlaps** during digitising (see 图 7.4 (2)). If you already have one polygon, it is possible with this option to digitise a second adjacent polygon so that both polygons overlap and QGIS then clips the second polygon to the common boundary.

../../_images/topological_tools.png

图 7.4 (1)拓扑编辑,用于在移动顶点时检测共享边界。移动顶点时,共享该顶点的所有要素都将更新。(2)为了避免多边形重叠,当一个新的多边形被数字化(以红色显示)时,它被裁剪以避免与相邻区域重叠。

7.5. 捕捉距离

Snapping distance is the distance a GIS uses to search for the closest vertex and / or segment you are trying to connect when you digitise. A segment is a straight line formed between two vertices in a polygon or polyline geometry. If you aren't within the snapping distance, a GIS such as QGIS will leave the vertex where you release the mouse button, instead of snapping it to an existing vertex and / or segment (see 图 7.5).

../../_images/snapping_distance.png

图 7.5 捕捉距离(黑色圆圈)以贴图单位(例如,十进制度数)定义,用于捕捉到顶点或线段。

7.6. 搜索半径

搜索半径是当您在地图上单击时,GIS用来搜索您尝试移动的最近折点的距离。如果您不在搜索半径内,则GIS不会查找并选择要编辑的要素的任何顶点。原则上,它与捕捉距离功能非常相似。

捕捉距离和搜索半径都是以贴图单位设置的,因此您可能需要尝试以正确设置距离值。如果指定的值太大,则GIS可能会捕捉到错误的顶点,尤其是在处理大量靠近的顶点时。如果您指定的搜索半径太小,则GIS应用程序将找不到任何要移动或编辑的要素或折点。

7.7. 需要注意的常见问题/事情

主要是为了简化和快速渲染而设计的,但不是为了需要拓扑的数据分析(例如通过网络查找路径),许多GIS应用程序能够同时显示拓扑和简单的要素数据,有些应用程序也可以同时创建、编辑和分析两者。

7.8. 我们学到了什么?

让我们总结一下我们在此工作表中介绍的内容:

  • Topology 显示相邻矢量要素的空间关系。

  • 地理信息系统中的拓扑由提供 topological tools

  • 拓扑图可用于 detect and correct digitizing errors

  • 对于某些工具,例如 network analysis ,拓扑数据是必不可少的。

  • Snapping distancesearch radius 帮助我们将拓扑正确的矢量数据数字化。

  • Simple feature 数据不是一种真正的拓扑数据格式,但它通常被GIS应用程序使用。

7.9. 现在你来试试吧!

以下是一些建议,可供您尝试与您的学习者:

  • 在地图上标出你当地的公交站点,然后让学生找出两个站点之间的最短路线。

  • 想一想如何在GIS中创建矢量要素来表示您所在城镇的拓扑道路网络。哪些拓扑规则是重要的,您的学习者可以在QGIS中使用哪些工具来确保新道路图层的拓扑正确?

7.10. 一些值得思考的事情

如果你没有可用的计算机,你可以使用公共汽车或铁路网的地图,并与学习者讨论空间关系和拓扑结构。

7.11. 进一步阅读

Books

  • 张康宗(2006)。地理信息系统概论。第三版。麦格劳·希尔。ISBN:0070658986

  • 迈克尔·N·德默斯(2005)。地理信息系统基础。第三版。威利。ISBN:9814126195

Websites

《QGIS用户手册》还提供了有关QGIS中提供的拓扑编辑的更多详细信息。

7.12. 下一步是什么?

在接下来的部分中,我们将更仔细地了解 Coordinate Reference Systems 为了理解我们如何将球形地球上的数据关联到平面地图上!