• No results found

Coordinates

In document DiplThesisJena07 (Page 60-64)

Coordinatesare auxiliary data types to describe the internal structure of primitives, aggregates and complexes. Seen by themselves, they do not represent a geometric object (i.e. a feature, a real world object), but form only part of it. Some of those support classes were explained above in the context of its usingGeometries. The missing types are explained below.

DirectPosition and Position. These classes represent the coordinates of a posi- tion in the Euclidean coordinate system. ADirectPositionholds the values of the ordinatesx,yand, if necessary, alsoz. A position holds either aDirectPositionor a Point. These classes are used by all geometric data types to describe positions.

Figure 5.3:Examples of envelopes

Envelope. An envelope of a geometric object is the smallest rectangle which con- tains the object. AnEnvelopeis internally represented by two points: the lower left corner of the rectangle and the upper right corner of the rectangle. Envelopes are used in many operations for approximated calculations such as in intersection tests. If the envelopes of two objects are disjoint, the objects are also disjoint. The minimal bounding region of a geometric object is a primitive representation of its envelope.

CurveSegment, LineString and LineSegment. Curves are composed by a list ofCurveSegments. EachCurveSegment represents a part of the curve and ends in the same coordinates in which the following curve segment starts. The FGAS defines several types of curve segments:ArcString,ArcStringByBulge,SplineCurve, Clothoid, GeodesicString, LineString and Conic. Most of them are curvilinear seg-

ments defined by mathematically functions (see figure 3.5 for examples). Curvi- linear curve segments are a considerable advantage over straight lines specified by the SFS, because they can represent real world objects more realistic. However, the implementation in this work is limited toLineStrings, which are a sequences of straightLineSegments. LineSegmentis a subclass ofLineStringand simply connects its two end points by a straight line. In practice, curvilinear real world objects can be well approximated by line strings if the segments are small enough.

A curve segment holds certain characteristics. The attribute numDerivates specifies the type of continuity between its neighboured segments at its end points. The curve interpolation attribute reflects the type of interpolation realized by the curve segment. As this implementation always uses LineStrings, the numDeriva- tives is always 0 and the curve interpolation islinear.

SurfacePatch and Triangles. Surfacesare formed bySurfacePatches. All surface patches agree in at least one common boundary edge with another surface patch within their surface. A special type of surface patches arePolygons.Polygonsform PolyhedralSurfaces, which are a subclass ofSurface. The data typeTriangleinherits fromPolygonand is defined by its three corners. It is used to formTriangulatedSur- faces(a direct subclass ofPolyhedralSurface) such as aTin.

PointArray and PointGrid. Many geometric objects within the FGAS use refer- ence points such as control points of a curve. The classes PointArray andPoint- Gridshould be used to store such sequences or grids. APointArrayis an ordered sequence ofPositions, whereas aPointGridis an ordered sequence ofPointArraysto represent a grid.

6 Spatial analysis operators

Next to the storage and visualisation of spatial data, its analysis is GIS’s main function. The analysis of spatial data is done with the use of operators for geo- metric problems. Geometric problems can be divided into two categories [Sch98]: Selective and Constructive problems. The first does not create new data; instead, it selects a subset of the input data as result data. The latter, however computes new data based on the input data. Thus, geometric operations can be divided into selective operations and constructive operations. Problems involving only elementary arithmetic operations (+,−,·and÷) are calledrational.

The discussions in this chapter are divided into geometric predicates (Section 6.2) and geometric operations. The latter is divided into relational Boolean opera- tors (Section 6.4), constructive set operations (Section 6.3) such as set intersection, union, etc., and constructive operations (Section 6.5) such as buffer calculation and convex hull.

6.1 Data Structure for the topological graph

Many operators, for instance set theoretic operations, need to store complex infor- mation such as the relationship between geometric objects and the relationship between parts of a geometric object within itself. Maps have a complex structure, for instance, at times maps can be divided into smaller regions calles subdivi- sions. Algorithms and their performance depend strongly on the data structure on which they operate. Hence, it is of vital importance to have a data structure which contains all necessary information about subdivisions and their relation- ships and allows for fast access to the information in order to avoid costly searches. A Doubly-Connected Edge List (DCEL)[PS85] describes a topological graph and contains a record of eachvertex,edgeandface. Figure 6.1 illustrates a planar graph in terms of a doubly-connected edge list. An edge is defined by two ver- tices. A closed set of edges surrounds a face. Each vertex stores its coordinates and

Figure 6.1:The Doubly-Connected Edge List

the edges which end in the vertex. Each edge stores the two vertices by which it is defined, the right and left sidefacesand usually the previous and following edges. Instead of normal edges, the list can use directed edges, in which case each direct edge will store its start point and itstwin(i.e. the directed edge which points in the opposite direction) (see illustration(b)), the following edge (the previous can be accessed through its twin) and the face to the left side (the face to the right side can be accessed through its twin). Examples of records within such an edge list can be found in [dBvKOS97].

With respect to the Feature Geometry Abstract Specification, the faces of a pla- nar subdivision are the polygons themselves. Therefore, a surface comprises only two faces: one representing the Interior of the surface and another equals to its Exterior (see illustration(c)). The Exterior is the region, by which the polygon is surrounded, and the region described by the hole within the polygon.

In document DiplThesisJena07 (Page 60-64)