muka/shape-reader
最新稳定版本:v1.0.5
Composer 安装命令:
composer require muka/shape-reader
包简介
A PHP library to parse ESRI Shape files
README 文档
README
A PHP library to parse ESRI Shape files.
Based on the great work of Juan Carlos Gonzalez Ulloa and David Granqvist
A copy of the original work is available at http://www.phpclasses.org/package/1741-PHP-Read-vectorial-data-from-geographic-shape-files.html
This library is meant to read vectorial information from shape files in the SHP format.
The SHP file format is an open standard for storing vectorial information that is used to distribute geographical information.
Plenty of commercial and open source applications are able to read from it.
Requirements
PHP version should be > 5.3.2
To open the DBF related database you need the dbase extension available as PECL package.
pecl install dbase
echo "extension=dbase.so" > /etc/php5/conf.d/dbase.ini
Usage
See examples folder for details.
$shpReader = new ShapeReader("./somewhere.shp");
$i = 0;
while ($record = $shpReader->getNext() and $i < 5) {
//Dump SHP information
$shp_data = $record->getData();
var_dump($shp_data);
//Dump DBF information
$dbf_data = $record->getDbfData();
var_dump($dbf_data);
$i++;
}
Changelog
2013-08-24 - Base refactor, added namespace support, composer and test cases
License
GNU General Public License http://opensource.org/licenses/GPL-2.0
统计信息
- 总下载量: 28.98k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 11
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: GPL
- 更新时间: 2015-04-28