Ebook Computing in geographic information systems: Part 2 presents the following content: Chapter 7: computational geometry and its application to GIS; chapter 8: spatial interpolation techniques; chapter 9: spatial statistical methods; chapter 10: an introduction to bathymetry; chapter 11: spatial analysis of bathymetric data and sea GIS; chapter 12: measurements and analys is Using GIS; chapter 13: appendix A; chapter 14: appendix B; chapter 15: glossary of GIS terms. Please refer to the documentation for more details.
Trang 1con-Computational geometry emerged as a field of research three decades ago.Since this area has been identified, a number of core geometric problems haveemerged A number of computational geometric algorithms have been designed
to solve these problems These algorithms are optimized for their tion time and memory Research in computational geometry is progressing tocompute large volumes of geometric data and degenerate data Therefore therobust versions of these algorithms have been devised for processing the degen-erate spatial data often encountered by GIS These algorithms are importantfor many applications, of great generality and applicability
computa-7.1 Introduction
Many of the problems that arise in application areas such as computer ics, computer-aided design and manufacturing, robotics, GIS, computer vision,human-computer interface, astronomy, computational fluid dynamics, molec-ular biology etc can be described using discrete geometrical structures Theseproblems can be solved using a set of algorithms known as computationalgeometric algorithms However it should be remembered that not all the geo-
graph-119
Trang 2120 Computing in Geographic Information Systemsmetric applications can be modelled using the discrete geometric structures orsolved using computational geometric algorithms For example, problems incomputer vision and computer graphics to some extent are not modelled on theEuclidean plane, but using a matrix of digitized locations of pixels Problems
in computer-aided manufacturing often involve curved surfaces rather thanpolyhedral surfaces Problems in fluid dynamics are generally of a continuousnature defined by differential equations Thus, computational geometry as it
is commonly defined is not quite broad enough to address all problems in allthese areas However, the field is broad enough such that virtually all of theseapplication areas can use some of the algorithms in computational geometry
A good introduction to computational geometry along with the algorithmsand data structures has been compiled by Preparata and Shamos in [49].The algorithms in computational geometry discussed in this chapter alongwith their applications to GIS in the context of processing spatial data per-taining to land, sea and air are listed below
1 Algorithms to determine line-line intersection
2 Algorithms to find whether a point lies inside a triangle, polygon,circle, or sphere
3 Algorithms for computing convex hull
4 Computing triangulation of a simple polygon in 2D
5 Computing Delaunay triangulation of a set of points in a plane
6 Computing the Voronoi tessellation of a set of points in a plane.These sets of algorithms are often called Computational Geometric Algo-rithmic Library (CGAL) The input to CGAL algorithms are typically a finitecollection of geometric elements such as points(locations associated with placenames in the map), lines or line segments (communication lines such as roads,rails, power transmission lines etc.), polygons (coverage of states within thegeographic boundary of a country, water bodies), polyhedrons, circles, spheres
in the Euclidean space
7.2 Definitions
7.2.1 Triangulation and Partitioning
Triangulation is a generic method for subdividing a complex domain into a joint collection of ‘simple’ objects A triangle is the simplest region into whichone can decompose a plane and this process is known as triangulation The
Trang 3dis-Computational Geometry and Its Application to GIS 121higher dimensional generalization of a triangle in 3D is a tetrahedron There-fore a 3D bounded volume can be decomposed to tetrahedrals Triangulation
or domain decomposition or tessellation is typically a first step performed innumber of algorithms These triangles are then subjected to computationaloperations through an iterative process to compute the objective and analyzethe overall domain
Triangulation ‘T ’ is tessellation of a polygonal region of the plane into overlapping, continuous triangles Ti such that, their intersection is empty, or
non-it is coincident wnon-ith a vertex, or an edge of both triangles
where, |ti| is the number of triangles in the domain Hence the domain of T
is the plane curved by its triangles In addition to the above definition, if thetriangulation of the domain is such that, the circumcircle of each trianglesdoes not contains any other points of the domain then it is called DelaunayTriangulation (DT) This is known as the empty circumcircle property of DT
7.2.2 Convex Hull
Perhaps the first problem in the field of computational geometry is the problem
of computing convex hulls, that is, the smallest convex shape that surrounds agiven set of objects In other words, it suffices to say that the convex hull can
be imagined as a stretched elastic membrane surrounding the objects whichsnap tightly around the objects It is an interesting problem both because ofits applications as an initial step towards solving other algorithms, and thenumber of interesting algorithmic approaches that have been devised to solvethis problem
Mathematically Convex Hull (CH) can be defined through the set theoreticoperations as follows
Let S be a set of discrete objects in 2D plane The set S is convex if
XS ∧ Y S ⇔ ¯XY S (7.2)Generally segment ¯xy is the set of points x, y of the form αx + βy = 1 and
α ≥ 0 and β ≥ 0
7.2.3 Voronoi Diagram and Delaunay Triangulation
Given a collection of points in space, perhaps the most important geometricdata structures for describing the relationships among these points and the
Trang 4122 Computing in Geographic Information Systemsrelationship of any points in space to these points are very well addressed
by structures of the Voronoi diagram and DT A number of important lems such as the notion of ‘proximity’ and ‘line of sight’ can be solved usingthese two structures These structures possess a number of beautiful mathe-matical properties that distinguish them as important geometric structures.Informally, the Voronoi diagram of a finite set of points in the plane is a sub-division of the plane into disjoint regions, one for each point The Voronoiregion of a point consists of the points in the plane for which this point is theclosest point of the set The dual graph of the Voronoi diagram is the Delaunaytriangulation Given a set P of M unique random points in an n-dimensionalspace, Let us define a region Di such that
prob-Di= {x : |x − pi| ≤ |x − Pj|, ∀(i, j)}
Then the collection of the subdivisions Di is defined as the Voronoi sellation or Dirichilet tessellation of the set of points P that satisfies theconstraint
7.3 Geometric Computational Techniques
The most important aspect of solving computational geometric problems islearning the design techniques needed in the creation of algorithms Some ofthe standard algorithm design techniques pursued in solving any problems
in computer science are divide-and-conquer, dynamic programming, greedytechnique etc These techniques work perfectly with alpha numeric data ordata where indexing and sorting can be carried out easily Spatial geometricdata often is associated with dimension and randomness Therefore prepro-cessing techniques have been developed to bring the spatial geometric data to
a representation where ordering and indexing can be applied Some of thesetechniques which are often treated as the pre-processing techniques in com-putational geometry are:
1 Plane Sweep
2-dimensional problems can be converted into a dynamic dimensional problem by sweeping an imaginary line across the placeand solving the problem incrementally as the line sweeps across Ingeneral, if you can solve a dynamic version of a (d-1)-dimensionalproblem efficiently, you can use that to solve a static d-dimensionalproblem using this technique A radial sweep line algorithm for con-struction of Triangular Irregular Network (TIN) has been developed
1-by Mirante et al [38] An Implementation of Watsons algorithm forcomputing 2D Delaunay triangulation is discussed in [46],[47]
Trang 5Computational Geometry and Its Application to GIS 123
2 Randomized incremental algorithms
One of the simplest techniques for the construction of geometricstructures is the technique of adding objects to the structure one
by one in some order [16] It turns out that for any data set theremay be particularly bad orders in which to insert things (leading
to inefficient running times), as well as particularly good orders(leading to efficient running times) It is difficult to know in advancewhat the proper insertion order of items should be, but it is truefor many problems that a random insertion order is efficient withhigh probability
7.4 Triangulation of Simple Polygons
The problem of triangulating polygons can be introduced by way of an ample in the field of combinatorial geometry Combinatorial geometry is thefield of mathematics that deals with counting problems in geometry Combi-natorial geometry and computational geometry are closely related, becausethe analysis and design of efficient geometric algorithms often depends on aknowledge of how many times or how many things can arise in an arbitrarygeometric configuration of a given size
ex-A polygonal curve is a finite sequence of line segments, called edgesjoined end to end The endpoints of the edges are vertices For example,let v0, v1, , vn denote the set of n+1 vertices, and let e0, e1, , en−1 denote
a sequence of n edges, where ei = vivi+1 A polygonal curve is closed if thelast endpoint equals the first vn= v0 A polygonal curve is simple if it is notself-intersecting More precisely this means that each edge ei does not inter-sect any other edge, except for the endpoints it shares with its adjacent edges(Figure 7.1)
The famous Jordan curve theorem states that every simple closed planecurve divides the place into two regions i.e the interior and the exterior re-gions Although the theorem seems intuitively obvious, it is quite difficult toprove, and many erroneous proofs were announced before Jordan finally pro-duced a correct proof A polygon can be defined as the region of the planebounded by a simple, closed polygonal curve The term simple polygon is alsooften used to emphasize the simplicity of the polygonal curve
Trang 6124 Computing in Geographic Information Systems
7.4.1 Theory of Polygon Triangulation
Before getting to discussion of algorithms for polygon triangulation, it is tinent to establish some basic facts about polygons and triangulations Thesefacts may seem obvious but one must look at them carefully when making ge-ometric arguments It is quite easy to draw pictures so that a fact appears to
per-be true but in fact the fact is false For example, many of the facts descriper-bedhere do not hold in 3D space
Lemma: Every polygon contains at least one strictly convex vertex (a tex whose interior angle is strictly less than π)
ver-Proof: Consider the lowest vertex v in P (i.e having the minimum coordinated) If there are more that one such vertices consider the rightmost.Consider a horizontal line L passing through v Clearly the vertices adjacent
Trang 7y-Computational Geometry and Its Application to GIS 125
n ≥ 4, the closed triangle avb contains at least one vertex of P Let L be theline through ab Imagine for concreteness that L is horizontal See Figure 7.2Move a line parallel to L through v upwards, and let x be the first vertexhit by this line within the triangle The portion of the triangle swept by theline is empty of the boundary of P , and so the segment xv is a diagonal.The above lemma does NOT hold for polyhedral in 3D or higher dimen-sions
Lemma: Every polygon with n vertices can be partitioned into triangles
by the addition of (zero or more) diagonals
Proof: The proof is by induction on n If n = 3 then the polygon is atriangle and we are done If not, then by the previous lemma we can find
a diagonal The addition of this diagonal partitions the polygons, each withfewer vertices than the original By the induction hypothesis, we can partitionthese into triangles
Lemma: The number of diagonals in the triangulation of a n vertex gon is n-3 The number of triangles is n-2
Trang 8poly-126 Computing in Geographic Information Systems
FIGURE 7.3
Dual graph triangulation
Proof: Because the addition of each diagonal breaks the polygon into two,one with k vertices (k ≥ 3) and the other with nk + 2 vertices (the extra 2are because the two vertices on the diagonal are shared by both parts), thefollowing recurrence relation holds
in the specified range
An immediate corollary to the above proof is that the sum of internal gles is (n − 2)π, because each triangle contributes π to the sum, and the sum
an-of triangle angles is the sum an-of interior angles
7.4.2 Dual Tree
A graph can be created in which each vertex of the graph is a triangle of thetriangulation, and two vertices in this graph are adjacent if and only if thetwo triangles share a common diagonal Such a graph is called the dual graph
of the triangulation An important property of the dual graph is the following
Trang 9Computational Geometry and Its Application to GIS 127Lemma: The dual of a triangulation of a simple polygon is a tree (i.e aconnected, acyclic graph) of degree at most 3.
Proof: The fact that the degree is at most 3 is a simple consequence ofthe fact that a triangle can have at most 3 diagonals It is easy to see thatthe graph is connected, because the interior of the polygon is connected Tosee that there are no cycles, imagine to the contrary that there was a cycle.From this cycle in the dual graph, one can construct a closed path in theinterior of the polygon Either side of this path contains at least one vertex
of the polygon Since each vertex of the polygon is on the boundary of thepolygon, this path separates the exterior of the polygon into two disconnectedregions However, by the Jordan curve theorem, the exterior of the polygon is
a connected region
Define an ear to be a triangle of the triangulation that has two edges onthe boundary of the polygon, and the other edge is a diagonal An interesting(and important) fact about polygon triangulations is the following:
Lemma: Every triangulation of a polygon with n ≥ 4 vertices has at least
2 ears
Proof: An ear is represented as a leaf in the dual tree Every polygonwith at least 4 vertices has at least 2 triangles, and hence at least 2 nodes inits dual tree It is well known that every (free) tree of at least 2 nodes has atleast 2 leaves
We cannot give the proof that the triangulation of every polygon can be 3coloured The proof is by induction If n = 3 then this easy If n ≥ 4, then cutoff an ear of the triangulation Inductively colour the remaining triangulationgraph Now restore the ear The ear shares two vertices in common with thecoloured polygon, and so these clolours are fixed We have exactly no choice forthe remaining vertex (Note that this not only implies that the triangulationgraph is 3 colourable, but up to a permutation of the colours, the colouring isunique.)
1-Unfortunately, there does not seem to be a corresponding natural notion
Trang 10128 Computing in Geographic Information Systems
of ordering for 2 and higher-dimensional data However, interestingly there isstill a notion of order type
Given two (1-dimensional) numbers, a and b, there are 3 possible ships, or order types, that can hold between them:
relation-a<b, a = b, a>b
This relation can be described as the sign of the quantity, ab More ally, in dimension 2, we can define the order type of three points, a, b, and cas:
gener-1 a, b, and c form a clockwise triple
2 a, b, and c are collinear
3 a, b, c form a counter clockwise triple
Similarly, for four points in dimension 3, we can define the order type ofthese points as: they form a left-handed screw, they are coplanar, or they form
a right-handed screw Interestingly, all of these order-relations fall out from
a single determinant of the points represented These can be illustrated forpairs a and b in 1-space, triples a, b, and c in the plane, and quadruples a, b, cand d in 3 space The coordinates of a point a are denoted (a0, a1, a2, , ad−1)
Ord(a, b) =
a0 1
b0 1
ord(a, b, c) =
a0 a11
b0 b11
c0 c11
...
Point insertion
Trang 28146 Computing in Geographic Information SystemsInsert(p)
{
Find... class="text_page_counter">Trang 20
138 Computing in Geographic Information Systems
FIGURE 7.9
QuickHulls initial quadrilateral
points that lie... closest pointfrom some point at infinity.)
7.8 Delaunay Triangulation
Observe in Figure 7. 12 that if points are in general position, and in particular,
if no four points