v3.3.0
Added
Shapefile\Geometry\Linestringpublic methods:Shapefile\Geometry\Linestring::isClockwise()Shapefile\Geometry\Linestring::forceClockwise()Shapefile\Geometry\Linestring::forceCounterClockwise()Shapefile\Geometry\Linestring::forceClosedRing()
Shapefile\Geometry\Polygonpublic methods:Shapefile\Geometry\Polygon::isClockwise()Shapefile\Geometry\Polygon::isCounterClockwise()Shapefile\Geometry\Polygon::forceClockwise()Shapefile\Geometry\Polygon::forceCounterClockwise()Shapefile\Geometry\Polygon::forceClosedRings()
Shapefile\Geometry\MultiPolygonpublic 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\PolygonandShapefile\Geometry\MultiPolygonoptional constructor parameter$force_orientation.Shapefile\ShapefileReaderconstructor options:Shapefile::OPTION_POLYGON_CLOSED_RINGS_ACTIONShapefile::OPTION_POLYGON_ORIENTATION_READING_AUTOSENSEShapefile::OPTION_POLYGON_OUTPUT_ORIENTATION
- Action constants:
Shapefile::ACTION_IGNOREShapefile::ACTION_CHECKShapefile::ACTION_FORCE
- Polygon orientation constants:
Shapefile::ORIENTATION_CLOCKWISEShapefile::ORIENTATION_COUNTERCLOCKWISEShapefile::ORIENTATION_UNCHANGED
- Error types constants:
Shapefile::ERR_GEOM_RING_AREA_TOO_SMALLShapefile::ERR_GEOM_RING_NOT_ENOUGH_VERTICES
- Other constants:
Shapefile::UNDEFINED
- Library implements a fluent interface that allows method chaining.
Changed
Shapefile\Geometry\PolygonandShapefile\Geometry\MultiPolygonconstructor parameter$flag_enforce_closed_ringsis now$closed_ringsand acceptsShapefile::ACTION_IGNORE,Shapefile::ACTION_CHECKandShapefile::ACTION_FORCEvalues.- Code is now PSR-12 compliant
Deprecated
Shapefile\ShapefileReaderconstructor options that will disappear in the next releases:Shapefile::OPTION_ENFORCE_POLYGON_CLOSED_RINGS. UseShapefile::OPTION_POLYGON_CLOSED_RINGS_ACTIONinstead.Shapefile::OPTION_INVERT_POLYGONS_ORIENTATION. UseShapefile::OPTION_POLYGON_OUTPUT_ORIENTATIONinstead.
- Constants:
Shapefile::ERR_GEOM_POLYGON_AREA_TOO_SMALL. UseShapefile::ERR_GEOM_RING_AREA_TOO_SMALLinstead.Shapefile::ERR_GEOM_POLYGON_NOT_VALID. UseShapefile::ERR_GEOM_POLYGON_WRONG_ORIENTATIONinstead.
See release notes