Detailed Comparison of Raster and Vector Approaches to Boolean Search



In a raster GIS, this type of analysis is typically performed by creating a boolean data layer (a layer which contains only 0 and 1, with 1 signifying areas where the criterion is satisfied, and 0 signifying areas where the condition is not satisfied) for each criterion. After all of the boolean data layers have been prepared, a series of overlay steps is performed to produce a final result. Generally multiplication overlay is used; a boolean image for one criterion overlays a second boolean image representing the second criterion. Multiplication overlay produces an output pixel value of 1 only if both input pixel values are 1 (1 times 1 equals 1), i.e., if both criteria are satisfied. An output pixel value of 0 is produced if one or the other or both input pixels is 0 (1 times 0 equals 0, or 0 times 0 equals 0), i.e., if one/both criteria is/are NOT satisfied.

An overlay operation is applied to evaluate the areas which satisfy the first two criteria. The resulting raster layer is then overlayed with the third boolean image. The raster resulting from that overlay operation is overlayed with the fourth boolean image and so forth until all of the criteria have been evaluated. Note that some GIS allow multiple boolean images to be overlayed in a single step. In the final result all non-zero pixels will be those in which the corresponding pixels in ALL of the boolean criterion images have a value of one. If a pixel in any of the criterion images is zero, i.e., if any of the criteria are not satisfied at the location represented by that pixel, then the result for that pixel will be zero, regardless of how many criteria WERE satisfied at that location.

The order in which the overlay operations are performed is not important as long as each of the boolean criterion images is used in one of the overlay steps.

In a vector GIS, there are two commonly used methods of conducting a search for features which satisfy multiple criteria. The first method uses database query to perform the analysis. The second method involves an intersection type of overlay operation.

In the database query method, one typically starts with a data layer which contains a number of features, e.g., property parcel polygons. The data layer has an associated attribute table which contains attributes for each feature, e.g., parcel size, assessed property value, zoning classification, etc. The essential procedure is to query the attribute database to determine the subset of features which satisfy the criteria.

Imagine, for example, that we are trying to locate commercial properties located less than 100 meters from a sewer line. For this example, we assume that we have a data field in our property parcels attribute database called SEWERDIST indicating the minimum distance (in meters) of the property to the nearest sewer line. [It is beyond the scope of this Unit to discuss the method for creating the SEWERDIST field in the attribute table and filling the field with the correct distance value for each polygon (see Unit 36 Using Distance and Connectivity Operators)]. We also have an attribute field that indicates whether the property is zoned for commercial use, residential use, agricultural use, and so forth. For this example we will imagine that an attribute value of "3" in the ZONING field indicates that a property is commercially zoned. Our goal is to find the properties which have both commercial zoning (i.e., ZONING = 3) and a distance-to-sewer less than 100.

First, we apply a filter, sometimes called SELECT or RESELECT, to the attribute database to extract the subset of polygons which satisfy one of the criteria, e.g., "RESELECT ZONING = 3". This creates a data layer of all polygons for which the ZONING field in the attribute table has a value of 3, which, in our example indicates a zoning classification of "Commercial". We then RESELECT SEWERDIST < 100 to restrict our selected set to the subset of commercial properties for which the distance to sewer line is less than 100 meters.

Alternatively, we could perform the extraction of suitable polygons in one step by RESELECT ZONING = 3 AND SEWERDIST < 100. It is sometimes the case that a data layer (e.g., parcel polygons) may have several separate attribute tables and the different attributes one needs to RESELECT on are contained in different tables. In such a case, it is necessary to RELATE the attribute tables on an identifier which is common to both tables, e.g., parcel ID.

Note that this only works when we are considering multiple attributes for the same spatial layer (for example, when we are working with a number of attributes all of which pertain to the same property parcels feature layer). When we are considering multiple spatial layers (for example, towns and drainage basins) each with its own attributes, a spatial overlay is required, as is described next.

In vector GIS, the second common method of searching for areas which satisfy multiple criteria is the use of the overlay intersection operator. In the overlay-intersect operation, two data layers are overlayed and only the areas/features common to both are present in the output layer. A data layer displaying the 100-meter buffer around sewer lines could be INTERSECTed with the layer containing only commercial properties to derive an output data layer containing only those areas common to both, i.e., those areas which are commercially zoned and which are located within 100 meters of a sewer. In some vector GIS, only entire parcels will be selected and the user decides if a parcel must be completely within, or only intersected by, the buffer or selection area. In other vector GIS, the software can create new polygons which contain only the portions of parcels within the buffer or selection area.

Return to Unit 41 - Using Boolean Search Techniques