PHPackages                             loveyu/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. loveyu/geophp

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

loveyu/geophp
=============

GeoPHP is a open-source native PHP library for doing geometry operations. It is written entirely in PHP and can therefore run on shared hosts. It can read and write a wide variety of formats: WKT (including EWKT), WKB (including EWKB), GeoJSON, KML, GPX, 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.

0.1.1(1y ago)014GPL-2 or New-BSDPHPPHP &gt;=8.1

Since Dec 17Pushed 1y agoCompare

[ Source](https://github.com/loveyu/geoPHP)[ Packagist](https://packagist.org/packages/loveyu/geophp)[ Docs](https://github.com/loveyu/geoPHP)[ RSS](/packages/loveyu-geophp/feed)WikiDiscussions master Synced 1mo ago

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

[geophp.net](https://geophp.net "GeoPHP homepage")

GeoPHP is a open-source native PHP library for doing geometry operations. It is written entirely in PHP and can therefore run on shared hosts. It can read and write a wide variety of formats: WKT (including EWKT), WKB (including EWKB), 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.

This project is currently looking for co-maintainers. If you think you can help out, please send me a message. Forks are also welcome, please issue pull requests and I will merge them into the main branch.

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

[](#getting-started)

- This project is fork from:
- This project enforces PHP code compatibility to PHP 8.1 and above, and **it has not yet completed all testing**.
- Read the API Reference at:
- Examples

    - Using geoPHP as a GIS format converter:
- Other Interesting Links:

    - Learn about GEOS integration at:

Example usage
-------------

[](#example-usage)

```
