525 views

Uploaded by scribdwt

- computer.pdf
- A GIS System for Tourism Management
- hw1
- Govt Exam Previous Year Model Question Papers With Answer Key PDF 08
- APLIKASI SISTEM INFORMASI GEOGRAFIS UNTUK PERHITUNGAN KOEFISIEN ALIRAN PERMUKAAN
- Developing Thematic GIS Database Integrating Road Network Management System: A Review
- Computer Capsule
- How Fast is Our Data Growing
- Electro
- Apps1 - Part 1
- Computer Definitions
- 0420-NOS as Answers
- What Are the Differences Between Primary and Secondary Memory
- 360- Manning's Equation and 2D Flow Analogs- Published Version
- Java
- VBA-Files
- sgraup resume
- Apple patent Driver handheld computing device lock-out US 8706143 B1
- mcq-on-mis-2
- المصادر باللغة الانكليزية

You are on page 1of 50

5204 :

for GIS

Jörg-Rüdiger Sack

Ottawa, Canada K1S 5B6, sack@scs.carleton.ca

School of Computer Science Computational Aspects of GIS

Carleton University

Geometric Objects

A geometric object is an object which characterizes a

geometric component, i.e., the

• location and

• shape

of the object in space.

ignore for the discussion in this chapter.

School of Computer Science Computational Aspects of GIS

Carleton University

Example

Planar subdivisions for example are collections of polygons

which represent towns or municipality regions.

The geometric information about the location of the place is

stored through the polygon.

stored.)

School of Computer Science Computational Aspects of GIS

Carleton University

Operations

There are many operations that need to be carried out on

geometric objects, these include:

• point in polygon (point location)

• traversal of a subregion (window queries)

• intersection tests

• ….

• other operations include:

– distance, containment, intersection

School of Computer Science Computational Aspects of GIS

Carleton University

Operations cont’d

1. objects are stored on disc examining, i.e., retrieving all objects

is extremely inefficient!

the geometry may be complex.

filter, i.e., providing a superset of the solution set and

subsequently refine that set to the correct solution.

School of Computer Science Computational Aspects of GIS

Carleton University

Filter

Sometimes this approach is referred to as

coarse filter

fine filter

adjacent objects

followed by the fine filter which analyzes geometric

properties of the objects.

School of Computer Science Computational Aspects of GIS

Carleton University

The Idea of a Filter

Create a bounding box for 2-d geometric objects.

Bounding box: =

smallest axis parallel rectangle containing the geometric object

The database search key for the geometric object is now that of the

bounding box.

U = U1x U2 x U3 … x Ud is the d-dimensional universe containing all

geometric objects.

School of Computer Science Computational Aspects of GIS

Carleton University

Filter cont’d

G : be a particular set of geometric objects

g ε G described as:

– g.b d-dim bounding box

– g.rest other attributes that are not relevant for the search

g = (b, rest)

[l1, r1] x … x [ld, rd] where b.li : left and r.ri is the right interval

boundary of the ith interval.

we use: g. li for g.b. li and g. ri for g.b. ri

School of Computer Science Computational Aspects of GIS

Carleton University

Example

dim 2

r2

l2

dim 1

l1 r1

School of Computer Science Computational Aspects of GIS

Carleton University

The Task

Task: find a secondary storage structure S supporting the

following operations:

(1)Range query

(2) Search

(3) Insert

(4)Remove (delete)

School of Computer Science Computational Aspects of GIS

Carleton University

Rangequery

Rangequery (w, S(G))

range w, G is stored in S

report all objects g in G with g.b ∩ w ≠ Ø

do not intersect, i.e.,

intersection (A,B) := closure (interior of A ∩ interior of B)

School of Computer Science Computational Aspects of GIS

Carleton University

Rangequery cont’d

2

1 7

3 4

reports: 1, 6, 3, 5

School of Computer Science Computational Aspects of GIS

Carleton University

Search

Search (b, S(G))

report all objects g in G with g.b =b

School of Computer Science Computational Aspects of GIS

Carleton University

search - example

has bounding box

matching the query

box

g’

School of Computer Science Computational Aspects of GIS

Carleton University

Search

Insert (g, S(G))

School of Computer Science Computational Aspects of GIS

Carleton University

Remove (Delete)

Remove (Delete) (b, S(G))

S(G) := S(G \ {g}) remove g from G and store the result

School of Computer Science Computational Aspects of GIS

Carleton University

Comments

1. While uniqueness is somewhat the underlying assumption it does not

pose any serious implementation difficulties.

the key is spatial, but

the spatial location is not referenced

-> this can be handled by traditional secondary data structures such

as B-trees, dynamic hashing, …

e.g., map the 2d key components into one 1-dimensional key

(lexicographic)

School of Computer Science Computational Aspects of GIS

Carleton University

Comments

Thus searchers can be handled!

they are space relevant and the above storage schemes show

serious deficiencies

School of Computer Science Computational Aspects of GIS

Carleton University

Objective

Find data structure for geometric objects such as points,

polygons etc that allow efficient retrieval.

Primary concern:

When accessing data, long chains of pointers that are

crossing disk block boundaries must! be avoided.

– small internal memory access structure

– efficient dynamically updates

School of Computer Science Computational Aspects of GIS

Carleton University

Basic Concepts

Basic Concepts for spatial structures

personal computers have access times of 50 to 150 nanoseconds

(billionths of a second).

Fast hard disk drives for personal computers boast access times of about 9

to 15 milliseconds.

Note that this is about 200 times slower than average DRAM.

School of Computer Science Computational Aspects of GIS

Carleton University

Basic Concepts

Memory access time (seconds): 10-7 … 10-6

Disc access time (seconds): 10-2 … 10-1

School of Computer Science Computational Aspects of GIS

Carleton University

Basic Concepts

Memory : 10 … 102

Disc : 104 … 105

School of Computer Science Computational Aspects of GIS

Carleton University

Basic Concepts

The time for an operation is thus determined by the time to

retrieve the data + the time required to carry out the local

computation.

factor. However, there are geometric problems where also the

internal computations are costly.

School of Computer Science Computational Aspects of GIS

Carleton University

Objective

Find data structure for geometric objects such as points,

polygons etc that allow efficient retrieval.

Primary concern:

When accessing data, long chains of pointers that are

crossing disk block boundaries must! be avoided.

– small internal memory access structure

– efficient dynamically updates

School of Computer Science Computational Aspects of GIS

Carleton University

Proximity

Data on discs are seen to be organized in BLOCKS.

A block is a unit of data that is retrieved in one shot from a

disc.

algorithm and its execution,.

1. local maintenance of proximity; i.e, physically close in

space

2. global maintenance of proximity; objects stored in

adjacent blocks are physically close.

School of Computer Science Computational Aspects of GIS

Carleton University

Proximity

especially the last points is very difficult to obtain.

There is no perfect data organization!

Even small improvements in that, yield accelerations that are

noticeable.

School of Computer Science Computational Aspects of GIS

Carleton University

Central issue

Organizing the embedding space versus organizing its

content.

data and mostly those who are dependent on the space.

This is the key distinction between space and non-spatial data

structures.

School of Computer Science Computational Aspects of GIS

Carleton University

Non-spatial data structures

Data structures for non-spatial data any search structure that

you may have encountered for example: binary search tree.

•structures exist and are readily available also balanced

– AVL, 2-3 trees, red-black trees

median, percentiles,

School of Computer Science Computational Aspects of GIS

Carleton University

Non-spatial data structures

Such data structures are not designed for, nor can they

efficiently handle:

• general location queries

– nearest neighbour

– identify clusters in data

School of Computer Science Computational Aspects of GIS

Carleton University

Review of address computation schemes

1. Hashing

2. radix trees

3. tries

(course notes)

School of Computer Science Computational Aspects of GIS

Carleton University

k-d trees

k-d trees were invented by Bentley ’75

as generalizations of search trees i.e. comparative

Lueker 78, Lee&Wong ’77, Willard’78, Bentley’79,

Bentley and Maurer’80

School of Computer Science Computational Aspects of GIS

Carleton University

k-d trees

An example:

x : 50 dim 1

y : 15 y:4 dim 2

dim 3

…

dim d

dim 1

dim 2

School of Computer Science Computational Aspects of GIS

Carleton University

k-d trees

Problems:

• it is hard to balance these structures, i.e., get log

height

• 1-d is easy

• space partitioning created lacks regularity

• difficult neighbour queries

School of Computer Science Computational Aspects of GIS

Carleton University

First approaches

First approaches to spatial data structures

• based on the existing search structures

• data stored!

• not the space in which the data was embedded

School of Computer Science Computational Aspects of GIS

Carleton University

filter illustration for

a rectangular space partitioning

hit query

cells

query q

report all

objects that

intersect q

drop ignored

the oval is examined not retrieved

and then droped

School of Computer Science Computational Aspects of GIS

Carleton University

Comment

Spatial data structures cover the space with cells.

Each cell is stored on disc and therefore is associated with a

disc block or blocks.

School of Computer Science Computational Aspects of GIS

Carleton University

Three-phase model

Three steps:

1. Cell addressing

for a given query find all “cells” of the partitiong

that could contain elements relevant to query

2. Coarse filter

retrieve the elements found in Step 1 from disc

3. Fine Filter

examine the elements (Step 2) if they fit the query

School of Computer Science Computational Aspects of GIS

Carleton University

Tree-based schemes

Work has been done on the internal memory data structures:

segment trees and range trees

and how they can be extended external storage.

presentation.

School of Computer Science Computational Aspects of GIS

Carleton University

Three philosophies

1. Space driven:

1. multi-dimensional linear hashing,

2. space filling curves

3. ...

2. Data driven

1. k-d-B-trees

2. ….

3. Combinations

1. grid file and its variants

2. Bang file, ….

School of Computer Science Computational Aspects of GIS

Carleton University

Linear hashing

viewed as a spatial data structure

partition the 1-d data space into intervals

0 1

0 2 1 3

0 4 2 5 1 6 3 7

School of Computer Science Computational Aspects of GIS

Carleton University

doubling

Doubling is typically adding a bit to the front (or back) of the string

created thus far.

0 1 00 10 01 11

added

bit

this means that when you run out of space a piece of the same size is appended

resulting in a doubling of the space used.

However address calculations are simple!

School of Computer Science Computational Aspects of GIS

Carleton University

MOLPHE

Multidimensional Order Preserving Linear Hashing

2 3 2 5 3 7

0

0 1

0 1

0 4 1 6

Note the alternation of split in the dimensions. 1st split by x; 2nd split by y;

3rd split again by x-axis. Note also the each block is split.

School of Computer Science Computational Aspects of GIS

Carleton University

z-hashing

Dynamic z-hashing

1 3 2 3 6 7

0

0 1

0 2

0 1 4 5

The reason is that proximity is better maintained between adjacent blocks.

School of Computer Science Computational Aspects of GIS

Carleton University

space-filling curves

The above schemes define a traversal of the space.

Here we list other space filling curves that are typically used.

They have different properties and studies have been carried

out on them.

E.g., Peano, z-ordering and Hilbert

School of Computer Science Computational Aspects of GIS

Carleton University

space-filling curves

Hilbert

Z-order

G.M. Morton

School of Computer Science Computational Aspects of GIS

Carleton University

Z-order

z-order of

a point with

coordinate x,y

is obtain by

bit-wise

interleaving of

the x and y 25

bits.

Ex.:

y = 2 = 010

x = 5 = 101

25 = 0 1 1 0 0 1

School of Computer Science Computational Aspects of GIS

Carleton University

Z-order

z-order of

a point with

coordinate x,y

is obtain by

bit-wise

interleaving of

the x and y

bits.

range queries

are possible

slight care

needs to be

taken to find

successors of

point in z-

order

© Jörg-Rüdiger Sack Course Notes

School of Computer Science Computational Aspects of GIS

Carleton University

Hilbert curve: maping

range queries

more natural,

but successor

function more

difficult than

with z-ordering.

School of Computer Science Computational Aspects of GIS

Carleton University

Hilbert curve cont’d

direction in which

to draw the elements

of the Hilbnert curve

School of Computer Science Computational Aspects of GIS

Carleton University

Peano

School of Computer Science Computational Aspects of GIS

Carleton University

- computer.pdfUploaded bysarmad
- A GIS System for Tourism ManagementUploaded byDavid D'bayu
- hw1Uploaded byJaepil Byun
- Govt Exam Previous Year Model Question Papers With Answer Key PDF 08Uploaded bySayantan Banerjee
- APLIKASI SISTEM INFORMASI GEOGRAFIS UNTUK PERHITUNGAN KOEFISIEN ALIRAN PERMUKAANUploaded bygagenah
- Developing Thematic GIS Database Integrating Road Network Management System: A ReviewUploaded byIRJET Journal
- Computer CapsuleUploaded byshalakha20
- How Fast is Our Data GrowingUploaded bymohammad
- ElectroUploaded byMantox94
- Apps1 - Part 1Uploaded byPercival A Fernandez
- Computer DefinitionsUploaded byManas
- 0420-NOS as AnswersUploaded byTebello Ratau
- What Are the Differences Between Primary and Secondary MemoryUploaded byablaska
- 360- Manning's Equation and 2D Flow Analogs- Published VersionUploaded byRindu Trisna Widiastuti
- JavaUploaded byAyhan Adsiz
- VBA-FilesUploaded byOmar Riahi
- sgraup resumeUploaded byapi-245499419
- Apple patent Driver handheld computing device lock-out US 8706143 B1Uploaded bychris1315
- mcq-on-mis-2Uploaded byvasusaini
- المصادر باللغة الانكليزيةUploaded byAla Thajil
- t 024361955Uploaded byMakassar Dp
- ictlUploaded byHani Remeli
- Clean Shutdown User ManualUploaded byKumar Ram
- Target GeographicsUploaded byChuck Achberger
- Theme 2 HardwareUploaded by200840453
- multilevelarchstrorg-mips8086memory-110405082017-phpapp02Uploaded byThara Gireesh
- ICTL yearly planning 2012Uploaded byDatuk Khalil
- Manual of Sony Xperia JUploaded byHanspal Kahlon
- Test 2Uploaded byMiank Doomra
- Installing RAM instructionsUploaded byGerold_M

- Presentation HAVE April 2007Uploaded byscribdwt
- Standard Budget EnUploaded byscribdwt
- LicenseUploaded byanon-444297
- A USB MonitorUploaded byscribdwt
- EZilla GroupUploaded byscribdwt
- EZilla GroupUploaded byscribdwt
- ELG5191 Design of Distributed System Software ChapterUploaded byscribdwt
- ELG5191 Design of Distributed System Software ChapterUploaded byscribdwt
- Installation GuideUploaded byscribdwt
- Installation GuideUploaded byscribdwt
- QoS OTTAWA Seminaire v2Uploaded byscribdwt
- ELG5191 Design of Distributed System Software Chapter8 SOAP With AttachmentsUploaded byscribdwt
- Intern Finance Ch00 F2008Uploaded byscribdwt
- Web-Based Mapping of Real-Time GIS DataUploaded byscribdwt
- ADM3305 Final Exam ReviewUploaded byscribdwt
- QoS for IP (2)Uploaded byscribdwt
- Intern Finance Ch05 F2008Uploaded byscribdwt
- A 3Uploaded byscribdwt
- Search TreesUploaded byscribdwt
- Apache Wink User GuideUploaded byscribdwt
- ADM 2350 Winter 2009 Assign 1Uploaded byscribdwt
- Practice Quiz3Uploaded byscribdwt

- nlogn.pdfUploaded bymueramon
- Artificial Intelligence ProblemsUploaded byAnik
- Array Data Structure - GeeksforGeeksUploaded bySwathi Patibandla
- curs6siteUploaded byMarius_2010
- DA00-SUploaded byhaolk
- stackUploaded byMukesh Sharma
- Hash TableUploaded byShubhashree Seth
- AllUploaded byKhondoker Razzakul Haque
- Comparison of AlgorithmsUploaded byPalanati Durgaprasad
- Cs 180 Notes UCLAUploaded bynattaq12345
- A Review of Particle Swarm Optimization Feature Selection Classification and HybridizationsUploaded byEditor IJRITCC
- aspmtpUploaded byHitesh Soniwal
- CSM Final Review Part 2 (11%2F2)Uploaded byserige
- Asgn4 SolutionUploaded byafaflotfi_155696459
- A Comparative Study on Heuristic and Meta Heuristic Approach in Solving a Capacitated Vehicle Routing ProblemUploaded byInternational Journal of Innovative Science and Research Technology
- Large-Scale Machine Learning with Stochastic Gradient Descent.pdfUploaded byravigobi
- FMS layoutUploaded byHarish Shanmuganathan
- 8 Puzzle DocumentationUploaded byYona
- Dynamic ProgrammingUploaded byChaitanya Caprico
- Tata Letak Fasilitas Manufaktur.pptUploaded byIllyas Janu
- DAA QB 1.pdfUploaded bySruthy Sasi
- Leaky Bucket AlgorithmUploaded bySunny Dubey
- Longest Increasing Sub Sequence 2Uploaded byQingmei Yao
- An Introduction to Differential EvolutionUploaded bydimitrioschr
- Factor IzationUploaded bymaruf rahman
- CS 170 Lecture 20 HandoutUploaded bytehkronos
- SSCE-Shift-MultUploaded byDhinesh Dhamodar
- New Microsoft Office Word DocumentUploaded bySoumya Ranjan
- Algorithm ASSIGNMENT 1 Group 2Uploaded byJeff Mirondo Kibalya
- Placmnt AdviceUploaded bySri Badma