arangosh> for (var i = -90; i <= 90; i += 10) {
........> for (var j = -180; j <= 180; j += 10) {
........> db.geo.save({ name : "Name/" + i + "/" + j, loc: [ i, j ] }); } }
arangosh> db.geo.within(0, 0, 2000 * 1000).distance().toArray();
[
{
"_id" : "geo/5586",
"_key" : "5586",
"_rev" : "_XUJyruy--_",
"loc" : [
0,
0
],
"name" : "Name/0/0",
"distance" : 0
},
{
"_id" : "geo/5589",
"_key" : "5589",
"_rev" : "_XUJyruy--B",
"loc" : [
0,
10
],
"name" : "Name/0/10",
"distance" : 1111949.2664455874
},
{
"_id" : "geo/5583",
"_key" : "5583",
"_rev" : "_XUJyruu--F",
"loc" : [
0,
-10
],
"name" : "Name/0/-10",
"distance" : 1111949.2664455874
},
{
"_id" : "geo/5697",
"_key" : "5697",
"_rev" : "_XUJyrvW--B",
"loc" : [
10,
0
],
"name" : "Name/10/0",
"distance" : 1111949.2664455874
},
{
"_id" : "geo/5475",
"_key" : "5475",
"_rev" : "_XUJyruO--_",
"loc" : [
-10,
0
],
"name" : "Name/-10/0",
"distance" : 1111949.2664455874
},
{
"_id" : "geo/5694",
"_key" : "5694",
"_rev" : "_XUJyrvW--_",
"loc" : [
10,
-10
],
"name" : "Name/10/-10",
"distance" : 1568520.5567985761
},
{
"_id" : "geo/5700",
"_key" : "5700",
"_rev" : "_XUJyrvW--D",
"loc" : [
10,
10
],
"name" : "Name/10/10",
"distance" : 1568520.5567985761
},
{
"_id" : "geo/5472",
"_key" : "5472",
"_rev" : "_XUJyruK--F",
"loc" : [
-10,
-10
],
"name" : "Name/-10/-10",
"distance" : 1568520.5567985761
},
{
"_id" : "geo/5478",
"_key" : "5478",
"_rev" : "_XUJyruO--B",
"loc" : [
-10,
10
],
"name" : "Name/-10/10",
"distance" : 1568520.5567985761
}
]