Skip to Main Content

MongoByte MongoDB Logo

Welcome to the new MongoDB Feedback Portal!

{Improvement: "Your idea"}
We’ve upgraded our system to better capture and act on your feedback.
Your feedback is meaningful and helps us build better products.

Status Submitted
Categories Database
Created by Guest
Created on Aug 5, 2020

Find all geoJSON points within a large collection of polygons. Reference collection in geoWithin.

I would like to be able to find all geoJSON points located within a collection of polygons. My personal goal is to find points located within earth's water bodies. The water bodies are located in their own collection while the geoJSON points are located in a separate collection within the same DB. Mongo's geoWithin function only lets me hard code the polygons, but I would like to reference a collection of polygons. See https://stackoverflow.com/questions/63162823/mongo-geowithin-error-polygon-coordinates-must-be-an-array
  • Attach files