How does mongodb query the intersection of two geographic polygons?

1. When querying according to the center point of the mesh, polygons occupy the mesh but do not contain the center point of the mesh, so the mesh information will not be matched.
2. So if you want to check the boundaries and polygons of the mesh, you are actually querying the intersection of two polygons to get the mesh information.

this code is based on the grid center point to query
db.grid.find ({loc: {$within: {$polygon: [[121.107353rep 30.849125], [121.107295pr 30.848955], [121.107649pr 30.849087]]})
the grid information cannot be found after the loc is changed into the grid boundary. Ask God for advice!

Mar.09,2021
Menu