PHPackages                             gally90/geophp - 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. gally90/geophp

ActiveLibrary

gally90/geophp
==============

PHP 8.3+ maintained fork of geoPHP for geometry operations and spatial format conversion.

v3.0.0(today)04↑2900%GPL-2.0-or-laterPHPPHP ^8.3CI passing

Since Jul 31Pushed todayCompare

[ Source](https://github.com/lgally/geoPHP)[ Packagist](https://packagist.org/packages/gally90/geophp)[ Docs](https://github.com/gally90/geoPHP)[ RSS](/packages/gally90-geophp/feed)WikiDiscussions development Synced today

READMEChangelog (1)Dependencies (5)Versions (2)Used By (0)

[![CI](https://github.com/gally90/geoPHP/actions/workflows/ci.yml/badge.svg?branch=development)](https://github.com/gally90/geoPHP/actions/workflows/ci.yml)

GeoPHP is a open-source native PHP library for doing geometry operations. It is a fork of famous [geoPHP](https://github.com/phayes/geoPHP) library by Patrick Hayes.

It is written entirely in PHP and can therefore run on shared hosts. It can read and write a wide variety of formats: WKT (EWKT), WKB (EWKB), TWKB, GeoJSON, KML, GPX, and GeoRSS. It works with all Simple-Feature geometries (Point, LineString, Polygon, GeometryCollection etc.) and can be used to get centroids, bounding-boxes, area, and a wide variety of other useful information.

GeoPHP also helpfully wraps the GEOS php extension so that applications can get a transparent performance increase when GEOS is installed on the server. When GEOS is installed, geoPHP also becomes fully compliant with the OpenGIS® Implementation Standard for Geographic information. With GEOS you get the full-set of openGIS functions in PHP like Union, IsWithin, Touches etc. This means that applications get a useful "core-set" of geometry operations that work in all environments, and an "extended-set"of operations for environments that have GEOS installed.

See the *getting started* section below for references and examples of everything that geoPHP can do.

Forks and contributions are welcome. Please open [issues](https://github.com/funiq/geoPHP/issues), send [pull](https://github.com/funiq/geoPHP/pulls) requests and I will merge them into the main branch.

Getting Started
---------------

[](#getting-started)

### Requirements

[](#requirements)

- PHP 8.3 or newer
- The DOM extension for XML-based formats such as GPX and KML

### Example usage

[](#example-usage)

```
