# mjaschen/phpgeo

Simple Yet Powerful Geo Library for PHP

Repository: https://github.com/mjaschen/phpgeo
Canonical: https://ross.abutalabs.com/products/phpgeo
Homepage: https://phpgeo.marcusjaschen.de
Language: PHP
License: MIT
License Family: permissive
Topics: php, vincenty, polyline, area-calculator, coordinates, geofence, distance-calculation, gps, simplify, douglas-peucker, location, tracks, ellipsoid
Last push: 2026-08-06T05:33:29+00:00

## Health v2 (maintenance only)
Score: 75/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 96, release rhythm 35, longevity 100
- inputs: {"age_days": 4950, "days_push": 27, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1612, forks 198 (observed 2026-08-28T04:05:11.088052+00:00)

## What it is
phpgeo is a PHP library providing abstractions for geographical coordinates, polylines, polygons, and bounds with support for different ellipsoids. It enables high-precision calculations such as distances between points, track lengths, and geofence checks.

## Use cases
- calculate the distance between two GPS coordinates in PHP
- compute the length of a GPS track or polyline
- check whether a point is inside a polygon geofence
- simplify a GPS track with the Douglas-Peucker algorithm
- convert coordinates between formats and ellipsoids
- calculate the area of a polygon from coordinates

## When to choose
- you need precise geodesic distance calculations (Haversine/Vincenty) in a PHP project
- you work with GPS tracks, polylines, or polygons and need geometry helpers
- you want a lightweight, well-documented pure-PHP geo library with no heavy dependencies

## When to avoid
- you need a full geospatial database or spatial SQL features (use PostGIS instead)
- you need map rendering, tile servers, or routing engines
- your project runs on PHP below 8.2 without using an older library version

## Facets
- artifact type: library
- maturity: active
- function: geospatial, math
- domain: developer-tools
- platform: php
- tags: geo, distance-calculation, vincenty, polyline, geofence, gps-tracks, douglas-peucker, coordinates, maps

## Member repositories
- mjaschen/phpgeo (main) score 75

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:11.088052+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:51:10.424255+00:00, confidence not recorded.
  - readme: https://github.com/mjaschen/phpgeo (fetched 2026-08-28T04:05:11.088052+00:00, sha 174db0e29b12)
  - homepage: https://phpgeo.marcusjaschen.de (fetched 2026-08-29T11:23:06.119061+00:00, sha 41d5a05c3f90)
  - site_page: https://phpgeo.marcusjaschen.de/010_Installation (fetched 2026-08-29T11:23:06.121448+00:00, sha 7b78002d0df8)
- Data as of 2026-08-30T08:39:29.467469+00:00.
