Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation updates #35

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ ShapeFile library for PHP

## 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
This library supports the 2D and 3D variants, except MultiPatch, of the ShapeFile format as
defined in https://www.esri.com/library/whitepapers/pdfs/shapefile.pdf. 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.
Expand All @@ -23,35 +22,37 @@ Please use [Composer][1] to install:
composer require phpmyadmin/shapefile
```

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

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

## Documentation

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

## Usage

To read shape file:
To read a shape file:

```php
$shp = new \PhpMyAdmin\ShapeFile\ShapeFile(0);
use PhpMyAdmin\ShapeFile\ShapeFile;
use PhpMyAdmin\ShapeFile\ShapeType;

$shp = new ShapeFile(ShapeType::Null);
$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
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 the point we decided to
make it separate package.
version rather than the original library and that was when we decided to
make it a separate package.

[1]:https://getcomposer.org/

Loading