0

Hey Guys i'm trying to get a Point within a specific location from my CouchDB Database. I have absolutely no Idea how to build the query and the view.

In my Document, there is a value latitude and a value longitude.

I am building a quadratic bound latMin, longMin, latMax, longMax. The view should return all documents where:

latitude is between latMin and latMax

and

longitude is between longMin and longMax

Thank you in advance

Edit: For this Project i am forced to use IrisCouch where i'm not able to install an extension. I have to solve it with key, startkey and endkey.

1 Answer 1

2

You may use the extension "geocouch" which is specialized to do spatial queries.

Sign up to request clarification or add additional context in comments.

3 Comments

Thank you for this Answer. The Problem is: For this Project i am forced to use IrisCouch where i'm not able to install an extension.
The extension geocouch is installed in iriscouch by default. The reason why it exists is - you can't design a couchdb index which lets you perform boundary requests as you want.
Thank you guys. Didn't know that it is already included. This helped me out!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.