ESRI ShapeFile library for PHP

Overview

shapefile

ShapeFile library for PHP

Test-suite codecov.io Scrutinizer Code Quality Packagist

Features

Currently the 2D and 3D variants except MultiPatch of the ShapeFile format as defined in https://www.esri.com/library/whitepapers/pdfs/shapefile.pdf. 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.

Installation

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 "extension=dbase.so" > /etc/php7/conf.d/dbase.ini

Documentation

The API documentation is available at https://develdocs.phpmyadmin.net/shapefile/.

Usage

To read shape file:

$shp = new \PhpMyAdmin\ShapeFile\ShapeFile(0);
$shp->loadFromFile('path/file.*');

History

This library is based on BytesFall ShapeFiles library written by Ovidio (ovidio AT users.sourceforge.net). 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.

Comments
  • Bug in Polygon/Polyline creation with multiple parts

    Bug in Polygon/Polyline creation with multiple parts

    _savePolyLineRecord() in src/ShapeRecord.php does not work for geometries that have more than one part to them. Please refer to page 14 of the Shapefile specification for details and an illustration of how the Parts field should be written. I've forked and fixed - 6492274.

    opened by L6SmxP5 4
  • Bump minimum version to PHP 7.1

    Bump minimum version to PHP 7.1

    Drop support for PHP 5.4, PHP 5.5, PHP 5.6, PHP 7.0 and HHVM.

    Since phpMyAdmin requires PHP 7.1, it makes sense to require PHP 7.1 for shapefile as well.

    opened by MauricioFauth 1
  • Replace apigen with Sami in CI

    Replace apigen with Sami in CI

    This has been already done on our server (see https://github.com/phpmyadmin/scripts/issues/11), so it doesn't make sense to test documentation build with apigen.

    If Sami supports some kind of lint mode, it should be enabled in the CI.

    opened by nijel 0
  • Scrutinizer Auto-Fixes

    Scrutinizer Auto-Fixes

    @nijel requested this pull request.

    It consists of patches automatically generated for this project on Scrutinizer: https://scrutinizer-ci.com/g/phpmyadmin/shapefile/

    opened by scrutinizer-auto-fixer 0
  • Scrutinizer Auto-Fixes

    Scrutinizer Auto-Fixes

    @nijel requested this pull request.

    It consists of patches automatically generated for this project on Scrutinizer: https://scrutinizer-ci.com/g/phpmyadmin/shapefile/

    opened by scrutinizer-auto-fixer 0
  • Scrutinizer Auto-Fixes

    Scrutinizer Auto-Fixes

    @nijel requested this pull request.

    It consists of patches automatically generated for this project on Scrutinizer: https://scrutinizer-ci.com/g/phpmyadmin/shapefile/

    opened by scrutinizer-auto-fixer 0
  • Scrutinizer Auto-Fixes

    Scrutinizer Auto-Fixes

    @nijel requested this pull request.

    It consists of patches automatically generated for this project on Scrutinizer: https://scrutinizer-ci.com/g/phpmyadmin/shapefile/

    opened by scrutinizer-auto-fixer 0
  • Scrutinizer Auto-Fixes

    Scrutinizer Auto-Fixes

    @nijel requested this pull request.

    It consists of patches automatically generated for this project on Scrutinizer: https://scrutinizer-ci.com/g/phpmyadmin/shapefile/

    opened by scrutinizer-auto-fixer 0
  • Scrutinizer Auto-Fixes

    Scrutinizer Auto-Fixes

    @nijel requested this pull request.

    It consists of patches automatically generated for this project on Scrutinizer: https://scrutinizer-ci.com/g/phpmyadmin/shapefile/

    opened by scrutinizer-auto-fixer 0
Releases(3.0.1)
Owner
phpMyAdmin
We're building phpMyAdmin, the most used MySQL management tool.
phpMyAdmin
Simple Yet Powerful Geo Library for PHP

phpgeo - A Simple Geo Library for PHP phpgeo provides abstractions to geographical coordinates (including support for different ellipsoids) and allows

Marcus Jaschen 1.4k Dec 27, 2022
Geo-related tools PHP 5.4+ library built atop Geocoder and React libraries

Geotools Geotools is a PHP geo-related library, built atop Geocoder and React libraries. Features Batch geocode & reverse geocoding request(s) in seri

The League of Extraordinary Packages 1.3k Dec 27, 2022
PHP library to access the OpenCage geocoding API

OpenCage Geocoding API Library for PHP A PHP library to use the OpenCage geocoding API. Build Status / Code Quality Overview This library attempts to

OpenCage GmbH 29 Nov 15, 2022
PHP library for determining the physical location of binaries

Bin Locator Library for searching binary files in the operating system. Requirements PHP >= 7.4 Installation Library is available as composer reposito

PHP FFI 8 Jul 27, 2022
PHP library to easily get static image from French Cadastral Government map with markers and lines.

PHP French Cadastral Map Static API PHP library to easily get static image from French Cadastral Government map with markers and lines. Map source : c

Franck Alary 6 Nov 29, 2022
PHP library to easily get static image from OpenStreetMap (OSM) with markers and lines.

PHP OpenStreetMap Static API PHP library to easily get static image from OpenStreetMap with markers and lines. ✨ Supporting ⭐ Star this repository to

Franck Alary 34 Jan 2, 2023
Official PHP library for IPinfo (IP geolocation and other types of IP data)

This is the official PHP client library for the IPinfo.io IP address API, allowing you to lookup your own IP address,

IPinfo 171 Jan 2, 2023
PHP extension for geospatial rendering with Mapnik

PHP7 Mapnik Introduction This project is an extension for PHP 7 that enables geospatial rendering with Mapnik. Create tile generation scripts, dynamic

Garrett Johnson 20 Dec 14, 2022
PHP Extension to handle common geospatial functions.

geospatial - PHP Geospatial Extension PHP Extension to handle common geospatial functions. The extension currently has implementations of the Haversin

PHP Geospatial, putting the Elephpant on your globe 56 Dec 29, 2022
GeoJSON implementation for PHP

GeoJson PHP Library This library implements the GeoJSON format specification. The GeoJson namespace includes classes for each data structure defined i

Jeremy Mikola 274 Dec 17, 2022
PHP Exif Library - library for reading and writing Exif headers in JPEG and TIFF files using PHP.

PEL: PHP Exif Library README file for PEL: PHP Exif Library. A library with support for reading and writing Exif headers in JPEG and TIFF images using

null 264 Dec 4, 2022
BeckhoffPLCSoapClient - SoapClient to communicate with BeckHoff PLC. Library made in PHP based on TcAdsWebService JavaScript Library.

BeckhoffPLCSoapClient - SoapClient to communicate with BeckHoff PLC. Library made in PHP based on TcAdsWebService JavaScript Library.

null 3 May 18, 2022
EmailReplyParser is a PHP library for parsing plain text email content, based on GitHub's email_reply_parser library written in Ruby

EmailReplyParser EmailReplyParser is a PHP library for parsing plain text email content, based on GitHub's email_reply_parser library written in Ruby.

William Durand 606 Dec 8, 2022
Library JGU is a website created for a university library system information. Made with PHP & TailwindCSS.

Library JGU Library JGU is a website created for a university library system information. Made with PHP & TailwindCSS. Key Features • How To Use • Rel

Azkazikna Ageung Laksana 23 Oct 7, 2022
Dobren Dragojević 6 Jun 11, 2023
ImageWorkshop is a PHP5.3+ library that helps you to manage images based on GD library

================================ ImageWorkshop class ================================ Summary and features Really flexible and easy-to-use PHP class t

Clément Guillemain 853 Dec 27, 2022
Image optimization / compression library. This library is able to optimize png, jpg and gif files in very easy and handy way. It uses optipng, pngquant, pngcrush, pngout, gifsicle, jpegoptim and jpegtran tools.

Image Optimizer This library is handy and very easy to use optimizer for image files. It uses optipng, pngquant, jpegoptim, svgo and few more librarie

Piotr Śliwa 879 Dec 30, 2022
This library extends the 'League OAuth2 Client' library to provide OpenID Connect Discovery support for supporting providers that expose a .well-known configuration endpoint.

OpenID Connect Discovery support for League - OAuth 2.0 Client This library extends the League OAuth2 Client library to provide OpenID Connect Discove

null 3 Jan 8, 2022
Laravel-Library-Management-system is nice to management library system...

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Eng Hasan Hajjar 2 Sep 30, 2022
A PHP string manipulation library with multibyte support. Compatible with PHP 5.4+, PHP 7+, and HHVM.

A PHP string manipulation library with multibyte support. Compatible with PHP 5.4+, PHP 7+, and HHVM. s('string')->toTitleCase()->ensureRight('y') ==

Daniel St. Jules 2.5k Dec 28, 2022