PHPackages                             einarsrud/point-in-polygon - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. einarsrud/point-in-polygon

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

einarsrud/point-in-polygon
==========================

Point In Polygon

v1.0.2(5y ago)19.6k↑66.7%MITPHPPHP &gt;=5.4.0

Since Oct 27Pushed 5y ago1 watchersCompare

[ Source](https://github.com/einarsrud/point-in-polygon)[ Packagist](https://packagist.org/packages/einarsrud/point-in-polygon)[ Docs](https://github.com/einarsrud/point-in-polygon)[ RSS](/packages/einarsrud-point-in-polygon/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)DependenciesVersions (4)Used By (0)

Point In Polygon
================

[](#point-in-polygon)

An implementation of the Winding Number Algorithm. Used to check if a point is inside a polygon.

Installation
------------

[](#installation)

Install using Composer

```
$ composer require einarsrud/point-in-polygon
```

Usage
-----

[](#usage)

```
// Import the classes
use Raconteur\PointInPolygon\Polygon;
use Raconteur\PointInPolygon\Point;

// Create polygon points
$polygonPoints = [];
$polygonPoints[] = new Point(0, 0);
$polygonPoints[] = new Point(4, 0);
$polygonPoints[] = new Point(2, 4);
$polygonPoints[] = new Point(0, 4);

// Create a Polygon
$polygon = new Polygon($polygonPoints);

// Check if a Point is in a polygon
$pointInPolygon = $polygon->pointInPolygon(new Point(1,1));
```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

2022d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1460713?v=4)[Christopher Einarsrud](/maintainers/einarsrud)[@einarsrud](https://github.com/einarsrud)

---

Top Contributors

[![einarsrud](https://avatars.githubusercontent.com/u/1460713?v=4)](https://github.com/einarsrud "einarsrud (1 commits)")

### Embed Badge

![Health badge](/badges/einarsrud-point-in-polygon/health.svg)

```
[![Health](https://phpackages.com/badges/einarsrud-point-in-polygon/health.svg)](https://phpackages.com/packages/einarsrud-point-in-polygon)
```

###  Alternatives

[verbb/tablemaker

Create customizable and user-defined table fields.

40168.8k1](/packages/verbb-tablemaker)[seravo/wp-custom-bulk-actions

Custom bulk actions for any type of posts in WordPress.

6612.1k](/packages/seravo-wp-custom-bulk-actions)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
