Skip to content

Commit

Permalink
useSpheroid is useless
Browse files Browse the repository at this point in the history
  • Loading branch information
ybert committed Sep 16, 2024
1 parent 41ee3fb commit bfdf863
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,8 @@ public static function lineMerge($geometry, bool|Expression|\Closure|null $direc
*
* @see https://postgis.net/docs/ST_LineSubstring.html
*/
public static function lineSubstring($geometry, float|Expression|\Closure $startFraction, float|Expression|\Closure $endFraction, bool|Expression|\Closure|null $useSpheroid = null, ?GeometryType $geometryType = null): MagellanGeometryExpression
public static function lineSubstring($geometry, float|Expression|\Closure $startFraction, float|Expression|\Closure $endFraction, ?GeometryType $geometryType = null): MagellanGeometryExpression
{
if ($geometryType === null && $useSpheroid !== null) {
$geometryType = GeometryType::Geography;
}

return MagellanBaseExpression::geometry('ST_LineSubstring', [GeoParam::wrap($geometry), $startFraction, $endFraction], $geometryType);
}

Expand Down

0 comments on commit bfdf863

Please sign in to comment.