mongodb 添加 2dsphere 索引,坐标会小数点后超过6位会四舍五入,导致坐标重复交叉
2dsphere 索引如下:
{
"gaodeRange" : "2dsphere"
}
坐标未四舍五入时:
[118.071926779891, 36.8293934415749],
[118.071895506574, 36.824322011486],
错误提示:
Edges 212 and 214 cross. Edge locations in degrees: [118.0719268, 36.8293934]-[118.0718955, 36.8243220] and [118.0718620, 36.8243290]-[118.0722120, 36.8242560]