A Distributed Approach to Fast Map Overlay

Similar documents
Vicinities for Spatial Data Processing: a Statistical Approach to Algorithm Design

ADAPTIVE GRIDS FOR GEOMETRIC OPERATIONS

Page 1. Area-Subdivision Algorithms z-buffer Algorithm List Priority Algorithms BSP (Binary Space Partitioning Tree) Scan-line Algorithms

Proceedings of the 5th WSEAS International Conference on Telecommunications and Informatics, Istanbul, Turkey, May 27-29, 2006 (pp )

Computer Graphics. Bing-Yu Chen National Taiwan University The University of Tokyo

Determining Differences between Two Sets of Polygons

Smallest Intersecting Circle for a Set of Polygons

Motion Planning. O Rourke, Chapter 8

Spatial Data Structures

Approximation Algorithms for Geometric Intersection Graphs

Computational Geometry

Ray Tracing Acceleration Data Structures

Spatial Data Structures

Geometric Algorithms. Geometric search: overview. 1D Range Search. 1D Range Search Implementations

Computer Graphics. Bing-Yu Chen National Taiwan University

Line segment intersection. Family of intersection problems

Egemen Tanin, Tahsin M. Kurc, Cevdet Aykanat, Bulent Ozguc. Abstract. Direct Volume Rendering (DVR) is a powerful technique for

Polygon Partitioning. Lecture03

Intersection Acceleration

Geometric and Thematic Integration of Spatial Data into Maps

layers in a raster model

Algorithms for GIS:! Quadtrees

January 10-12, NIT Surathkal Introduction to Graph and Geometric Algorithms

Anti-aliased and accelerated ray tracing. University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell

Computational Geometry

Finite-Resolution Simplicial Complexes

Simulation in Computer Graphics Space Subdivision. Matthias Teschner

Spatial data structures in 2D

4. Conclusion. 5. Acknowledgment. 6. References

Computational Geometry. Algorithm Design (10) Computational Geometry. Convex Hull. Areas in Computational Geometry

Computer Graphics. The Two-Dimensional Viewing. Somsak Walairacht, Computer Engineering, KMITL

Purpose: To explore the raster grid and vector map element concepts in GIS.

CSG obj. oper3. obj1 obj2 obj3. obj5. obj4

COMPUTER GRAPHICS COURSE. Rendering Pipelines

Collision Detection based on Spatial Partitioning

Homework 1: Implicit Surfaces, Collision Detection, & Volumetric Data Structures. Loop Subdivision. Loop Subdivision. Questions/Comments?

Ray Casting of Trimmed NURBS Surfaces on the GPU

Multidimensional Data and Modelling - DBMS

Using Convex Differences in Hierarchical Representations of Polygonal Maps

Multidimensional Data and Modelling

Clipping. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015

Anti-aliased and accelerated ray tracing. University of Texas at Austin CS384G - Computer Graphics

Hierarchical Representation of 2-D Shapes using Convex Polygons: a Contour-Based Approach

Spatial Data Structures

Spatial Data Management

Extending Rectangle Join Algorithms for Rectilinear Polygons

2D Spline Curves. CS 4620 Lecture 18

A non-self-intersection Douglas-Peucker Algorithm

Solid Modeling. Thomas Funkhouser Princeton University C0S 426, Fall Represent solid interiors of objects

The Unified Segment Tree and its Application to the Rectangle Intersection Problem

An Efficient Visual Hull Computation Algorithm

Connected Components of Underlying Graphs of Halving Lines

Analytical and Computer Cartography Winter Lecture 11: Generalization and Structure-to-Structure Transformations

Spatial Data Structures

CONSISTENT LINE SIMPLIFICATION BASED ON CONSTRAINT POINTS

Introduction to Algorithms October 12, 2005 Massachusetts Institute of Technology Professors Erik D. Demaine and Charles E. Leiserson Quiz 1.

Computer Graphics II

An Introduction to Spatial Databases

[8] that this cannot happen on the projective plane (cf. also [2]) and the results of Robertson, Seymour, and Thomas [5] on linkless embeddings of gra

3D Modeling: Solid Models

SOME 024: Computer Aided Design. E. Rozos

Identifying those parts of a scene that are visible from a chosen viewing position, and only process (scan convert) those parts

K-structure, Separating Chain, Gap Tree, and Layered DAG

Motion Planning Using Approximate Cell Decomposition Method

INFOGR Computer Graphics. J. Bikker - April-July Lecture 11: Acceleration. Welcome!

VIII. Visibility algorithms (II)

Mathematical Approaches for Collision Detection in Fundamental Game Objects

08 - Designing Approximating Curves

Chapter 11 Global Illumination. Part 1 Ray Tracing. Reading: Angel s Interactive Computer Graphics (6 th ed.) Sections 11.1, 11.2, 11.

Algorithms. Algorithms GEOMETRIC APPLICATIONS OF BSTS. 1d range search line segment intersection kd trees interval search trees rectangle intersection

4.0 DIGITIZATION, EDITING AND STRUCTURING OF MAP DATA

Algorithms. Algorithms GEOMETRIC APPLICATIONS OF BSTS. 1d range search line segment intersection kd trees interval search trees rectangle intersection

Subdivision Of Triangular Terrain Mesh Breckon, Chenney, Hobbs, Hoppe, Watts

Subdivision. Outline. Key Questions. Subdivision Surfaces. Advanced Computer Graphics (Spring 2013) Video: Geri s Game (outside link)

! Good algorithms also extend to higher dimensions. ! Curse of dimensionality. ! Range searching. ! Nearest neighbor.

Algorithms. Algorithms GEOMETRIC APPLICATIONS OF BSTS. 1d range search line segment intersection kd trees interval search trees rectangle intersection

CS337 INTRODUCTION TO COMPUTER GRAPHICS. Describing Shapes. Constructing Objects in Computer Graphics. Bin Sheng Representing Shape 9/20/16 1/15

Spatial Data Management

Multidimensional Indexing The R Tree

Data Organization and Processing

Quadstream. Algorithms for Multi-scale Polygon Generalization. Curran Kelleher December 5, 2012

Generalization of Spatial Data for Web Presentation

On Realistic Line Simplification under Area Measure

Werner Purgathofer

DEVELOPING A THREE-DIMENSIONAL TOPOLOGICAL DATA MODEL

Chapter 3. Sukhwinder Singh

Chapter 7 Spatial Operation

Theoretical Computer Science

Multidimensional (spatial) Data and Modelling (2)

CS123 INTRODUCTION TO COMPUTER GRAPHICS. Describing Shapes. Constructing Objects in Computer Graphics 1/15

Announcements. Written Assignment2 is out, due March 8 Graded Programming Assignment2 next Tuesday

Problem Set 6 Solutions

Visible Surface Detection Methods

Geometric Computation: Introduction

1 The range query problem

A Point in Non-Convex Polygon Location Problem Using the Polar Space Subdivision in E 2

Principles of Data Management. Lecture #14 (Spatial Data Management)

Polynomial Time Approximation Schemes for the Euclidean Traveling Salesman Problem

Spatial Data Structures

Polygon decomposition. Motivation: Art gallery problem

Transcription:

A Distributed Approach to Fast Map Overlay Peter Y. Wu Robert Morris University Abstract Map overlay is the core operation in many GIS applications. We briefly survey the different approaches, and describe a distributed algorithm for fast map overlay. To take advantage of parallel processing, we partition the object space of the map into rectangular grids. Since intersection points can only occur between edges sharing the same grid, the approach provides as easy way to divide up the work of determining intersection points into separable tasks. Analysis of the algorithm shows that the approach is not worst case optimal, but it gains performance by parallel processing, and when edge segment lengths are relatively uniform, experiments show that the average case performance is very good. The approach may also be generalized for spatial data handling on the internet where we can improve performance on scalable system architecture.

THE MAP OVERLAY PROBLEM Map overlay is the process of superimposing multiple maps into one in order to extract useful information. Traditionally, it was done manually on a tracing table, as illustrated in figure 1. With automated cartography, we do this on a computer. On the computer, a map refers to a 2D spatial data structure consisting of nodes, chains, and regions. A node is a point on the plane where two or more chains meet. A chain is a connected sequence of line segments beginning at a node and ending at a node. A chain must not intersect another chain or itself, except meeting at the beginning or ending nodes. The network of chains and nodes therefore partitions the 2D plane into regions. Each region is a connected subset of the 2D plane with polygonal boundaries. When we overlay two or more maps, the input maps are spatial superimposed to produce the output map. The nodes of the output map consist of the nodes of the input maps and the new nodes generated at the intersection points of the chains of the input maps. The chains of the input maps are split at these intersection points to become the chains of the output map. The network of chains and nodes of the output map also partitions the 2D plane into regions of the output map. Therefore, each region of the output map is the intersection of the regions of the input maps, one from each input map. Cartographic map overlay is the problem of producing the output map from the input maps, and relating the data structures in the output map (that is, nodes, chains, and regions) to those of the input maps. Figure 2 is a schematic illustration of the process of map overlay: we overlay maps A and B to produce map C. We have labeled the regions of the two input maps: those of map A: A1, A2, A3, and those of map B: B1, B2, B3. Since the chains of map A intersect with those of map B, the output map C consists of the nodes of input maps and the new nodes generated at the intersection points, and the chains of the input maps are split at these new nodes to produce the chains of map C. The regions of the output map C are labeled C1 thru C7. Each of these regions is the intersection of a region in map A and a region in map B. For example, C3 is the intersection of A3 and B1. BRIEF SURVEY OF MAP OVERLAY ALGORITHMS The detailed description of a complete solution to the cartographic map overlay problem was presented in (Wu and Franklin 1990). In the following, we sum up our solution into these four stages: (1) Determine the new nodes, at the intersection points of the input chains. (2) Form the new chains, by splitting the chains at the new nodes. (3) Form the new regions, and resolve containment of boundaries. (4) Determine the overlay relationship between the regions of the output map and those of the input maps. The difficult time limiting step is the first stage when we need to determine all the intersection points between the chains of the input maps. We must avoid the naïve approach of comparing every line segment against every line segment of another map, which leads to combinatorial explosion. We outline below a few geometric algorithms

for chain intersection to compare to our approach of creating and applying the notion of vicinity in space. In a simple scheme, we form a bounding box for each chain. Then if two bounding boxes do not overlap, the two chains have no intersection. But of course if the two bounding boxes do overlap, the two chains may or may not intersect, as illustrated in figure 3. We still have to examine every line segment in the two chains. The scheme of using the bounding boxes gives us a small improvement. Burton invented a scheme of subdividing a chain into sections at the tangent points so that each section is monotonically concave or convex, illustrated in figure 4. He called it the binary search polyline representation because each section will then support binary search into the line segments to determine any intersection points (Burton 1997). Little and Peucker described an algorithm to recursively sub-divide two chains to determine intersection points (Little and Peucker 1979). Instead of bounding box, the algorithm forms a bounding strip for a chain, and use it to clip the other chain, resulted in at least one shorter chain if there is any intersection, as illustrated in figure 5. These approaches focused primarily on quickly determining the intersection points for two chains. In cartographic map overlay, we need to process the input maps, each of which consists of many chains. To manage the use of memory in processing, White at the Harvard Graphics Laboratory devised a scheme called local processing (White 1978). The scheme first pre-sorts the input chains, and then maintains an open band of active chains to sweep across the whole map in the overlay process. That resulted in a very efficient process since it was actually the plane sweep algorithm in action. Nievergelt and Preparata formulated the algorithm, showing that by exploiting the total ordering property of real numbers in sorting, the algorithm achieves the time complexity of O(m log m + n log n + k) where m and n are the number of line segments in the two chains, and k the number of intersection points. The time complexity is also worst case optimal (Nievergelt and Preparata 1982). THE UNIFORM GRID A DISTRIBUTED APPROACH However, an optimal algorithm in the worst case does not necessarily perform well in average cases. We shall describe an approach completely different from the ones aforementioned, aiming at better average case performance. The core problem of map overlay is in determining the intersection points. We observe that when two chains intersect, they do so only between two component line segments in the same locality. To solve the problem efficiently, we should examine only the line segments which are in the same vicinity. To do that, we form a uniform rectangular grid over the 2D space partitioning it into grid cells. We then cast the line segments of the chains into the grid cells, marking the cells which each line segment occurs. Since the grid is uniform and rectangular, we need to examine each line segment exactly once to determine these grid cells. The process takes time linear to the number of line segments. Now as depicted in figure 6, we observe that the grid isolates cases of potentially intersecting line segments to only those that share some common grid cells. We can then

examine each grid cell for line segment intersections. We need to examine only those grid cells with line segments from different input maps, and only those edge segments marked for that grid cell. We would then have determined all the intersection points for all the new nodes of the output map, completing stage 1 of cartographic map overlay. We outline these steps in the following: (1) Set up the grid to partition the space. (2) Cast grid over the line segments in the chains of the input maps, determining which the grid cells occupied by each line segment. (3) Examine the grid cells which contain potentially intersecting line segments to determine the intersection points each grid holds an independent task to be scheduled to as many processors as available. We must be careful with the data structure for the grid: it is necessary to index each grid cell for direct access, and to compute the grid cells occupied by each line segment in a constant time operation so that step (2) above can be completed in time linear to the number of line segments. We opted to use a uniform rectangular grid, generating a unique name to identify each grid cell. We can then access each grid cell for the line segments by linear hashing. Using a Prolog style deductive database with a fact for each non-empty grid cell, we had a data structure so that the empty grid cells occupy no storage, and they incur no processing need when checking for potentially intersecting line segments (Wu and Franklin 1990). Franklin et al applied the approach in information system solution for both map data processing and VLSI design, and demonstrated efficiency improvement in average case performance measures (Franklin, et al 1990). They also discussed the interesting issue of varying grid cell dimensions for performance and ascertained the performance is relatively insensitive to the grid cell dimensions around the area of optimal performance. SUMMARY In the cartographic map overlay problem for vector maps, the main concern here is the efficiency in determining new intersection points of the input line segments. The key observation in our approach to solution is that we should examine only those line segments which are in the same vicinity. We design a grid to be cast over the object space, partitioning it into artificial neighborhoods, so that we can easily gather for each line segment what other line segments are also in the same vicinity. These are the potentially intersecting line segments contained in a grid cell to be examined for new intersection points. Since each grid represents an independent problem to be solved by the same algorithm to examine the edge segments contained in that grid cell, the problem in each grid can be scheduled to as many processors as available. The grid is a uniform rectangular grid so that we can effectively determine those line segments sharing some common grid cells time linear to the number of non-empty grid cells. The grid is therefore the design artifact which enables us to spatially distribute the polyline intersection problems in the 2D space for the cartographic map overlay problem.

REFERENCES Burton, W. (1997). Representation of many-sided polygons and polygonal lines for rapid processing, Communications of the ACM 20 (3) 166-171. Franklin, W.R., Chandrasekhar, Kankanhalli, Akman and Wu (1990). Efficient geometric operations for CAD, Geometric Modeling for Product Engineering, Wozny, (eds et al), Elsevier Science (North Holland), 46-55. Little, J.J. and Peucker, T.K. (1979). A recursive procedure for finding the intersection of two digital curves, Computer Graphics and Image Processing 10 (2) 159-171. Nievergelt, J. and Preparata,F.P. (1982). Plan-sweep algorithms for intersecting geometric figures, Communications of the ACM 25 (10) 739-747. White, Denis (1978). A new method of polygon overlay, Proceedings of Advanced Study Symposium on Topological Data Structures for Geographic Information Systems, Vol.1, Harvard University Press, Cambridge, Massachusetts. Wu, Peter Y. and Franklin,W.R. (1990) A logic programming approach to cartographic map overlay, Computational Intelligence 6 (2), 61-70.

Figure 1. Cartographic map overlay by tracing on a light table. output map: light table

Figure 2. Schematic illustration of the overlay process. Overlay of map A and map B to produce map C. map A A1 map B A2 A3 B1 B2 B3 C1 C2 C3 C4 C7 C5 C6 map C

Figure 3. Detection of polyline intersection using the bounding box. Two chains may or may not intersect when the bounding rectangles do.

Figure 4. Binary Search Polyline Intersection (BSPR). Subdivision of chains at the tangent points to support binary search in each segment.

Figure 5. Recursive mutual sub-division for polyline intersection. An intersection point will also be within the section bound by the strip.

Figure 6. A uniform rectangular grid in the 2D space for chain intersection. When two chains intersect, they do so between two line segments in the same locality.