As far as I know, couchbase has support for geospatial data, but I am not sure how to use this.
Does anybody know, if it is possible to query for elements which are inside a bounding box via N1QL SELECT statement in couchbase?
If yes, how would a SELECT statement look like, to query with a bounding box for the elements in the following json?
{
"type": "Feature",
"properties": {
"name": "Bermuda Triangle",
"area": 1150180
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[-64.73, 32.31],
[-80.19, 25.76],
[-66.09, 18.43],
[-64.73, 32.31]
]
]
}
}
{
"type": "Feature",
"properties": {
"name": "Flemish Diamond",
"area": 2947
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[3.55, 51.08],
[4.36, 50.73],
[4.84, 50.85],
[4.45, 51.30],
[3.55, 51.08]
]
]
}
}
{
"type": "Feature",
"properties": {
"name": "Research Triangle",
"area": 252
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[-78.93, 36.00],
[-78.67, 35.78],
[-79.04, 35.90],
[-78.93, 36.00]
]
]
}
}