Query API Overview

The Query API lets you query our spatial data warehouse and get JSON (or GeoJSON) objects back. You can then use the data in a non-map way: present the data in another way (i.e. a chart, table, query your own DB) or perform more complex data reduction.

SpatialQuery is the backbone of the Query API, and most common queries will use it. It is very much like a SELECT statement that you would use in SQL. Additionally, the other services make heavy use of, and build on, the SpatialQuery syntax.

EstimationQuery takes an attribute that is given by one geometry type and estimate what that attribute's value is in some other geometry type. If, for example, the governor wants to know how many people in the state live on a flood plain, this is the query to use.

SpatialJoin performs joins (in the SQL sense of 'join') between two geometry sets. For example, if you want to know the names of all US counties which have coastlines with steep slopes, SpatialJoin can use spatial predicates to join county geometries with the USGS coastal vulnerability geometries.

FeatureQuery retrieves information about a geometry from its unique identifier. This is highly useful in debugging. If, for example, you are trying to figure out why your bonehead predecessor hardcoded geometry id 8727362 into the code, FeatureQuery will answer that.