I below scenario i am getting perfect result for mongo $geoIntersec query
But for below scenario where I am not getting result correct result in Mongo DB $geoIntersect query
I think mongo does not allow self intersetion which is indecated in image in red color.
Is there any other way to get result?
According to mongodb documentation it does not support intersecting polygons. What it supports are these
Kindly refer to this in case you need to know more
Well, yes Mongodb does not allow self-intersecting polygons. you can store them. but wont be able to perform any spatial indexing on them, or use $geointersects etc. You need to resolve the polygons first. There is a npm module for this turf-kinks
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.