Mapping Software and GIS Glossary

DEFINITION

What is a Spatial Query?

A spatial query is a request for specific information from a GIS database based on defined geographic criteria. It allows users to extract relevant data for analysis and decision-making.

Whereas it can be easy to perform an attribute query in a spreadsheet program (e.g., which customers bought the most goods, which parcels have values less than $500,000), specialized mapping software makes it easy to combine attribute queries with spatial quieries (e.g., which customers bought the most goods and are more than 15 minutes from a store, which parcels are less than $500,000 and are within 0.5 miles of an elementary school). By filtering features based on attribute and spatial queries it is possible to analyze features and spot trends not possible in a spreadsheet alone.

Combined spatial and attribute query

A spatial query of parcels within 1/2 mile of a school combined with an attribute query of parcels valued at less than $500,000

Combined spatial and attribute query

A spatial query of customers more than 15 minutes from a store combined with an attribute query of customers with sales greater than $5,000

Spatial queries are valuable for extracting information from large datasets efficiently and can be simple or complex, depending on the desired output. Examples of spatial query operators include:

Operator Use it to...
touching or contained Query features that are contained within or touch features in the reference layer
inside Query features that are inside features in the reference layer
not inside Query features that are not inside features in the reference layer
within Query features within a specified distance of features in the reference layer
not within Query features that are not within the specified distance of the features in the reference layer
closest and within Query, for each feature in the reference layer, the closest feature, as long as it is within a specified distance of the features in the reference layer
connected Query line features that begin or end at the endpoints selected in the reference layer, or select endpoint features that are at the ends of the lines selected in the reference layer
select whether or not areas overlap Query features that are inside any features in a reference layer of non-topological areas
Select only in areas that do not overlap Query features that are inside a single feature in a reference layer of non-topological areas
Select only in overlapping areas Query features that are in two or more features in a reference layer of non-topological areas

GIS Software for Spatial Queries

Maptitude mapping software gives you all of the tools, maps, and data you need to analyze and understand how geography affects you and your business. Maptitude spatial queries let you select features in one layer (the working layer) based on how close they are to, or how far they are from, features in another layer (the reference layer). Examples of spatial queries include:

If you want to... Select from the reference layer... And then query...
Find airports are near an Interstate highway The particular interstate highway(s) of interest Airports within 5 miles of the selected highways
Find customers in a sales territory The sales territory of interest Customers inside the selected territory
Find stores far from a distribution outlet Any or all distribution outlets of interest Stores not within 50 miles of the selected outlets
FInd homes near schools Select any schools of interest Homes within 0.5 miles of the selected schools
Find customers not within a 20-minute drive of a store All drive-time rings that are less than 20 minutes Customer not inside the selected drive-time rings

Learn More  Free Trial  Free for Students/Teachers