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

ActiveLibrary

sw897/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.

1.0(8y ago)121GPL-2 or New-BSDPHPPHP &gt;=5.4.0

Since Nov 28Pushed 8y agoCompare

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

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

[![Build Status](https://camo.githubusercontent.com/d12b716167cf54918765e9cec4223c360ccf42ad4d1d1c946ba6766113f6c1cf/68747470733a2f2f7472617669732d63692e6f72672f7068617965732f67656f5048502e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/phayes/geoPHP)

[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)

- The lastest stable version can always be downloaded at:
- 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)

```
