diff --git a/CHANGELOG.md b/CHANGELOG.md index 3948ed9..f0f432b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,60 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this project adheres to [Semantic Versioning](https://semver.org/). +## v3.3.0 - 2020-05-23 +### Added +- `Shapefile\Geometry\Linestring` public methods: + - `Shapefile\Geometry\Linestring::isClockwise()` + - `Shapefile\Geometry\Linestring::forceClockwise()` + - `Shapefile\Geometry\Linestring::forceCounterClockwise()` + - `Shapefile\Geometry\Linestring::forceClosedRing()` +- `Shapefile\Geometry\Polygon` public methods: + - `Shapefile\Geometry\Polygon::isClockwise()` + - `Shapefile\Geometry\Polygon::isCounterClockwise()` + - `Shapefile\Geometry\Polygon::forceClockwise()` + - `Shapefile\Geometry\Polygon::forceCounterClockwise()` + - `Shapefile\Geometry\Polygon::forceClosedRings()` +- `Shapefile\Geometry\MultiPolygon` public methods: + - `Shapefile\Geometry\MultiPolygon::isClockwise()` + - `Shapefile\Geometry\MultiPolygon::isCounterClockwise()` + - `Shapefile\Geometry\MultiPolygon::forceClockwise()` + - `Shapefile\Geometry\MultiPolygon::forceCounterClockwise()` + - `Shapefile\Geometry\MultiPolygon::forceClosedRings()` +- `Shapefile\Geometry\GeometryCollection::reverseGeometries()` protected method. +- `Shapefile\Geometry\Polygon` and `Shapefile\Geometry\MultiPolygon` optional constructor parameter `$force_orientation`. +- `Shapefile\ShapefileReader` constructor options: + - `Shapefile::OPTION_POLYGON_CLOSED_RINGS_ACTION` + - `Shapefile::OPTION_POLYGON_ORIENTATION_READING_AUTOSENSE` + - `Shapefile::OPTION_POLYGON_OUTPUT_ORIENTATION` +- Action constants: + - `Shapefile::ACTION_IGNORE` + - `Shapefile::ACTION_CHECK` + - `Shapefile::ACTION_FORCE` + - Polygon orientation constants: + - `Shapefile::ORIENTATION_CLOCKWISE` + - `Shapefile::ORIENTATION_COUNTERCLOCKWISE` + - `Shapefile::ORIENTATION_UNCHANGED` +- Error types constants: + - `Shapefile::ERR_GEOM_RING_AREA_TOO_SMALL` + - `Shapefile::ERR_GEOM_RING_NOT_ENOUGH_VERTICES` +- Other constants: + - `Shapefile::UNDEFINED` +- Library implements a *fluent interface* that allows method chaining. + +### Changed +- `Shapefile\Geometry\Polygon` and `Shapefile\Geometry\MultiPolygon` constructor parameter `$flag_enforce_closed_rings` is now `$closed_rings` and accepts `Shapefile::ACTION_IGNORE`, `Shapefile::ACTION_CHECK` and `Shapefile::ACTION_FORCE` values. +- Code is now PSR-12 compliant + +### Deprecated +- `Shapefile\ShapefileReader` constructor options that will disappear in the next releases: + - `Shapefile::OPTION_ENFORCE_POLYGON_CLOSED_RINGS`. Use `Shapefile::OPTION_POLYGON_CLOSED_RINGS_ACTION` instead. + - `Shapefile::OPTION_INVERT_POLYGONS_ORIENTATION`. Use `Shapefile::OPTION_POLYGON_OUTPUT_ORIENTATION` instead. +- Constants: + - `Shapefile::ERR_GEOM_POLYGON_AREA_TOO_SMALL`. Use `Shapefile::ERR_GEOM_RING_AREA_TOO_SMALL` instead. + - `Shapefile::ERR_GEOM_POLYGON_NOT_VALID`. Use `Shapefile::ERR_GEOM_POLYGON_WRONG_ORIENTATION` instead. + + + ## v3.2.0 - 2020-04-09 ### Added - `Shapefile::OPTION_DBF_ALLOW_FIELD_SIZE_255` constructor option for both `ShapefileReader` and `ShapefileWriter` classes @@ -250,7 +304,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/). - Protected method `init()` allows the main `ShapeFile` class to be easily extended using a custom constructor ### Fixed -- Some minor code abbelishments to better comply to PSR-2 +- Some minor code embellishments to better comply to PSR-2 diff --git a/VERSION b/VERSION index a4f52a5..0fa4ae4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.2.0 \ No newline at end of file +3.3.0 \ No newline at end of file diff --git a/src/Shapefile/Geometry/Geometry.php b/src/Shapefile/Geometry/Geometry.php index 79bdf91..cd1de2a 100644 --- a/src/Shapefile/Geometry/Geometry.php +++ b/src/Shapefile/Geometry/Geometry.php @@ -5,7 +5,7 @@ * * @package Shapefile * @author Gaspare Sganga - * @version 3.2.0 + * @version 3.3.0 * @license MIT * @link https://gasparesganga.com/labs/php-shapefile/ */ diff --git a/src/Shapefile/Geometry/GeometryCollection.php b/src/Shapefile/Geometry/GeometryCollection.php index d5a7885..c8506d3 100644 --- a/src/Shapefile/Geometry/GeometryCollection.php +++ b/src/Shapefile/Geometry/GeometryCollection.php @@ -5,7 +5,7 @@ * * @package Shapefile * @author Gaspare Sganga - * @version 3.2.0 + * @version 3.3.0 * @license MIT * @link https://gasparesganga.com/labs/php-shapefile/ */ diff --git a/src/Shapefile/Geometry/Linestring.php b/src/Shapefile/Geometry/Linestring.php index cdf7f92..a9fee1d 100644 --- a/src/Shapefile/Geometry/Linestring.php +++ b/src/Shapefile/Geometry/Linestring.php @@ -5,7 +5,7 @@ * * @package Shapefile * @author Gaspare Sganga - * @version 3.2.0 + * @version 3.3.0 * @license MIT * @link https://gasparesganga.com/labs/php-shapefile/ */ diff --git a/src/Shapefile/Geometry/MultiLinestring.php b/src/Shapefile/Geometry/MultiLinestring.php index c303e80..9f1be34 100644 --- a/src/Shapefile/Geometry/MultiLinestring.php +++ b/src/Shapefile/Geometry/MultiLinestring.php @@ -5,7 +5,7 @@ * * @package Shapefile * @author Gaspare Sganga - * @version 3.2.0 + * @version 3.3.0 * @license MIT * @link https://gasparesganga.com/labs/php-shapefile/ */ diff --git a/src/Shapefile/Geometry/MultiPoint.php b/src/Shapefile/Geometry/MultiPoint.php index b6006f9..e051af7 100644 --- a/src/Shapefile/Geometry/MultiPoint.php +++ b/src/Shapefile/Geometry/MultiPoint.php @@ -5,7 +5,7 @@ * * @package Shapefile * @author Gaspare Sganga - * @version 3.2.0 + * @version 3.3.0 * @license MIT * @link https://gasparesganga.com/labs/php-shapefile/ */ diff --git a/src/Shapefile/Geometry/MultiPolygon.php b/src/Shapefile/Geometry/MultiPolygon.php index 67417dd..ee63370 100644 --- a/src/Shapefile/Geometry/MultiPolygon.php +++ b/src/Shapefile/Geometry/MultiPolygon.php @@ -5,7 +5,7 @@ * * @package Shapefile * @author Gaspare Sganga - * @version 3.2.0 + * @version 3.3.0 * @license MIT * @link https://gasparesganga.com/labs/php-shapefile/ */ diff --git a/src/Shapefile/Geometry/Point.php b/src/Shapefile/Geometry/Point.php index 59829bd..feb4eb9 100644 --- a/src/Shapefile/Geometry/Point.php +++ b/src/Shapefile/Geometry/Point.php @@ -5,7 +5,7 @@ * * @package Shapefile * @author Gaspare Sganga - * @version 3.2.0 + * @version 3.3.0 * @license MIT * @link https://gasparesganga.com/labs/php-shapefile/ */ diff --git a/src/Shapefile/Geometry/Polygon.php b/src/Shapefile/Geometry/Polygon.php index 2932d88..b41c41c 100644 --- a/src/Shapefile/Geometry/Polygon.php +++ b/src/Shapefile/Geometry/Polygon.php @@ -5,7 +5,7 @@ * * @package Shapefile * @author Gaspare Sganga - * @version 3.2.0 + * @version 3.3.0 * @license MIT * @link https://gasparesganga.com/labs/php-shapefile/ */ diff --git a/src/Shapefile/Shapefile.php b/src/Shapefile/Shapefile.php index 804c02a..3c65182 100644 --- a/src/Shapefile/Shapefile.php +++ b/src/Shapefile/Shapefile.php @@ -5,7 +5,7 @@ * * @package Shapefile * @author Gaspare Sganga - * @version 3.2.0 + * @version 3.3.0 * @license MIT * @link https://gasparesganga.com/labs/php-shapefile/ */ diff --git a/src/Shapefile/ShapefileAutoloader.php b/src/Shapefile/ShapefileAutoloader.php index ad0a4cf..83c29d5 100644 --- a/src/Shapefile/ShapefileAutoloader.php +++ b/src/Shapefile/ShapefileAutoloader.php @@ -5,7 +5,7 @@ * * @package Shapefile * @author Gaspare Sganga - * @version 3.2.0 + * @version 3.3.0 * @license MIT * @link https://gasparesganga.com/labs/php-shapefile/ */ diff --git a/src/Shapefile/ShapefileException.php b/src/Shapefile/ShapefileException.php index 57920d9..b27cf92 100644 --- a/src/Shapefile/ShapefileException.php +++ b/src/Shapefile/ShapefileException.php @@ -5,7 +5,7 @@ * * @package Shapefile * @author Gaspare Sganga - * @version 3.2.0 + * @version 3.3.0 * @license MIT * @link https://gasparesganga.com/labs/php-shapefile/ */ diff --git a/src/Shapefile/ShapefileReader.php b/src/Shapefile/ShapefileReader.php index 87b9b45..49d1c47 100644 --- a/src/Shapefile/ShapefileReader.php +++ b/src/Shapefile/ShapefileReader.php @@ -5,7 +5,7 @@ * * @package Shapefile * @author Gaspare Sganga - * @version 3.2.0 + * @version 3.3.0 * @license MIT * @link https://gasparesganga.com/labs/php-shapefile/ */ diff --git a/src/Shapefile/ShapefileWriter.php b/src/Shapefile/ShapefileWriter.php index 70bf251..7fe3f2c 100644 --- a/src/Shapefile/ShapefileWriter.php +++ b/src/Shapefile/ShapefileWriter.php @@ -5,7 +5,7 @@ * * @package Shapefile * @author Gaspare Sganga - * @version 3.2.0 + * @version 3.3.0 * @license MIT * @link https://gasparesganga.com/labs/php-shapefile/ */