Details
-
Bug
-
Resolution: Works as Designed
-
Major - P3
-
None
-
3.4.10
-
None
-
None
-
centos7
Description
mongodb version: rhel70-3.4.10。I have a polygon.
"loc:2dsphere".
|
[[[ 151.53203354373443 , 58.49758352997918 ] ,
|
[ 151.53203354373443 , 58.60891434369525] ,
|
[ 157.98703167431324 , 58.60891434369525 ] ,
|
[ 157.98703167431324 , 58.49758352997918 ],
|
[151.53203354373443 , 58.49758352997918]]]
|
Here's the query:
db.places.find({
|
loc: {
|
$geoWithin: {
|
$geometry: {
|
type: "Polygon",
|
coordinates: [
|
[
|
[151.53203354373443, 58.49758352997918],
|
[151.53203354373443, 58.60891434369525],
|
[157.98703167431324, 58.60891434369525],
|
[157.98703167431324, 58.49758352997918],
|
[151.53203354373443, 58.49758352997918]
|
]
|
]
|
}
|
}
|
}
|
})
|
There exists coordinates that are beyond the highest latitude, 58.60891434369525. For example:
[156.1194,58.638217],[156.1194,58.61],[156.51067,58.610183],[155.858483,58.618367],[155.858483,58.618367],[155.859767,58.618867],[153.55,58,616667]. They are not in the query area.
mongodb版本rhel70-3.4.10。我现在有一个多边形,"loc:2dsphere".
[[[ 151.53203354373443 , 58.49758352997918 ] ,
[ 151.53203354373443 , 58.60891434369525] ,
[ 157.98703167431324 , 58.60891434369525 ] ,
[ 157.98703167431324 , 58.49758352997918 ],
[151.53203354373443 , 58.49758352997918]]]
查询命令如下:
{{db.places.find( { loc :
{ $geoWithin :
{ $geometry :
} } } )}}
{{}}
查询结果中发现有不少坐标点纬度超过了该区域的最大纬度,58.60891434369525。例如:[156.1194,58.638217],[156.1194,58.61],[156.51067,58.610183],[155.858483,58.618367],[155.858483,58.618367],[155.859767,58.618867],[153.55,58,616667]等坐标点不在该区域范围内。{{}}
{{}}
{{}}
{{}}
{{}}
{{}}
{{}}
{{}}
{{}}
{{}}