Point in Polygon (HAO Algorithm)
JSON →point-in-polygon-hao is a small, specialized JavaScript library designed to determine if a given point lies inside a polygon. It is currently stable at version 1.2.4 and receives updates as needed for bug fixes and performance improvements, such as the recent v1.2.4 release addressing an edge intersection regression. A key differentiator is its reliance on the 'Optimal Reliable Point-in-Polygon Test' algorithm, which enables robust handling of complex geometries, including polygons with holes and degenerate or self-intersecting polygons, without being susceptible to common floating-point errors. Unlike some alternatives, it explicitly returns `0` for points lying directly on a polygon edge. The library strictly adheres to the GeoJSON polygon format, requiring the first and last coordinates of a ring to be identical, and does not support MultiPolygon inputs.
Traffic · last 30 days ↑200% vs prev 7d
top countries 🇺🇸 United States · 🇳🇴 Norway · 🇨🇦 Canada · 🇩🇪 Germany · 🇫🇷 France