Simple and reusable spatial queries

Quoting James Fee:

First we’ve got new functionality in the Google Maps Data API. First off you can now perform geospatial and attribution queries on data stored on Google’s MyMap. Now of course this isn’t paleo-type spatial queries, just simple stuff that solve 80% of all queries you’d need to complete. Simple web apps need not fancy complicated APIs and clearly Google is the master of this. So upload your data into Google’s My Maps and then query it to display on a Google Maps application. Simple and sweet.

This is also sweet from an engineering perspective. Yes, simple bounding box or radius search are "only" "80-20 rule" features, but at the same time are also features that power users are going to use almost 100 percent of the time for a lot of tasks. In other words: highly reusable features. Let's say you want to select features of a collection that are contained within another feature. You could build up a result set by iterating over each feature in the collection no matter where it is and evaluate containment with the filtering feature for every single one of them. Better yet would be to first eliminate candidate features that aren't even in the same ballpark as the filtering feature by using an indexed bounding box search. This is the default mode of operation for newer functions in PostGIS, for example, like ST_Contains:

This function call will automatically include a bounding box comparison that will make use of any indexes that are available on the geometries. To avoid index use, use the function _ST_Contains.

(By the way, nice new docs there, PostGIS people!) Simple indexed search is the initial boost to more interesting queries. Indexed operations are best provided by the map data collections themselves. Higher order processing, some of which can be done in parallel, can be left to other resources or services. This is, of course (except for the parallel considerations), the premise of the OGC's Web Processing Service, but taken to an extreme where a WFS provides only bounding box and attribute filtering and the WPS does everything else. A familiar pattern, but I'd be surprised if a future Google spatial data processing platform wasn't as different from OGC WPS as the maps data API is from WFS.