+ All Categories
Home > Documents > Attribute Data

Attribute Data

Date post: 04-Jan-2016
Category:
Upload: wentworth-bruno
View: 17 times
Download: 0 times
Share this document with a friend
Description:
CampusID. Name. Type. Floors. Footprint. 6. Murphy. Academic. 2. 2001. 9. Hopkins. Support. 2. 946. 12. Maintenance. Support. 1. 1848. 15. Hickey. Support. 2. 2367. 17. Shay-Loughlen. Dorm. 3. 1298. Attribute Data. Why Databases?. - PowerPoint PPT Presentation
21
CS 128/ES 228 - Lecture 6 a 1 Attribute Data CampusID Name Type Floors Footprint 6 Murphy Academic 2 2001 9 Hopkins Support 2 946 12 Maintenance Support 1 1848 15 Hickey Support 2 2367 17 Shay-Loughlen Dorm 3 1298
Transcript
Page 1: Attribute Data

CS 128/ES 228 - Lecture 6a 1

Attribute Data

CampusID Name Type Floors Footprint

6 Murphy Academic 2 2001

9 Hopkins Support 2 946

12 Maintenance Support 1 1848

15 Hickey Support 2 2367

17 Shay-Loughlen Dorm 3 1298

Page 2: Attribute Data

CS 128/ES 228 - Lecture 6a 2

Why Databases?

One of the advantages of vector-based data is that each datum corresponds to a (portion) of a “real” object.

BUT… Objects are more than geographic locations

Page 3: Attribute Data

CS 128/ES 228 - Lecture 6a 3

Database “Review”

Databases consist of tables Each table holds records

Records are in rows Each record consists of fields, i.e.

individual data items Fields are in columns

Fields that have unique values within a table are called “keys”

CampusID Name Type Floors Footprint

6 Murphy Academic 2 2001

9 Hopkins Support 2 946

12 Maintenance Support 1 1848

15 Hickey Support 2 2367

17 Shay-Loughlen Dorm 3 1298

Page 4: Attribute Data

CS 128/ES 228 - Lecture 6a 4

Sequential Databases

Once upon a time, computer scientists tried to put all the data for an application in one table

It didn’t work

Page 5: Attribute Data

CS 128/ES 228 - Lecture 6a 5

Flaws of Sequential Databases

Not all data is homogeneous

Monolithic structure leads to contention problems

Separation of data into “sub” databases leads to duplication (and inconsistencies)

Page 6: Attribute Data

CS 128/ES 228 - Lecture 6a 6

Relational databases

Use many (related) tables of data, with minimal duplication

Tables are “linked” through common values in particular fields

“Queries” permit rich “data mining”

Page 7: Attribute Data

CS 128/ES 228 - Lecture 6a 7

What Color Hair Does Student 234 Have?

Mary

Dawn

Pete

Pat

117 Mary 3.8

201 Dave 2.5

234 Dawn 3.1

235 Pete 3.2

382 Ted 2.6

378 Jane 3.0

444 Ann 4.0

This is an example of a JOIN operation

Page 8: Attribute Data

CS 128/ES 228 - Lecture 6a 8

Relational Databases in GIS One table traditionally holds

geographic information Other tables hold data about other

attributes Tables are linked through “Object

Ids” (Object Ids should be independent of

the software)

Page 9: Attribute Data

CS 128/ES 228 - Lecture 6a 9

Relational Databases in GIS Consider a “Buildings” layer

“GIS” data includes location (including coordinate system), symbology, internal bookkeeping

“External” data includes name of building, date built, purpose, etc.

Page 10: Attribute Data

CS 128/ES 228 - Lecture 6a 10

Sometimes they are mixed

Page 11: Attribute Data

CS 128/ES 228 - Lecture 6a 11

Queries

Information is gained by linking tables through “joins”

Queries can involve computed quantities, etc.

Page 12: Attribute Data

CS 128/ES 228 - Lecture 6a 12

Storing Topology Shapefiles contain no topological

information

But topology is important

SOLUTION

Store the topology elsewhere

Page 13: Attribute Data

CS 128/ES 228 - Lecture 6a 13

Practicality

GIS must maintain topology (to be useful)

GIS can’t store topology (in shapefiles)

SO, GIS must compute topology

Page 14: Attribute Data

CS 128/ES 228 - Lecture 6a 14

Data Structure for Topology

1

98

76

4

5 3

2

10 AB

C

D

Zone 1

Zone 2

Bound.

A B 4

A C 5

B C 10

C D 8

Select Boundary Where Zone1=A

Ans: 4,5

Page 15: Attribute Data

CS 128/ES 228 - Lecture 6a 15

Topological Operations Merge two regions into one

A

BC

…and change the appropriate table

Page 16: Attribute Data

CS 128/ES 228 - Lecture 6a 16

Topological Operations Split one region into two

A BC

…and change the appropriate table

Page 17: Attribute Data

CS 128/ES 228 - Lecture 6a 17

Other Topological Operations Clip an image

Page 18: Attribute Data

CS 128/ES 228 - Lecture 6a 18

Topological Operations Erase an image

Page 19: Attribute Data

CS 128/ES 228 - Lecture 6a 19

Other operations

Union

Intersect

“Snaps”

Page 20: Attribute Data

CS 128/ES 228 - Lecture 6a 20

How this is used

Find nearest neighbor

Find largest “empty” region

Page 21: Attribute Data

CS 128/ES 228 - Lecture 6a 21

What distinguishes (some) GIS’s

The types of these operations that they can perform.

Both Database and Topological


Recommended