A newer version of this documentation is available.

View Latest

Querying on Non-intersect

    This query retrieves data based on the GeoJSON polygon example and on bounding box parameters that are within the query range.


    Queries only filter on a bounding box level. This means that even if the actual geometry doesn’t intersect the query ranges but its bounding box does, it is still included in the result.

    HTTP method and URI

    GET [bucket-name]/_design/[design-doc]/_spatial/[spatial-name]


    Curl syntax:

    curl http://[localhost]:8092/[bucket-name]/_design/[design-doc]/_spatial/[spatial-name]?start_range=[]&end_range=[]


    The following example is based on the GeoJSON polygon data and the associated spatial view function.

    Curl example:



    The response shows that the ranges don’t intersect the polygon of the Bermuda Triangle, but its enclosing bounding box does which can be found in its key.

        {"id": "bermuda_triangle",
         "key": [[-80.19,-64.73],[18.43,32.31],[1150180,1150180]],
         "value": "Bermuda Triangle",
         "geometry": {"type":"Polygon","coordinates":[[[-64.73,32.31],[-80.19,25.76],[-66.09,18.43],[-64.73,32.31]]]}},
         {"id": "research_triangle",
         "key": [[-79.04000000000001,-78.67],[35.78,36],[252,252]],
         "value": "Research Triangle",
         "geometry": {"type":"Polygon","coordinates":[[[-78.93000000000001,36],[-78.67,35.78],[-79.04000000000001,35.9],[-78.93000000000001,36]]]}}]}