MongoDB Geospatial Query Operators(地理数据请求)

NameDescription
$geoIntersectsSelects geometries that intersect with a GeoJSON geometry. The 2dsphere index supports $geoIntersects.
$geoWithinSelects geometries within a bounding GeoJSON geometry. The 2dsphere and 2d indexes support $geoWithin.
$nearReturns geospatial objects in proximity to a point. Requires a geospatial index. The 2dsphere and 2d indexes support $near.
$nearSphereReturns geospatial objects in proximity to a point on a sphere. Requires a geospatial index. The 2dsphere and 2d indexes support $nearSphere.
NameDescription
$boxSpecifies a rectangular box using legacy coordinate pairs for $geoWithin queries. The 2d index supports $box.
$centerSpecifies a circle using legacy coordinate pairs to $geoWithin queries when using planar geometry. The 2d index supports $center.
$centerSphereSpecifies a circle using either legacy coordinate pairs or GeoJSON format for $geoWithin queries when using spherical geometry. The 2dsphere and 2d indexes support $centerSphere.
$geometrySpecifies a geometry in GeoJSON format to geospatial query operators.
$maxDistanceSpecifies a maximum distance to limit the results of $near and $nearSphere queries. The 2dsphere and 2d indexes support $maxDistance.
$minDistanceSpecifies a minimum distance to limit the results of $near and $nearSphere queries. For use with 2dsphere index only.
$polygonSpecifies a polygon to using legacy coordinate pairs for $geoWithin queries. The 2d index supports $center.
$uniqueDocsDeprecated. Modifies a $geoWithin and $near queries to ensure that even if a document matches the query multiple times, the query returns the document once.

参考:
https://docs.mongodb.com/manual/reference/operator/query-geospatial/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值