# Efficiently check if points are contained in polygons

**URL:** <https://discourse.julialang.org/t/efficiently-check-if-points-are-contained-in-polygons/74415>\
**Category:** Geo\
**Tags:** question\
**Created:** [January 11, 2022, 5:50pm UTC](https://discourse.julialang.org/t/efficiently-check-if-points-are-contained-in-polygons/74415 "2022-01-11T17:50:09Z")\
**Posts on this page:** 1\
**Showing post:** 34

<div class="post-metadata">

**Author:** ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Post date:** [September 27, 2024, 9:15pm UTC](https://discourse.julialang.org/t/efficiently-check-if-points-are-contained-in-polygons/74415/34 "2024-09-27T21:15:34Z")

</div>

Update regarding the Meshes.jl comments above. It now has a very efficient multi-threaded algorithm for point in polygon by Hao et al:

> [@\[ANN\] Meshes.jl - Computational Geometry in Julia](https://discourse.julialang.org/t/ann-meshes-jl-computational-geometry-in-julia/53973/54):
>
> Quick updates: Addition of Wedge geometry as a 3-Polytope Discretization of Cylinder into Hexahedron and Wedge geometries [image] New sideof(point, ring) and point ∈ poly with Hao et al. algorithm, which we implemented with multiple-threads. Speedup of ~12x. The algorithm is quite robust, and can handle all sorts of degenerate cases in 2D polygonal areas: [image] Angles with explicit rad units: julia\> ∠(Vec(1, 0), Vec(0, 1)) 1.5707963267948966 rad Addition of various CRS for geo…

---

_[View the full topic](https://discourse.julialang.org/t/efficiently-check-if-points-are-contained-in-polygons/74415)._
