LNG 180 的蒙戈误差 "out of bounds",纬度 68.9636



在MongoDB上收到以下错误:

error MongoError: longitude/latitude is out of bounds, lng: 180 lat: 68.9636
...
operationTime: Timestamp { _bsontype: 'Timestamp', low_: 1, high_: 1590391393 },
ok: 0,
errmsg: 'longitude/latitude is out of bounds, lng: 180 lat: 68.9636',
code: 2,
codeName: 'BadValue',
'$clusterTime': {
clusterTime: Timestamp { _bsontype: 'Timestamp', low_: 1, high_: 1590391393 },
signature: { hash: [Binary], keyId: 0 }
},
name: 'MongoError',
[Symbol(mongoErrorContextSymbol)]: {}

但是,边界应有效:

如果指定纬度和经度坐标,请列出经度 先后纬度:

有效的经度值介于 -180 和 180之间,包括 -180 和 180。有效 纬度值介于 -90 和 90 之间,包括 -90 和 90。

https://docs.mongodb.com/manual/reference/geojson/

作为参考,我的查询是

Profiles.find(
{
'features.geometry': {
$geoIntersects: {
$geometry: geometry
}
}
}
).fetch()

(使用流星(

甚至可以显示geometry: https://gist.github.com/oleg131/19b17e25670d6a54a176a5c670fd9ce5

有没有人看到看似有效的坐标出现此错误?

事实证明,某些要素的经度高于 180,在错误回溯中显示时,经度将四舍五入为 180。

最新更新