I noticed while trying to perform a $geowithin query within MongoDB compass, mongo does not like it when you cross the polygon lines. See the picture below as an example followed by the error:
When drawing this sort of polygon where the lines cross, the general error presented is:
“An error occurred during schema analysis: Loop is not valid: Edges cross”
I understand the problem. But I would like to inquire if anyone can propose a workaround/solution to this?
I would assume, with my limited understanding, that you would break the polygon up into its constituent parts at the cross and then perform 2x separate queries?