The sample_restaurants database contains two collections specifically designed to help familiarize you with GeoJSON data.
To learn how to load the sample data provided by MongoDB Atlas into your cluster, see Import Sample Data Into Your Atlas Deployment.
集合
sample_restaurants数据库包含以下集合:
sample_restaurants.restaurants
这个集合包含餐厅的账户详细信息。每个文档都包含餐厅的详细信息,如地址、行政区、评分、名称和所供应的食物种类。
索引
sample_restaurants.restaurants 集合包含以下索引:
名称 | Index | 说明 |
|---|---|---|
|
|
|
文档样本
{ "address": { "building": "8825", "coord": [-73.8803827, 40.7643124], "street": "Astoria Boulevard", "zipcode": "11369" }, "borough": "Queens", "cuisine": "American", "grades": [ { "date": {"$date": "2014-11-15T00:00:00.000Z"}, "grade": "Z", "score": 38 }, { "date": {"$date": "2014-05-02T00:00:00.000Z"}, "grade": "A", "score": 10 }, { "date": {"$date": "2013-03-02T00:00:00.000Z"}, "grade": "A", "score": 7 }, { "date": {"$date": "2012-02-10T00:00:00.000Z"}, "grade": "A", "score": 13 }], "name": "Brunos On The Boulevard", "restaurant_id": "40356151" }
sample_restaurants.neighborhoods
该集合包含纽约市各个社区的详细信息。每个文档包含社区的名称,以及一个包含社区形状的几何子文档。
这些坐标数组通常与 $geoWithin 操作符配合使用,以查询指定边界内的数据。
索引
sample_restaurants.neighborhoods 集合包含以下索引:
名称 | Index | 说明 |
|---|---|---|
|
|
|
文档样本
{ "geometry": { "coordinates": [[ [-73.94193078816193, 40.70072523469547], [-73.9443878859649, 40.70042452378256], [-73.94424286147482, 40.69969927964773], [-73.94409591260093, 40.69897295461309], [-73.94394947271304, 40.69822127983908], ... [-73.94193078816193, 40.70072523469547] ]]}, "name":"Bedford" }