@@ -8,9 +8,8 @@ ShapeFile library for PHP
8
8
9
9
## Features
10
10
11
- Currently the 2D and 3D variants except MultiPatch of the ShapeFile format as
12
- defined in https://www.esri.com/library/whitepapers/pdfs/shapefile.pdf . The
13
- library currently supports reading and editing of ShapeFiles and the Associated
11
+ This library supports the 2D and 3D variants, except MultiPatch, of the ShapeFile format as
12
+ defined in https://www.esri.com/library/whitepapers/pdfs/shapefile.pdf . It can read and edit ShapeFiles and the associated
14
13
information (DBF file). There are a lot of things that can be improved in the
15
14
code, if you are interested in developing, helping with the documentation,
16
15
making translations or offering new ideas please contact us.
@@ -23,35 +22,37 @@ Please use [Composer][1] to install:
23
22
composer require phpmyadmin/shapefile
24
23
```
25
24
26
- To be able to read and write the associated DBF file, you need `` dbase ``
25
+ To be able to read and write the associated DBF file you need the `` dbase ``
27
26
extension:
28
27
29
28
``` sh
30
29
pecl install dbase
31
- echo " extension=dbase.so" > /etc/php7 /conf.d/dbase.ini
30
+ echo " extension=dbase.so" > /etc/php8 /conf.d/dbase.ini
32
31
```
33
32
34
33
## Documentation
35
34
36
- The API documentation is available at
35
+ API documentation is available at
37
36
< https://develdocs.phpmyadmin.net/shapefile/ > .
38
37
39
38
## Usage
40
39
41
- To read shape file:
40
+ To read a shape file:
42
41
43
42
``` php
44
- $shp = new \PhpMyAdmin\ShapeFile\ShapeFile(0);
43
+ use PhpMyAdmin\ShapeFile\ShapeFile;
44
+ use PhpMyAdmin\ShapeFile\ShapeType;
45
+
46
+ $shp = new ShapeFile(ShapeType::Null);
45
47
$shp->loadFromFile('path/file.*');
46
48
```
47
49
48
50
## History
49
51
50
52
This library is based on BytesFall ShapeFiles library written by Ovidio (ovidio
51
- AT users.sourceforge.net). The library has been embedded in phpMyAdmin for
53
+ AT users.sourceforge.net). It has been embedded in phpMyAdmin for
52
54
years and slowly developed there. At one point people started to use our
53
- version rather than the original library and that was the point we decided to
54
- make it separate package.
55
+ version rather than the original library and that was when we decided to
56
+ make it a separate package.
55
57
56
58
[ 1 ] :https://getcomposer.org/
57
-
0 commit comments