PHPackages                             phpmyadmin/shapefile - 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. phpmyadmin/shapefile

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

phpmyadmin/shapefile
====================

ESRI ShapeFile library for PHP

4.0.0(6mo ago)281.4M↓31.3%10[4 issues](https://github.com/phpmyadmin/shapefile/issues)1GPL-2.0-or-laterPHPPHP ^8.2CI passing

Since Jun 14Pushed 1mo ago6 watchersCompare

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

READMEChangelog (10)Dependencies (9)Versions (26)Used By (1)

shapefile
=========

[](#shapefile)

ShapeFile library for PHP

[![Test-suite](https://github.com/phpmyadmin/shapefile/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/phpmyadmin/shapefile/actions/workflows/tests.yml?query=branch%3Amaster)[![codecov.io](https://camo.githubusercontent.com/f7ec7739ad4966887e95c3e53be21db2f83cae0f2a661834e9c3a1b20700ec3f/68747470733a2f2f636f6465636f762e696f2f6769746875622f7068706d7961646d696e2f736861706566696c652f636f7665726167652e7376673f6272616e63683d6d6173746572)](https://codecov.io/github/phpmyadmin/shapefile?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/b031e03745d8fd4e046b54f680f231c54e35270bb39daebbe568bb6e24b866c7/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7068706d7961646d696e2f736861706566696c652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/phpmyadmin/shapefile/?branch=master)[![Packagist](https://camo.githubusercontent.com/7cfb7d45d7f1d357bd92b97da8efa75b27035b71447b55a5e1b79f5e80536093/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7068706d7961646d696e2f736861706566696c652e737667)](https://packagist.org/packages/phpmyadmin/shapefile)

Features
--------

[](#features)

This library supports the 2D and 3D variants, except MultiPatch, of the ShapeFile format as defined in . It can read and edit ShapeFiles and the associated information (DBF file). There are a lot of things that can be improved in the code, if you are interested in developing, helping with the documentation, making translations or offering new ideas please contact us.

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

[](#installation)

Please use [Composer](https://getcomposer.org/) to install:

```
composer require phpmyadmin/shapefile
```

To be able to read and write the associated DBF file you need the `dbase`extension:

```
pecl install dbase
echo "extension=dbase.so" > /etc/php8/conf.d/dbase.ini
```

Documentation
-------------

[](#documentation)

API documentation is available at .

Usage
-----

[](#usage)

To read a shape file:

```
use PhpMyAdmin\ShapeFile\ShapeFile;
use PhpMyAdmin\ShapeFile\ShapeType;

$shp = new ShapeFile(ShapeType::Null);
$shp->loadFromFile('path/file.*');
```

History
-------

[](#history)

This library is based on BytesFall ShapeFiles library written by Ovidio (ovidio AT users.sourceforge.net). It has been embedded in phpMyAdmin for years and slowly developed there. At one point people started to use our version rather than the original library and that was when we decided to make it a separate package.

###  Health Score

64

—

FairBetter than 99% of packages

Maintenance77

Regular maintenance activity

Popularity51

Moderate usage in the ecosystem

Community24

Small or concentrated contributor base

Maturity86

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 57.7% 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 ~142 days

Recently: every ~195 days

Total

25

Last Release

199d ago

Major Versions

0.13 → 1.02016-11-21

1.2 → 2.02017-01-23

2.1 → 3.0.02021-02-05

3.1.x-dev → 4.0.02025-10-31

PHP version history (4 changes)0.1PHP &gt;=5.4.0

3.0.0PHP ^7.1 || ^8.0

3.1.0PHP ^7.2 || ^8.0

4.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/2b390aa578181e22baeeb561a42eba29a6fdbbd360d3d967afc59cdb8ff98ef7?d=identicon)[phpmyadmin](/maintainers/phpmyadmin)

---

Top Contributors

[![nijel](https://avatars.githubusercontent.com/u/212189?v=4)](https://github.com/nijel "nijel (240 commits)")[![MauricioFauth](https://avatars.githubusercontent.com/u/120970?v=4)](https://github.com/MauricioFauth "MauricioFauth (80 commits)")[![williamdes](https://avatars.githubusercontent.com/u/7784660?v=4)](https://github.com/williamdes "williamdes (66 commits)")[![kamil-tekiela](https://avatars.githubusercontent.com/u/6583064?v=4)](https://github.com/kamil-tekiela "kamil-tekiela (8 commits)")[![ibennetch](https://avatars.githubusercontent.com/u/1443710?v=4)](https://github.com/ibennetch "ibennetch (6 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (6 commits)")[![JoolsMcFly](https://avatars.githubusercontent.com/u/4972399?v=4)](https://github.com/JoolsMcFly "JoolsMcFly (4 commits)")[![j0kan](https://avatars.githubusercontent.com/u/706442?v=4)](https://github.com/j0kan "j0kan (3 commits)")[![L6SmxP5](https://avatars.githubusercontent.com/u/10593895?v=4)](https://github.com/L6SmxP5 "L6SmxP5 (1 commits)")[![carusogabriel](https://avatars.githubusercontent.com/u/16328050?v=4)](https://github.com/carusogabriel "carusogabriel (1 commits)")[![liviuconcioiu](https://avatars.githubusercontent.com/u/25424343?v=4)](https://github.com/liviuconcioiu "liviuconcioiu (1 commits)")

---

Tags

dbfesriphpshapefilegeogeospatialShapefileshpdbfshapeESRI

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/phpmyadmin-shapefile/health.svg)

```
[![Health](https://phpackages.com/badges/phpmyadmin-shapefile/health.svg)](https://phpackages.com/packages/phpmyadmin-shapefile)
```

###  Alternatives

[gasparesganga/php-shapefile

PHP library to read and write ESRI Shapefiles, compatible with WKT and GeoJSON

1511.6M20](/packages/gasparesganga-php-shapefile)[jmikola/geojson

GeoJSON implementation for PHP

3109.0M77](/packages/jmikola-geojson)[mjaschen/phpgeo

Simple Yet Powerful Geo Library

1.6k8.6M22](/packages/mjaschen-phpgeo)[stevebauman/location

Retrieve a user's location by their IP Address

1.3k7.6M65](/packages/stevebauman-location)[geokit/geokit

Geo-Toolkit for PHP

251924.7k6](/packages/geokit-geokit)[brick/geo

GIS geometry library

245862.1k15](/packages/brick-geo)

PHPackages © 2026

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