The geometry classes define a hierarchy as follows:几何图形类定义层次结构,如下所示:
Geometry (noninstantiable)(不可实例)
Point (instantiable)(可实例)
Curve (noninstantiable)(不可实例)
LineString (instantiable)(可实例)
Line
LinearRing
Surface (noninstantiable)(不可实例)
Polygon (instantiable)(可实例)
GeometryCollection (instantiable)(可实例)
MultiPoint (instantiable)(可实例)
MultiCurve (noninstantiable)(不可实例)
MultiLineString (instantiable)(可实例)
MultiSurface (noninstantiable)(不可实例)
MultiPolygon (instantiable)(可实例)
It is not possible to create objects in noninstantiable classes. 不可能在不可实例化的类中创建对象。It is possible to create objects in instantiable classes. 可以在可实例类中创建对象。All classes have properties, and instantiable classes may also have assertions (rules that define valid class instances).所有类都有属性,可实例化类也可能有断言(定义有效类实例的规则)。
Geometry is the base class. Geometry是基类。It is an abstract class. 它是一个抽象类。The instantiable subclasses of Geometry are restricted to zero-, one-, and two-dimensional geometric objects that exist in two-dimensional coordinate space. Gemoetry的可实例化子类仅限于存在于二维坐标空间中的零、一和二维几何对象。All instantiable geometry classes are defined so that valid instances of a geometry class are topologically closed (that is, all defined geometries include their boundary).定义所有可实例化的几何体类,以便几何体类的有效实例在拓扑上是闭合的(即,所有已定义的几何体都包括其边界)。
The base 基类Geometry class has subclasses for Point, Curve, Surface, and GeometryCollection:Geometry具有针对Point、Curve、Surface和GeometryCollection的子类:
Point represents zero-dimensional objects.Point表示零维对象。
Curve represents one-dimensional objects, and has subclass LineString, with sub-subclasses Line and LinearRing.Curve表示一维对象,具有子类LineString、子类Line和LinearRing。
Surface is designed for two-dimensional objects and has subclass Polygon.Surface是为二维对象设计的,具有子类Polygon。
GeometryCollection has specialized zero-, one-, and two-dimensional collection classes named MultiPoint, MultiLineString, and MultiPolygon for modeling geometries corresponding to collections of Points, LineStrings, and Polygons, respectively. GeometryCollection有专门的零维、一维和二维集合类,名为MultiPoint、MultiLineString和MultiPolygon,用于分别为对应于点、线串和多边形集合的几何体建模。MultiCurve and MultiSurface are introduced as abstract superclasses that generalize the collection interfaces to handle Curves and Surfaces.MultiCurve和MultiSurface作为抽象超类被引入,这些抽象超类概括了处理Curve和Surfaces的集合接口。
Geometry, Curve, Surface, MultiCurve, and MultiSurface are defined as noninstantiable classes. Geometry、Curve、Surface、MultiCurve和MultiSurface被定义为不可实例化的类。They define a common set of methods for their subclasses and are included for extensibility.它们为它们的子类定义了一组通用的方法,并包含在可扩展性中。
Point, LineString, Polygon, GeometryCollection, MultiPoint, MultiLineString, and MultiPolygon are instantiable classes.Point、LineString、Polygon、GeometryCollection、MultiPoint、MultiLineString和MultiPolygon是可实例化的类。