Lecture gis

Page 1

GIS Spatial Queries GIS and Spatial Queries Why use GIS for Analysis? Query Structured Query Language (SQL) Three types of operations Raster Data Queries Vector Data Queries Integrated analysis of spatial and attribute data Neighborhood functions Types of Queries Connectivity functions Proximity View Shed Data Sets TIN Triangulated Irregular Network References

GIS and Spatial Queries Why use GIS for Analysis? GIS can test and manipulate variables faster and more conveniently. With a GIS it is less expensive to test models rather than reality GIS can predict consequences of proposed activities, then pick “best� alternative. GIS has the ability to query, or search and retrieve data from a database based on specified criteria.

Query A question or request used for selecting features. A query often appears in the form of a statement or logical expression. In ArcMap, a query contains a field, an operator, and a value. (ESRI 2000) Back to top

Structured Query Language (SQL) A data manipulation language primarily designed for relational databases. It was developed by IBM in the 1970's as a set of tools


and commands to ask questions of a database. An SQL statement defines the criteria used in a search, change, or update of datat stored in a relational database. Since that time SQL has become a standard language for database software. Examples of software programs that use SQL are: • MS Access • Dbase • Oracle • and many others An SQL query is a query you create using an SQL statement. Examples of SQL-specific queries are the union query, pass-through query, datadefinition query, and subquery. Some common operations in SQL include: • sort - orders records based on a single attribute. for example put a list of names in alphabetical order. • restrict - chose a record based on an attribute value • project (or select) - create a new table with only a limited set of attributes. • join - put two tables together where identifiers are the same • division - select from two tables based on two attributes. • Boolean operators - AND, OR, NOT • Algebraic operators - > < = + - x / Back to top

Three Types Of Query Operations: The scope of spatial analysis ranges from a simple query about the spatial phenomenon to complicated combinations of attribute queries, spatial queries, and alterations of original data. 1.Attribute Queries (aspatial) Attribute queries require the processing of attribute data exclusive of spatial information. For example: identifying commercial land use parcels in order to compute the average value of this land use type. The selection is based only on an attribute item; therefore, no spatial information is required. 2.Spatial Queries Spatial Queries require the processing of spatial information. To add on to the last parcel example, a question may be raised about parcels


within one mile of a major freeway. The answer to such a query requires spatial information about the location of the freeway and each parcel. 3.Generation of new data sets from the original database A spatial analysis may require generation of new data from the original set. For example, assume that you wish to find a relationship between noise level and proximity to freeways within one mile of the freeway, for all parcels zoned residential. To answer the question, you must combine, or overlay, the parcel map and the freeway map. Then derive the areas within one mile of the freeway. This process may require the delineation of new geographic entities and the generation of a new data table showing combinations of several factors

Raster Data Queries Query by Attribute Raster data may be queried by using the cell value. To query a grid, use a logical expression such as [road]=1 AND [elevation]>=3456.34. It is also possible to query multiple grids by cell value. This analysis capability is not available with vector type data.

Query by Location Raster data may also be queried by using a graphic. The cursor can be used to point to a cell to identify its cell location and value. Back to top

Vector Data Queries Query by Attribute This procedure retrieves data from the database or map by working with the attribute data. The data queries in ArcGIS follow boolean algebra. Logical operators such as =.>,<, <>, are used with Boolean connectors, such as AND, OR, XOR, NOT, to create a query statement.

Query by Location Spatial Data Query: this procedure retrieves data from a map by working with map features. Features can be selected with a cursor or graphic.


Combining Spatial and Attribute Data Queries Many times, both query by attribute and by spatial location are necessary to obtain the desired information. Back to top

Integrated analysis of spatial and attribute data “The POWER of GIS” Distinguishes GIS from AM/FM and CAD Use query functions in a GIS in several ways. Retrieval – selective search


Classification – identifying a set of features as belonging to a group; defines patterns

Measurement – distances, lengths, perimeters, areas

Overlay functions We will get into these more advanced query functions as the courses progress. GIS analysis is the primary function of the system and the


type of analysis that can be performed on the data is dependent on the purpose of the project, the data type, the hardware and software restrictions and the knowledge of the GIS operator. Arithmetic – addition, subtraction, division, multiplication (+,-,/,*) Logical – find those areas where specified conditions occur (and, or, >,<, etc.) Again, the Raster/Vector data models differ in implementation. Vector example Involves a process that merges spatially coincident polygons from two coverages, and their attributes, to create a third coverage that contains new polygons and describes new relationships

Raster overlay is simpler, but has other restrictions. It is very space consuming to perform rater analysis overlays and the only


one value can be represented in a cell at one time.

Back to top

Types of Queries Point in Polygon Query A spatial operation in which points from one coverage are overlaid with a polygon coverage to determine which points fall within the polygon boundaries. Points assume the attributes of the polygons within which they fall.


Line in Polygon Query A spatial operation in which arcs in one coverage are overlaid with polygons of another coverage to determine which arcs, or portions of arcs, are contained within the polygons. Polygon attributes are associated with corresponding arcs in the resulting line coverage.

Point and Line in Polygon


Polygon in Polygon Union – a topological overlay of two polygonal spatial data sets which preserves features that fall within the spatial extent of either input data set; that is, all features from both coverages are retained.

Intersect – the topological integration of two spatial data sets that preserves features that fall within the spatial extent common to both input data sets


Back to top

Other GIS Analysis Functions Neighborhood functions Neighborhood functions involve a focus cell and a set of surrounding cells. The surrounding cells are chosen by distance or direction from the focus cell. Neighborhoods are often defined to simplify data. The output from a neighborhood operation can show summary statistics for the neighborhood. Basic neighborhood functions Average Diversity Majority Maximum, minimum Total Search Most common neighborhood operation Example: Count the residential buildings within 2 miles of a Fire station


Raster Search


Vector Search

Connectivity functions The topological identification of arcs that connect at a node. Within a linear network, the from- and to- node numbers for each arc define connectivity. So, arcs that share a common node are connected. Use functions that accumulate values over the area being traversed.


Must include: Specification of way spatial elements are connected Rules that specify allowed movement along interconnections A unit of measurement Network Functions -- A set of interconnected linear features that form a pattern or framework GIS Network Functions prediction of network loading – flood control route optimization – emergency routing resource allocation – metropolitan service zones – fire, police Shortest Path

Quickest Path


Read about an application that ESRI has published: GIS Takes Oregon Firefighters a Long Way from the Bucket Brigade

Back to top

Contiguity – The topological identification of adjacent polygons by recording the left and right polygons of each arc. Used to determine whether spatial units are connected. Most define “unbroken area” Contiguity

measures: Size of contiguous area Shortest/longest straight line distance across contiguous area


Specific shape of contiguous area

Proximity Measure of the distance between features Not always distance, can be time, noise, etc. Need Target locations Unit of measure Function to calculate proximity (time/distance) Area to be analyzed Example: Buffer Generalization

Back to top

Intervisibility Functions (view shed models) View shed – that which can be seen from a specified target location


-uses digital elevation data


View Shed Data Sets Read about a View shed project in England The Stour Valley Project, England: a cropmark landscape in three dimensions D. Strachan


Back to top

TIN Triangulated Irregular Network A surface representation derived from irregularly spaced sample points and breakline features. The tin data set includes topological relationships between points and their proximal triangles. Each sample point has an x, y coordinate and a surface, or z- value. These points are connected by edges to form a set of non-overlapping triangles used to represent the surface.

Learn more about the TIN model: THE TIN MODEL


Back to top

Read the case studied provided by the USGS. This paper reviews all of the topics discussed in this lecture as well as applies the concepts to a real world application. Research and Management Techniques for Wildlife Habitats Geographic Information Systems - GIS Analysis Capabilities


Back to top

GIS Analysis Functions Final Comments Different GIS packages have their own strengths and weaknesses. The GeoDirectory is a good reference regarding strengths and weaknesses of different systems GIS software is a “toolbox” of analysis programs, some “canned,” some must be customized

References Understanding GIS – the ArcInfo Method. ESRI, 1997. Back to top


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.