Skip to content

v3.3.0

Choose a tag to compare

@gasparesganga gasparesganga released this 23 May 09:16
· 25 commits to master since this release

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.

See release notes