What is Where? Getting Started With Geographic Information Systems Chapter 5
A GIS can answer the question: What is where? u WHAT: Characteristics of attributes or features. u WHERE: In geographic space.
A GIS links attribute and spatial data u Attribute Data t Flat File t Relations u Map Data t Point File t Line File t Area File t Topology
What is a Data Model? u A logical construct for the storage and retrieval of information. u GIS map data structures are map data models. u Attribute data models are needed for the DBMS. u The origin of DBMS data models is in computer science.
Historically, databases were structured hierarchically in files... USA CaliforniaOregonNew York Santa BarbaraVenturaContra Costa
Most current DBMS is by relational databases. u Based on multiple flat files for records, with dissimilar attribute structures, connected by a common key attribute.
Relational Data Bases Purchase Record ItemDatePrice CustomerKey Skate Board2/1/ John Smith42 Baseball Bat2/1/ James Brown978 Patient Record Key Check-inCheck OutRoom No. 422/1/962/4/96N /3/962/4/96N712 Accident Report DateInjuryNameKeyLocation 2/1/96Broken LegJohn Smith4275 Elm Street 2/2/96ConcussionSylvia Jones65412 State Street 2/2/96Cut on EarRobert Doe Broad Street File
A DBMS contains: u Data definition language u Data dictionary u Data-entry module u Data update module u Query language u Report generator
Data definition language u Allows the user to establish the structure and names of records and attributes.
Data dictionary u Directory of meta-data (information about the data: what data of what types (numerical, text) are available for what areas and time periods?)
Data-entry module u Needs to “catch” data-entry mistakes as they happen, based on the dictionary (“What kind of data belongs in this entry?”)
Data-update module u Allows corrections and additions or insertions. u Allows new records? u Allows new attributes? u Allows changes in entered values? u Tracks changed values?
Query language u Specific operators that allow the user to retrieve information from the data. –“How many records with certain attributes?” –“Create a new attribute by combining attributes.”
DBMS queries via the query language u sorting u renumbering u subsetting u searching
Command line attribute query compute in states population_density = population / area restrict in states where population_density > 1000 recode population_density = 3 join result with states replace restrict in states where population_density > 100 recode population_density = 2 join result with states replace compute in states where population_density != 3 or 2 population_density = 1
Retrieval u The ability of the DBMS or GIS to get back on demand data that were previously stored. u Geographic search is the secret to GIS data retrieval. u Many forms of data organization are incapable of geographic search. u GIS systems have embedded DBMSs, or link to a commercial DBMS.
Retrieval Operations u Searches by attribute: find and browse. u Data reorganization: select, renumber, and sort. u Compute allows the creation of new attributes based on calculated values.
Spatial Retrieval Operations u Attribute queries are not very useful for geographic search. u In a map database the records are features. u The spatial equivalent of a find is locate, the GIS highlights the result. u Spatial equivalents of the DBMS queries result in locating sets of features or building new GIS layers.
Spatial Search u Buffering is a spatial retrieval around points, lines, or areas based on distance. u Overlay is a spatial retrieval operation that is equivalent to an attribute join.
Recode OR
Data overlay
Overlay
Types of overlay operations u And u Or u Max u Min u Exhaustive set
Buffer + 1
Complex Retrieval: Map Algebra u Combinations of spatial and attribute queries can build some complex and powerful GIS operations, such as weighting.
Report generator u Allows user to control the format for printing the results of queries. u In a GIS, this parallels the map-creating and editing capabilities of the system.
Coming next… u WHY IS IT THERE?