Top Banner
B.Sc. Matej Gomboši Determining differences between two sets of polygons Laboratory for Geometric Modelling and Multimedia Algorithms Faculty of Electrical Engineering and Computer Science University of Maribor www.uni-mb.si/~gemma
20

B.Sc. Matej Gomboši Determining differences between two sets of polygons Laboratory for Geometric Modelling and Multimedia Algorithms Faculty of Electrical.

Jan 13, 2016

Download

Documents

Arron Robertson
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: B.Sc. Matej Gomboši Determining differences between two sets of polygons Laboratory for Geometric Modelling and Multimedia Algorithms Faculty of Electrical.

B.Sc. Matej Gomboši

Determining differences between two sets of polygons

Determining differences between two sets of polygons

Laboratory for Geometric Modelling and Multimedia Algorithms

Faculty of Electrical Engineering

and Computer Science

University of Maribor

www.uni-mb.si/~gemma

Page 2: B.Sc. Matej Gomboši Determining differences between two sets of polygons Laboratory for Geometric Modelling and Multimedia Algorithms Faculty of Electrical.

IntroductionIntroduction

Parcel records on paper - cadastre Computer supported cadastre Database changes Keeping database up-to-date Finding and analyzing changes Working with changes in geometry and attributes Lack of appropriate commercial solutions (ESRI, ArcView) Integrated solution for GIS environments

Page 3: B.Sc. Matej Gomboši Determining differences between two sets of polygons Laboratory for Geometric Modelling and Multimedia Algorithms Faculty of Electrical.

IntroductionIntroduction

Difference ?

Page 4: B.Sc. Matej Gomboši Determining differences between two sets of polygons Laboratory for Geometric Modelling and Multimedia Algorithms Faculty of Electrical.

FormulationFormulation

1. Let P be a polygon made up of vertices v1, v2, ..., vn and edges e1, e2, ..., en connecting them.

2. Let S be a set of polygons P1, P2, ..., Pn. Each Pi can have arbitrary shape and number of vertices.

3. Find a set of polygons D, which represents the difference between S1 and S2. D contains changed polygons P1, P2, ..., Pm, which belong to S1 or S2.

Page 5: B.Sc. Matej Gomboši Determining differences between two sets of polygons Laboratory for Geometric Modelling and Multimedia Algorithms Faculty of Electrical.

StrategiesStrategies

Brute force approach Localized search approch Speed and stability considerations Separate aplications for different problems (need for

integration)

Page 6: B.Sc. Matej Gomboši Determining differences between two sets of polygons Laboratory for Geometric Modelling and Multimedia Algorithms Faculty of Electrical.

Basic ideaBasic idea

Comparison of S1 and S2

based on polygon edges Removing equal edges What remains represents

changes Analyzing remaining edges

Page 7: B.Sc. Matej Gomboši Determining differences between two sets of polygons Laboratory for Geometric Modelling and Multimedia Algorithms Faculty of Electrical.

Polygon• Sets of polygons from ESRI files (SHP)

• Organized data structures in memory

• Edge as main object

“Work table”• Uniform plane subdivision

• Binary search tree in cells

• Sorted edges

Edge• p1,p2

• Polygon info

• Hole info

Data objectsData objects

Page 8: B.Sc. Matej Gomboši Determining differences between two sets of polygons Laboratory for Geometric Modelling and Multimedia Algorithms Faculty of Electrical.

“Work table”“Work table”

• binary search tree in each cell• pointers to tree roots

Page 9: B.Sc. Matej Gomboši Determining differences between two sets of polygons Laboratory for Geometric Modelling and Multimedia Algorithms Faculty of Electrical.

Polygon edge information

Polygon edge information

1. Coordinates - p1(x1,y1), p2(x2,y2)

2. Polygon info

polygon index

set indicator (S1 or S2)

index of the surrounding polygon

• Counter

• Hole info

hole index (locally inside a polygon)

Page 10: B.Sc. Matej Gomboši Determining differences between two sets of polygons Laboratory for Geometric Modelling and Multimedia Algorithms Faculty of Electrical.

Edge clasification

Edge clasification

O uter border edge

Interio r edge

1

12

Counter values!

Page 11: B.Sc. Matej Gomboši Determining differences between two sets of polygons Laboratory for Geometric Modelling and Multimedia Algorithms Faculty of Electrical.

1. Acquiring polygon sets from ESRI database

2. Inserting edges into uniform plane subdivison

3. Updating already existing edges

4. Removing of equal edges

5. Analyzing remaining edges

6. Storing changes

AlgorithmAlgorithm

Page 12: B.Sc. Matej Gomboši Determining differences between two sets of polygons Laboratory for Geometric Modelling and Multimedia Algorithms Faculty of Electrical.

Finding differences (1)

Finding differences (1)

Page 13: B.Sc. Matej Gomboši Determining differences between two sets of polygons Laboratory for Geometric Modelling and Multimedia Algorithms Faculty of Electrical.

Finding differences (1)

Finding differences (1)

Page 14: B.Sc. Matej Gomboši Determining differences between two sets of polygons Laboratory for Geometric Modelling and Multimedia Algorithms Faculty of Electrical.

Finding differences (2)Finding differences (2)

Page 15: B.Sc. Matej Gomboši Determining differences between two sets of polygons Laboratory for Geometric Modelling and Multimedia Algorithms Faculty of Electrical.

Finding differences (2)Finding differences (2)

Page 16: B.Sc. Matej Gomboši Determining differences between two sets of polygons Laboratory for Geometric Modelling and Multimedia Algorithms Faculty of Electrical.

Problems at comparing attributesProblems at comparing attributes

Non-simple polygon

Contains regular(green) and non-regular(gray) holes

Finding correct polygon index to compare attributes

Page 17: B.Sc. Matej Gomboši Determining differences between two sets of polygons Laboratory for Geometric Modelling and Multimedia Algorithms Faculty of Electrical.

Arithmetic problems Arithmetic problems

Possible errors of overlaping edges

Measuring error (+/- 12cm) Epsilon tolerance at comparing

the vertices

Page 18: B.Sc. Matej Gomboši Determining differences between two sets of polygons Laboratory for Geometric Modelling and Multimedia Algorithms Faculty of Electrical.

Time complexityTime complexity

1. Inserting edgesO(n*log m)n – total num. of edgesm – average num. of edges in a cell

2. Analyzing changesO(n*log m)n – number of cellsm - average num. of edges in a cell

Page 19: B.Sc. Matej Gomboši Determining differences between two sets of polygons Laboratory for Geometric Modelling and Multimedia Algorithms Faculty of Electrical.

Practical resultsPractical results

20.000 edges8.000 polygons1.000 changes

5 seconds with database access

Page 20: B.Sc. Matej Gomboši Determining differences between two sets of polygons Laboratory for Geometric Modelling and Multimedia Algorithms Faculty of Electrical.

ConclusionsConclusions

• New efficient algorithm for specific geometric problem• Works on large sets of polygons as found in GIS application• Simple implementation• Efficient use of known speed-up techniques • Easy integration into other GIS environments (dll)• Robust (no problems with geometric boundary cases)• Succesfully used in practice