[GIS算法] 2.1.2 维数扩展的9交集模型 空间关系的判定
上节说到:
1. 考虑对比两个几何体的内部和边界的交集–>【4交集模型】
2. 【4交集模型】,再考虑到输入几何体的外部–>得到【9交集模型】
3. 【9交集模型】,在维度上拓展–>得到【维数拓展的9交集模型】
维数扩展的9交集模型
【英文名】Dimensionally Extended nine-Intersection Model (DE-9IM)
【听小弟说来】就是两个几何体,它们两个人内部、边界、外部的两两交集(一共9个咯),画成一个矩形,就成3X3的矩阵的–>根据这个矩阵的特点,我们就可以很容易的得出两个几何体的拓扑关系
【约定】
-
函数dim(x):返回x中几何体的最大维数
- dim(∅)=-1:∅表示空集
- dim(点)=0
- dim(线)=1
- dim(面)=2
- I(a):a的内部
- B(a):a的边界
- E(a):a的外部
【上个图举个例】有了这个例子就很清楚了,不多解释了
数学最喜欢符号了,咱们用这个符号表示:
所以,这里有了(横着写):
最后,我们把这个东西,写成这样:{2,1,2,1,0,1,2,1,2}
【大佬们说】以上的这些步骤:模型矩阵由9种模式-值集合构成,一种集合对应矩阵一个单元,{2,1,2,1,0,1,2,1,2}
,这里的每一个值称之为【模式值p】
空间关系的判定
【约定】
模式值p:p有几种情况?p∈{T,F,*,0,1,2}
- p=T:dim(x)∈{0,1,2},即x≠∅(存在交集)
- p=F:dim(x)=-1,即x=∅(交集为∅)
- p=*:dim(x)∈{-1,0,1,2},即任何一种情况
- p=0:dim(x)=0,交集是点
- p=1:dim(x)=1,交集是线
- p=2:dim(x)=2,交集是面
这个p很重要,我们接下来讨论A,B是什么拓扑关系,就看这个p,9个p值什么情况,就是什么关系
看什么关系?对照这个表:
- P:零维的几何体(点、多点)
- L:一维的集合体(LineStrings、MultiLineStrings)
- A:二维的几何体(面和多面)
wiki百科相关资料
https://en.wikipedia.org/wiki/DE-9IM
【定义】The Dimensionally Extended nine-Intersection Model (DE-9IM) is a topological model and a standard used to describe the spatial relations of two regions (two geometries in two-dimensions, R2), in Geometry, Point-set topology, Geospatial topology, and fields related to computer spatial analysis. Since the spatial relations expressed by the model are topological they are invariant to rotation, translation and scaling transformations.
【dim(x)函数】
【关系判定】