Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • 1
    Any suggestion how I can do it fast and efficient when I have many points and many polygons? Looping over all is very costly. Commented Nov 8, 2020 at 6:05
  • You can use postgis to store your polygons and use one of the built-in functions of the server. Commented Nov 9, 2020 at 7:32
  • @mah65 If the distribution is very imbalanced (e.g. most points are in a few countries), ordering the polygons by order of most frequently seen can greatly increase performances. You can sample a number of random points from your data to find the most efficient ordering. Commented Apr 25, 2023 at 13:40