Book Image

ArcGIS By Example

By : Hussein Nasser
Book Image

ArcGIS By Example

By: Hussein Nasser

Overview of this book

Table of Contents (17 chapters)
ArcGIS By Example
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Finding restaurants in a region


We learned how to query the regions that were located in another geodatabase and populate them in a list. So far we didn't add any logic to filter restaurants in a particular region; here is where we can achieve that.

Spatial queries

In the previous six chapters, we learned how to query feature classes and even related tables. These queries were attribute related and didn't involve any spatial components. However, sometimes you will need to use the geometric property of the feature class in your query, and that is when you will need the spatial query. The spatial query uses a relational operator, such as intersects or contains, to retrieve all records that satisfy this criterion.

Note

Spatial query: This is a geodatabase query where a filter geometry is supplied and the query is executed on all the features in the feature class based on a relational operator.

Populating restaurants in a region

In our case, we will use the selected region as the filter geometry and...