2015-11-20 83 views
-1

我用我的查询通过给出xy坐标来查找集合。但没有结果被提取。我添加了我的数据库的图像。我只需要返回与该坐标对应的属性文档。 database如何使用geojson数据库的“查找”查询

db.getCollection('line').find(
    {"features" : 
    [ 
    { 
     "properties" : { 
     , 
     "geometry" : { 
      "type" : "Point", 
      "coordinates" : [ 
       79.8658999999999960, 
       6.8513479999999998 
    ] 
    } 
    ) 

回答

0

尝试使用这样的:

db.getCollection('user').find(
{"features" : 

    { 
    "properties" : { 

      "geometry" : { 
     "type" : "Point", 
     "coordinates" : [ 
      79.8658999999999960, 
      6.8513479999999998]}}}}) 
+0

没有。它不工作。我添加了数据库的图像。我只需要获取与该坐标对应的属性文件。 –