The fundamental types of geometric objects implemented by Shapely are points, curves, and surfaces. Each is associated with three sets of (possibly infinite) points in the plane. The interior, boundary, and exterior sets of a feature are mutually exclusive and their union coincides with the entire plane [2].
Shapely实现的几何对象的基本类型是点、线和面。每一种都与平面上的三组(可能是无限的)点相关联。一个要素的内部、边界和外部集合是相互独立的,它们的并集与整个平面重合。
- A Point has an interior set of exactly one point, a boundary set of exactly no points, and an exterior set of all other points. A Point has a topological dimension of 0.
- A Curve has an interior set consisting of the infinitely many points along its length (imagine a Point dragged in space), a boundary set consisting of its two end points, and an exterior set of all other points. A Curve has a topological dimension of 1.
- A Surface has an interior set consisting of the infinitely many points within (imagine a Curve dragged in space to cover an area), a boundary set consisting of one or more Curves, and an exterior set of all other points including those within holes that might exist in the surface. A Surface has a topological dimension of 2.
- 点的内部有一个点,边界没有点,点的外部包括其他所有点。点的拓扑维度为0。
- 曲线由沿其长度方向的无限多的点组成(想象一个在空间中拖动的点)组成一个内部集合,,一个由其两个端点组成的边界集合,以及一个由所有其他点组成的外部集合。曲线的拓扑维度为1。
- 曲面有一个由无限多的点组成的内部集合(想象一条曲线在空间中被拖动以覆盖一个区域),一个由一条或多条曲线组成的边界集合,以及一个由所有其他点组成的外部集合,包括那些可能存在于曲面上的洞。曲面的拓扑维度是2。
That may seem a bit esoteric, but will help clarify the meanings of Shapely’s spatial predicates, and it’s as deep into theory as this manual will go. Consequences of point-set theory, including some that manifest themselves as “gotchas”, for different classes will be discussed later in this manual.
这似乎有点深奥,但将有助于澄清Shapely的空间谓词的含义,这也是本手册所要深入的理论。点集理论的后果,包括一些表现为 “陷阱 “的后果,对于不同的类别,将在本手册的后面讨论。
The point type is implemented by a Point class; curve by the LineString and LinearRing classes; and surface by a Polygon class. Shapely implements no smooth (i.e. having continuous tangents) curves. All curves must be approximated by linear splines. All rounded patches must be approximated by regions bounded by linear splines.
点由Point(点)类实现;曲线由LineString(直线)和LinearRing(环线)类实现;曲面由Polygon(多边形)类实现。Shapely不包含平滑的(即有连续的切线)曲线,所有曲线都必须用线性样条曲线来近似表示。所有圆形斑块都必须由线性样条约束的区域来近似。
Collections of points are implemented by a MultiPoint class, collections of curves by a MultiLineString class, and collections of surfaces by a MultiPolygon class. These collections aren’t computationally significant, but are useful for modeling certain kinds of features. A Y-shaped line feature, for example, is well modeled as a whole by a MultiLineString.
点的集合由MultiPoint类实现,曲线的集合由MultiLineString类实现,曲面的集合由MultiPolygon类实现。这些集合在计算上并不重要,但对于某些类型的特征建模是很有用的。例如,一个Y形的线状特征,可以通过MultiLineString来很好地进行整体建模。
The standard data model has additional constraints specific to certain types of geometric objects that will be discussed in following sections of this manual.
标准数据模型对某些类型的几何对象有额外的约束,这些约束将在本手册的以下章节讨论。
See also https://web.archive.org/web/20160719195511/http://www.vividsolutions.com/jts/discussion.htm for more illustrations of this data model.
关于这种数据模型的更多说明,还请参见https://web.archive.org/web/20160719195511/http://www.vividsolutions.com/jts/discussion.htm。