考虑以下pymongo代码:
location = db.BLR_all.find_one( { "$and": [{"geom.type":"Point"},{"REGION": "KORAMANGALA"},{"E_NAME": "RAILWAY BOOKING CENTER"}] })
打印位置时,值为:
^{pr2}$以及
>>> print(location["geom"])
会给出以下输出
{'coordinates': [77.6221694946289, 12.93125057220459], 'type': 'Point'}
不管怎样,我能提取坐标并打印出来吗?
我期望的输出是:
[77.6221694946289, 12.93125057220459]
谢谢。
目前没有回答
相关问题 更多 >
编程相关推荐