Custom queries with spatial data