A newer version of this documentation is available.

View Latest

Querying on the East

    This query retrieves data based on the GeoJSON polygons example and associated with the eastern hemisphere.


    In this example, all documents that are on the eastern hemisphere are queried. In addition, since the area is also emitted as third dimension, queries need to contain that as well. As we don’t care what the area is, we’ll query it with the wildcard, null. So the final query is:

    This means the following coordinates are specified:

    • longitude (first dimension) greater than 0 and smaller than 180

    • latitude (second dimension) between -90 and 90.

    • null (third dimension) as a wildcard since, in this case, the third dimension doesn’t matter.

    The longitude and latitude are represented by the query parameters are start_range=[0,-90]&end_range=[180,90]. If just those two query parameters are specified, an error message displays indicating that the dimensionality doesn’t match. That’s why the null wildcard is used to represent the third dimension.

    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 results contain only the Flemish Diamond:

        {"id": "flemish_diamond",
         "value":"Flemish Diamond",