Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 128/ES 228 - Lecture 6a1 Attribute Data CampusIDNameTypeFloorsFootprint 6MurphyAcademic22001 9HopkinsSupport2946 12MaintenanceSupport11848 15HickeySupport22367.

Similar presentations


Presentation on theme: "CS 128/ES 228 - Lecture 6a1 Attribute Data CampusIDNameTypeFloorsFootprint 6MurphyAcademic22001 9HopkinsSupport2946 12MaintenanceSupport11848 15HickeySupport22367."— Presentation transcript:

1 CS 128/ES 228 - Lecture 6a1 Attribute Data CampusIDNameTypeFloorsFootprint 6MurphyAcademic22001 9HopkinsSupport2946 12MaintenanceSupport11848 15HickeySupport22367 17Shay-LoughlenDorm31298

2 CS 128/ES 228 - Lecture 6a2 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

3 CS 128/ES 228 - Lecture 6a3 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” CampusIDNameTypeFloorsFootprint 6MurphyAcademic22001 9HopkinsSupport2946 12MaintenanceSupport11848 15HickeySupport22367 17Shay-LoughlenDorm31298

4 CS 128/ES 228 - Lecture 6a4 Sequential Databases Once upon a time, computer scientists tried to put all the data for an application in one table It didn’t work

5 CS 128/ES 228 - Lecture 6a5 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)

6 CS 128/ES 228 - Lecture 6a6 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”

7 CS 128/ES 228 - Lecture 6a7 What Color Hair Does Student 234 Have? Mary Dawn Pete Pat 117Mary3.8 201Dave2.5 234Dawn3.1 235Pete3.2 382Ted2.6 378Jane3.0 444Ann4.0 This is an example of a JOIN operation

8 CS 128/ES 228 - Lecture 6a8 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)

9 CS 128/ES 228 - Lecture 6a9 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.

10 CS 128/ES 228 - Lecture 6a10 Sometimes they are mixed

11 CS 128/ES 228 - Lecture 6a11 Queries Information is gained by linking tables through “joins” Queries can involve computed quantities, etc.

12 CS 128/ES 228 - Lecture 6a12 Storing Topology Shapefiles contain no topological information But topology is important SOLUTION Store the topology elsewhere

13 CS 128/ES 228 - Lecture 6a13 Practicality  GIS must maintain topology (to be useful)  GIS can’t store topology (in shapefiles)  SO, GIS must compute topology

14 CS 128/ES 228 - Lecture 6a14 Data Structure for Topology 1 9 8 7 6 4 5 3 2 10 A B C D Zone 1 Zone 2 Bou nd. AB4 AC5 BC10 CD8 Select Boundary Where Zone1=A Ans: 4,5

15 CS 128/ES 228 - Lecture 6a15 Topological Operations Merge two regions into one A B C …and change the appropriate table

16 CS 128/ES 228 - Lecture 6a16 Topological Operations Split one region into two A B C …and change the appropriate table

17 CS 128/ES 228 - Lecture 6a17 Other Topological Operations Clip an image

18 CS 128/ES 228 - Lecture 6a18 Topological Operations Erase an image

19 CS 128/ES 228 - Lecture 6a19 Other operations Union Intersect “Snaps”

20 CS 128/ES 228 - Lecture 6a20 How this is used Find nearest neighbor Find largest “empty” region

21 CS 128/ES 228 - Lecture 6a21 What distinguishes (some) GIS’s The types of these operations that they can perform. Both Database and Topological


Download ppt "CS 128/ES 228 - Lecture 6a1 Attribute Data CampusIDNameTypeFloorsFootprint 6MurphyAcademic22001 9HopkinsSupport2946 12MaintenanceSupport11848 15HickeySupport22367."

Similar presentations


Ads by Google