All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Bug in binary reading function causing issues with DBF fields size
- Reversed the orientation of inner and outer rings in GeoJSON output of Polygons and MultiPolygons, complying to section 3.1.6 of RFC 7946
- Fixed composer.json file. Since version 2.4.0 the library requires PHP 5.4+
- Public method
setDefaultGeometryFormat()
. It sets the default format for future calls togetRecord()
and use with the Iterator interface (foreach loop) GEOMETRY_GEOJSON_GEOMETRY
andGEOMETRY_GEOJSON_FEATURE
formats forgetRecord()
method
- Geometry return format types for
getRecord()
can be combined using bitwise Or operator|
- Default geometry return format for
getRecord()
method changed toShapeFile::GEOMETRY_ARRAY
GEOMETRY_BOTH
geometry return format forgetRecord()
method - Please update your code still relying on it
- Protected method
init()
allows the mainShapeFile
class to be easily extended using a custom constructor
- Some minor code abbelishments to better comply to PSR-2
- Capability to randomly access the shapefile records
- Implements the PHP Iterator interface
- Public method
getTotRecords()
. It provides the number of records in the shapefile - Public method
setCurrentRecord()
. It sets the current record pointer - Public method
getCurrentRecord()
. It gets the current record pointer - Error code 91: RECORD_INDEX_NOT_VALID
- Class constructor: SHX file is now required
- Handles eventual useless random bytes between records in the SHP file (using the SHX file for the correct offsets)
- Public method
getDBFFields()
. It provides the fields definition in the DBF file
- PHP 7 Uniform Variable Syntax bugfix in
getRecord()
method
- Support for Z and M shapes
- Native DBF reading capabilities (no dbase functions or external libraries required anymore)
FLAG_SUPPRESS_Z
andFLAG_SUPPRESS_M
flags for ShapeFile constructorGEOMETRY_BOTH
format forgetRecord()
methodShapeFile
namespace andShapeFileAutoloader
class- DBF error codes
41
and42
- CHANGELOG file
- Code is now php-fig PSR-1, PSR-2 and PSR-4 compliant
- PHP 7 compatible
- All strings read from DBF are returned already encoded in utf-8
- PHP XBase library dependency as dbase fallback
- It works on big-endian machines
- Public method
getPRJ()
. It provides the raw WKT from the .prj file if present - Composer.json
- Class constructor (you must update your code to explicitly pass the .dbf file path)
- Updated error codes
- Invalid polygons handling
First public release