ESRI ShapeFile library for PHP

3.0.2 2023-09-11 17:57 UTC

This package is auto-updated.

Last update: 2024-05-19 15:43:44 UTC


ShapeFile library for PHP

Test-suite Scrutinizer Code Quality Packagist


Currently the 2D and 3D variants except MultiPatch of the ShapeFile format as defined in The library currently supports reading and editing of 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.


Please use Composer to install:

composer require phpmyadmin/shapefile

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

pecl install dbase
echo "" > /etc/php7/conf.d/dbase.ini


The API documentation is available at


To read shape file:

$shp = new \PhpMyAdmin\ShapeFile\ShapeFile(0);


This library is based on BytesFall ShapeFiles library written by Ovidio (ovidio AT The library 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 the point we decided to make it separate package.