diff --git a/CHANGELOG.md b/CHANGELOG.md index 352e3c7..33354b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,9 +11,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Laravel 10 support - PHP 8.2 support +### Improved +- Optional geometry type param for ST_Buffer enabling easier control about metric buffering + ### Fixed - Typing bug when trying to use a Closure as Geoparam + + ## [1.0.2](https://github.com/clickbar/laravel-magellan/tree/1.0.2) - 2023-01-05 ### Fixed diff --git a/src/Database/PostgisFunctions/MagellanGeometryProcessingFunctions.php b/src/Database/PostgisFunctions/MagellanGeometryProcessingFunctions.php index 70732b3..f7523a6 100644 --- a/src/Database/PostgisFunctions/MagellanGeometryProcessingFunctions.php +++ b/src/Database/PostgisFunctions/MagellanGeometryProcessingFunctions.php @@ -33,7 +33,7 @@ trait MagellanGeometryProcessingFunctions * * @see https://postgis.net/docs/ST_Buffer.html */ - public static function buffer($geometry, float|Expression|\Closure $radius, ?int $numSegQuarterCircle = null, ?int $styleQuadSegs = null, ?EndCap $styleEndCap = null, ?Join $styleJoin = null, float|Expression|\Closure|null $styleMitreLevel = null, ?Side $styleSide = null): MagellanGeometryExpression + public static function buffer($geometry, float|Expression|\Closure $radius, ?int $numSegQuarterCircle = null, ?int $styleQuadSegs = null, ?EndCap $styleEndCap = null, ?Join $styleJoin = null, float|Expression|\Closure|null $styleMitreLevel = null, ?Side $styleSide = null, ?GeometryType $geometryType = null): MagellanGeometryExpression { $arguments = [ GeoParam::wrap($geometry), @@ -65,7 +65,7 @@ public static function buffer($geometry, float|Expression|\Closure $radius, ?int $arguments[] = $numSegQuarterCircle; } - return MagellanBaseExpression::geometry('ST_Buffer', $arguments, null); + return MagellanBaseExpression::geometry('ST_Buffer', $arguments, $geometryType); } /**