Spatial Query

advertisement
Spatial query
Spatial query is the process of selecting features based on their geographic relationship,
or spatial relationship, to other features.
For example, you might be interested in finding out which features are within a certain
distance of other features, which are adjacent to other features, which are contained
inside other features, or which intersect other features.
In ArcView, you can perform spatial queries using features from different themes. The
process of overlaying one theme with another in order to determine their geographic
relationships is called spatial overlay.
Spatial overlay allows you to use features in
one theme to find features in other themes
based on their geographic relationships.
Spatial query is part of a larger process called spatial analysis. Spatial analysis
combines the various techniques you will learn in this module into a series of steps
which helps you solve problems like:
Locating a new business:
When locating a new business, you
can use spatial query to find the site
that's closest to the most clients.
Analyzing existing trade areas and determining new ones:
You can determine trade areas for existing malls
and see where these areas overlap the trade area of
a proposed mall.
Determining potentially hazardous areas:
You can use spatial query to find the areas
near a stream where the likelihood of a
landslide is high, medium, or low.
Analyzing fire damage and developing new models for predicting fires:
You can use spatial analysis to assess
the fire damage to a neighborhood and
create a new model for predicting fires
and how they might spread.
Determining which police patrol area has the highest incidence of crimes to help
allocate resources:
You can use spatial join to determine
how many crimes occur in each police
patrol area. In this case, the police beat
with the highest number of crimes
reported within it was identified after the
two theme attribute tables were joined.
Proximity
When selecting a new site for a business or a school or a garbage dump, it helps to
know what is in the neighborhood. Knowing what is nearby, or in proximity to, a
location helps you determine whether the location is suitable for what you want to
locate there.
A proximity query finds features that are within a specified distance of another feature
or features. Features within the specified distance are selected. Once the features are
selected, you can copy them to a new shapefile, display the selected records, or create a
report.
A proximity query helps you use features from a theme to
find nearby features in the same theme or in another
theme. For example, you could create a proximity query to
find all the property for sale or lease within 1,760 feet (1/3
of a mile) of a mall.
Adjacency
Another type of spatial query is adjacency. Adjacency finds features that are next to
other features. You can think of adjacency as a special case of proximity query, because
you are finding features that are zero units away from the selected features.
Assuming that the features don't overlap (you'll learn about overlapping features later),
adjacent linear features must be connected and adjacent polygon features must share a
common boundary.
Here, adjacency queries are used to find
all the properties next to a business and
all the pipelines next to a broken pipe.
Containment
Using theme-on-theme selection, you can find the points, lines, and polygons in one
theme that fall completely within a polygon or polygons in another theme. You can also
find polygons in one theme that contain particular points, lines, or polygons in another
theme.
This type of spatial relationship--features inside other features--is known as
containment. Finding out whether a feature is inside or outside a boundary can be
crucial to making decisions.
For example, you could find the parcels within a subdivision, the fire hydrants within
the subdivision, and even the parcels that contain the fire hydrants and use this
information for establishing insurance rates.
You can use containment queries to find all the fire
hydrants in a subdivision and the parcels that contain
the fire hydrants.
You can find polygons that contain a specific linear feature or group of linear features.
You could, for example, find the land parcels that contain part of the river. Once you
know which land parcels contain the river, you can find which subdivision contains the
land parcels. One selection process can build upon another until you find exactly the
features you are looking for.
Here, a containment query has been used to find the
parcels that contain a part of the river.
Theme-on-theme selection
To perform spatial queries, ArcView GIS uses a procedure called theme-on-theme
selection.
Theme-on-theme selection uses a selector theme and a target theme. The selector
theme is the theme whose features are used for selection and the target theme is the
theme whose features are to be selected. (There may be multiple target themes.)
The selector theme and the target theme can be the same theme or different themes.
Suppose you wanted to do a proximity query to find out which census tracts are within
2.5 kilometers of a high school. Because distance from the high school is the selection
criterion, High School is the selector theme. Census Tracts is the target theme because
its features are the objects of the selection.
You can use theme-on-theme selection to find the census
tracts that fall within 2.5 kilometers of a high school. The
census tracts that meet the criterion are highlighted in
yellow.
Proximity, adjacency, and containment queries can all be performed using theme-ontheme selection.
Buffering data
When you want to analyze what is (or isn't) nearby, next to, or within a feature or
features, the process is called buffering. A buffer is a zone of a specified distance
around a feature. At Version 3.1, ArcView GIS introduced a buffer wizard to help you
create buffers.
What is a buffer?
Suppose you wanted to find all the shopping malls within a mile of a fault line to
determine earthquake risk. What would you do? How would you determine whether any
farms fall within five miles of a hazardous waste site? Or the percentage of forest within
500 meters of a lake?
Top: Two fault lines have been buffered
to the distance of a mile. Only one mall
is within a mile of a fault line. Center:
Point features (hazardous waste sites)
have been buffered. By buffering these
sites, you can see which farms have land
within a five-mile zone. Bottom: A buffer
zone has been created around a polygon
feature (lake). The buffer zone can be
used to find the area of forest within 500
meters of the lake.
With ArcView GIS, you can create buffers to identify areas surrounding geographic
features. Because you are finding out what is (or isn't) in the proximity of features or
graphics, the buffer operation is a type of proximity analysis.
The buffer process draws a line around the buffered feature at the exact distance you
specify and creates either a polygon feature or features or a polygon graphic. You can
use the buffer to find the exact areas or lengths of features within the buffer zone.
You can buffer any feature--point, line, or polygon, as well as graphics.
A buffer is a proximity analysis tool that
identifies areas around geographic
features. You can buffer point, line, and
polygon features as well as graphics.
Creating buffers
You create buffers in ArcView GIS with the buffer wizard. The wizard has three dialogs
which help you choose the features to be buffered, the distance or distances to buffer,
and how you want the output saved.
Before you can create a buffer, you must have a theme loaded into your view, and you
must set the view's map and distance units.
You have a choice of buffering the graphics in your view or the features of a theme. If
you select a set of features before opening the buffer wizard, you can choose to buffer
only the selected features or all the features in the theme.
By default, the specified distance value for your buffer will be in the distance units of
the view. You can change this value if you like.
If you are not concerned with the individual buffer boundaries, you can choose to
dissolve barriers between buffers, in which case ArcView merges buffers that overlap.
When you create buffers with the buffer
wizard, you can choose to either keep the
boundaries between overlapping buffers or
dissolve the boundaries.
If you are buffering a polygon feature or graphic, you can choose to create the buffers so
they are inside and outside the polygons, only inside the polygons, or only outside the
polygons.
For example, if building codes prohibit construction within 500 meters of a lake, you'd
create buffers only outside the lake polygons. If you wanted to exclude areas of a forest
polygon that were within 100 meters of the forest's edge, you'd create a buffer inside the
polygon. If you were studying amphibians and wanted to create a study area 20 meters
to either side of a pond edge, you'd create a buffer that was inside and outside the
polygon (a buffer 40 meters wide would be created).
You have several options for saving your buffers. You can add a buffer as a graphic to
your view or add it as a polygon feature to a new or existing theme.
Buffer and theme-on-theme selection compared
ArcView GIS has another tool you can use for proximity analysis called theme-on-theme
selection. Theme-on-theme selection is similar to buffer because you can use it to select
the features of one theme that are within a distance of the features in another theme.
Theme-on-theme selection will select the features so long as a portion of them is within
the distance you specify, but it won't tell you how much of a line or polygon is within
the specified distance. As a result, some parts of the features selected may extend past
the distance you specified, and your answer might not be accurate.
Theme-on-theme selection has been used to
select all roads within 500 meters of this point.
When you create a 500-meter buffer around the
point, notice that the lines selected using
theme-on-theme selection extend past the 500meter buffer.
Theme-on-theme selection selects the features that have some part falling within the
distance of the feature, but it won't draw the boundary of the zone. When you create a
buffer, ArcView draws a line around the buffered feature at the exact distance you
specified in the wizard. This allows you to visualize the extent of the zone around the
feature.
Using buffers to solve problems
Buffering geographic features is one of the simplest analysis operations, and you can
use various buffer options to get different types of information. You can use buffers to
determine proximity with theme-on-theme queries which select features that fall inside
or outside of the buffer. You can vary the distance of buffers based on an attribute in
the theme's attribute table and you can create nested buffers.
Finding features within a buffer
You can use a buffer theme to select features from other themes in your view. Once the
features are selected, you can copy them to a new shapefile or update an attribute in
the associated theme attribute table. For example, in some places, there are ordinances
that prohibit liquor from being sold within one mile of a school. You could buffer the
schools using a one-mile buffer distance, then use theme-on-theme selection to make
sure no liquor stores are within this zone.
Buffer distances showing the areas
within one mile of schools.
Varying buffer distances
Buffer distances can be constant (for instance, one mile around each feature in a
theme) or they can be derived from numeric values in a theme table. This makes it
possible to assign buffer distances to features according to a particular attribute. For
example, suppose certain kinds of product advertising or public messages are
prohibited within a particular distance of schools. The distance might vary according to
whether the school is an elementary, middle, or high school. The buffer distance can be
set to a field in the schools theme table that has different values for each school type.
These buffers were created using an
attribute field to specify the buffer
distance. Primary schools have a greater
distance than colleges.
Using nested buffers
If you use the multiple rings option, you can specify the number of buffers and the
distance between them. Suppose there is a law that restricts logging within certain
distances of rivers. No clearcutting is permitted within 1500 meters of a river. Between
1500 and 1000 meters, logging of only a certain number of trees per square kilometer is
permitted. Between 1000 and 500 meters only dead trees can be logged, and within 500
meters of the river no logging is permitted. To find the areas where logging is restricted,
use a nested buffer.
You can create nested buffers to find out what is
within different distances of a feature.
Download