2016-06-17 34 views
0

我旁邊以GeoJSON:蒙戈以GeoJSON導入結果與圓座標

{ 
    "type": "Feature", 
    "geometry": { 
     "type": "Point", 
     "coordinates": [-80.87088507656375, 35.21515162500578] 
    }, 
    "properties": { 
     "name": "ABBOTT NEIGHBORHOOD PARK", 
     "address": "1300 SPRUCE ST" 
    } 
} 

當我運行蒙戈進口沒有任何錯誤,但我所有的座標是圓的,它看起來像:

{ 
    "_id":"5763b765e79b559e5815ba46", 
    "type":"Feature", 
    "geometry":{ 
    "type":"Point", 
    "coordinates":[ 
     -81, 
     35.22 
    ] 
    }, 
    "properties":{ 
    "name":"ABBOTT NEIGHBORHOOD PARK", 
    "address":"1300 SPRUCE ST" 
    } 
} 

你有什麼想法,爲什麼這是惹人注目的,可以做些什麼來解決它?謝謝。

回答

0

jsonfile image

這裏是您的JSON文件後,我導入josn

Chetan-desktop:~/Desktop$ mongoimport --db stackoverflow --collection exp2 --file stackoverflow.json 
2016-06-18T10:32:40.587+0530 connected to: localhost 
2016-06-18T10:32:40.831+0530 imported 1 document 

輸入輸出後就是這樣

> use stackoverflow 
switched to db stackoverflow 
> show collections 
exp2 
stack1 
system.indexes 
> db.exp2.find().pretty() 
{ 
    "_id" : ObjectId("5764d5f018787c4414e189e2"), 
    "type" : "Feature", 
    "geometry" : { 
     "type" : "Point", 
     "coordinates" : [ 
      -80.87088507656375, 
      35.21515162500578 
     ] 
    }, 
    "properties" : { 
     "name" : "ABBOTT NEIGHBORHOOD PARK", 
     "address" : "1300 SPRUCE ST" 
    } 
} 

我沒有發現任何座標四捨五入

可檢查蒙戈的版本,因爲我的MongoDB外殼版本:3.2.6