Top Banner
A more efficient map overlay method for Terralib Vinícius Lopes Rodrigues Marcus Vinícius Alvim Andrade Gilberto Ribeiro de Queiroz Mirella Antunes de Magalhães Universidade Federal de Viçosa Departamento de Informática
35

A more efficient map overlay method for Terralib

Jan 06, 2016

Download

Documents

LeAnn

Universidade Federal de Viçosa. Departamento de Informática. A more efficient map overlay method for Terralib. Vinícius Lopes Rodrigues Marcus Vinícius Alvim Andrade Gilberto Ribeiro de Queiroz Mirella Antunes de Magalhães. Introduction. TerraLib: A Component Library for GIS Development - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: A more efficient map overlay method for Terralib

A more efficient map overlay method for

Terralib

Vinícius Lopes RodriguesMarcus Vinícius Alvim Andrade

Gilberto Ribeiro de QueirozMirella Antunes de Magalhães

Universidade Federal de Viçosa

Departamento de Informática

Page 2: A more efficient map overlay method for Terralib

Introduction

TerraLib: A Component Library for GIS Development

Developed by: INPE, Tecgraf/PUC-Rio, FUNCATE Implementation of “Small GIS”

Page 3: A more efficient map overlay method for Terralib

TerralibTerralib has a geometric algorithms module

Used for manipulation of spatial dataContains all basic operations involving simple geometric forms (Points, Lines, Polygons)Spatial data are manipulated in a lower level

Page 4: A more efficient map overlay method for Terralib

Terralib

Terralib has also a functional module

This module uses basic geometric operations to build functions in a higher level

Page 5: A more efficient map overlay method for Terralib

Map Overlay

Description:Is used to combine the information of two mapsCalculates the geometrical overlay between map polygons and joins the non-spatial information of two maps

Page 6: A more efficient map overlay method for Terralib

Map OverlayExample:

Page 7: A more efficient map overlay method for Terralib

Terralib’s Polygon Overlay

Basic operation for map overlayComputes intersection, union or difference of two polygonsNamed TeOverlay – included in kernel of TerralibBased on Margalit and Knott’s algorithm

Page 8: A more efficient map overlay method for Terralib

Terralib’s Polygon Overlay

Page 9: A more efficient map overlay method for Terralib

The computation of the intersection points on the boundaries is essential to obtain the final resultThese points are used to determine the fragmentation of the boundaryThe generated fragments are grouped according to chosen operation

Terralib’s Polygon Overlay

Page 10: A more efficient map overlay method for Terralib

Terralib’s Map Overlay

Let M1 and M2 be two maps

Suppose that M1 has less polygons than M2

Page 11: A more efficient map overlay method for Terralib

a1a2

a3

b1

b2M1: blueM2: red

Page 12: A more efficient map overlay method for Terralib

Terralib’s Map Overlay

In Terralib, the original method proceeds as the following:

for each polygon bi in M1, a spatial query on the database is done, fetching all the polygons on the map M2 which bounding box intercepts the bi’s bounding box

Page 13: A more efficient map overlay method for Terralib

a1a2

a3

b1

b2

Page 14: A more efficient map overlay method for Terralib

Terralib’s Map Overlay

The operation TeOverlay is applied to determine the intersection between the polygon ai and all polygons returned by the query.

To execute the operation above, it is necessary to determine the intersection points between the borders of the polygons.

Page 15: A more efficient map overlay method for Terralib

a1a2

a3

b1

b2

Page 16: A more efficient map overlay method for Terralib
Page 17: A more efficient map overlay method for Terralib
Page 18: A more efficient map overlay method for Terralib
Page 19: A more efficient map overlay method for Terralib

Terralib’s Map Overlay

All the regions returned by the TeOverlay operation are stored in the resulting map

Each computed polygon has attributes from both the original polygons (maps)

Page 20: A more efficient map overlay method for Terralib
Page 21: A more efficient map overlay method for Terralib

Terralib’s Map Overlay

ConsiderationsThis operation proceeds many spatial queries on the database that implies a large execution time

The same polygon of the map M2 could be processed twice or more times

Page 22: A more efficient map overlay method for Terralib

An alternative map overlay

Developed to avoid the database queries

The intersection points are found based on the Bentley & Ottman’s plane sweep algorithm.

Page 23: A more efficient map overlay method for Terralib

The maps are full loaded from the database to build two segments sets.

So, the intersection algorithm is used to determine the intersection points between the segments of these two sets.

An alternative map overlay

Page 24: A more efficient map overlay method for Terralib

a1a2

a3

b1

b2

Page 25: A more efficient map overlay method for Terralib

After finding the intersection points, a matrix is built to store them.

In this matrix, the position ( i , j ) contains the intersection points between polygon bi from M1 and aj from M2

An alternative map overlay

Page 26: A more efficient map overlay method for Terralib

a1a2

a3

b1

b2a1 a2 a3

b2

b1

p1

p2p3 p4

p5

p6p7

p8

p1

p2

p3

p4

p5

p6

p7

p8

Page 27: A more efficient map overlay method for Terralib

An alternative map overlay

In this version, TeOverlay was modified to receive as parameter the intersection points previously calculated

For each position of the matrix where the list is not empty, the new version of TeOverlay is called with the respective polygons and their intersection points

Page 28: A more efficient map overlay method for Terralib
Page 29: A more efficient map overlay method for Terralib

An alternative map overlay

Special case: if a polygon a1 is “inside” another polygon b1. In this case, the list of intersection points is empty but the polygons intersection is not.To circumvent this case, the algorithm checks if the polygons bounding box intersect each other.If they intersect, only a point-polygon localization is needed

Page 30: A more efficient map overlay method for Terralib

Results Input Maps:

Number Map Number of Regions

Number of segments

M1 Cities MG 853 61237

M2 Cities MG (translated) 853 61237

M3 Temperature MG 20 4659

M4 Soil MG 3067 858696

M5 Cities Brasil 5560 571747

M6 Cities Brazil (translated) 5560 571747

Page 31: A more efficient map overlay method for Terralib

Results

M1M3

M4 M5

Page 32: A more efficient map overlay method for Terralib

Results

M1 x M2

M1 x M4

M1 x M3

M5 x M6

Page 33: A more efficient map overlay method for Terralib

Time Results

Results

Number Time (ms)

Overlay Intersections Output polygons

Terralib’s Alternative

M1 x M2 15382 3885 184516 25037

M1 x M3 3678 1323 21591 18626

M1 x M4 39317 7437 433884 172007

M5 x M6 110232 25657 1554776 307913

Page 34: A more efficient map overlay method for Terralib

Future Work

Implement a plane sweep based map overlay

Based on Kriegel’s algorithm

Does not require database queries and intersection points are determined as result regions are generated

Page 35: A more efficient map overlay method for Terralib

Questions

Vinícius Lopes

[email protected]

?????

???? ?

?????

??

? ?