Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(mitreLimit): Rename wrongly named mitre limit param #114

Merged
merged 1 commit into from
Dec 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(mitreLimit): Rename wrongly named mitre limit param
This was wrongly called `mitre_level`. It is currently called `mitre_limit` in the PostGIS documentation.

See https://postgis.net/docs/ST_OffsetCurve.html
  • Loading branch information
saibotk committed Dec 27, 2024
commit e39c558a9a06d57ff08c7c10b6167fcde22f9890
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed `Expression` types in SRID-related functions
- Fixed missing schema prefix for generated SQL of first-level `ST` functions
- Fixed numeric SRID queries in `ST::transform` and `ST::setSRID` (thanks @BezBIS #91)
- Fixed `ST::buffer` & `ST:offsetCurve`: Correctly renamed `styleMitreLevel` to `styleMitreLimit`

## [1.6.1](https://github.com/clickbar/laravel-magellan/tree/1.6.1) - 2024-08-08

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,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, ?GeometryType $geometryType = 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 $styleMitreLimit = null, ?Side $styleSide = null, ?GeometryType $geometryType = null): MagellanGeometryExpression
{
$arguments = [
GeoParam::wrap($geometry),
Expand All @@ -36,7 +36,7 @@ public static function buffer($geometry, float|Expression|\Closure $radius, ?int
"quad_segs=$styleQuadSegs",
"endcap=$styleEndCap?->value",
"join=$styleJoin?->value",
"mitre_level=$styleMitreLevel",
"mitre_limit=$styleMitreLimit",
"side=$styleSide?->value",
];

Expand Down Expand Up @@ -242,7 +242,7 @@ public static function orientedEnvelope($geometry): MagellanGeometryExpression
*
* @see https://postgis.net/docs/ST_OffsetCurve.html
*/
public static function offsetCurve($geometry, float|Expression|\Closure $signedDistance, int|Expression|\Closure|null $numSegQuarterCircle = null, ?Join $styleJoin = null, float|Expression|\Closure|null $styleMitreLevel = null): MagellanGeometryExpression
public static function offsetCurve($geometry, float|Expression|\Closure $signedDistance, int|Expression|\Closure|null $numSegQuarterCircle = null, ?Join $styleJoin = null, float|Expression|\Closure|null $styleMitreLimit = null): MagellanGeometryExpression
{
$arguments = [
GeoParam::wrap($geometry),
Expand All @@ -252,7 +252,7 @@ public static function offsetCurve($geometry, float|Expression|\Closure $signedD
$styleParts = [
"quad_segs=$numSegQuarterCircle",
"join=$styleJoin?->value",
"mitre_level=$styleMitreLevel",
"mitre_limit=$styleMitreLimit",
];

$styleParameter = collect($styleParts)
Expand Down
Loading