Skip to content

Commit

Permalink
Add support of ST_LineFromEncodedPolyline
Browse files Browse the repository at this point in the history
  • Loading branch information
ybert committed Sep 16, 2024
1 parent 8421042 commit 648f7e7
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,15 @@ public static function collect($geometryArrayOrSet): MagellanGeometryExpression
{
return MagellanBaseExpression::geometry('ST_Collect', [GeoParam::wrap($geometryArrayOrSet)]);
}

/**
* Creates a LineString from an Encoded Polyline string.
*
*
* @see https://postgis.net/docs/ST_LineFromEncodedPolyline.html
*/
public static function lineFromEncodedPolyline(string|Expression|\Closure $polyline, float|Expression|\Closure|null $precision = null): MagellanGeometryExpression
{
return MagellanBaseExpression::geometry('ST_LineFromEncodedPolyline', [$polyline, $precision]);
}
}

0 comments on commit 648f7e7

Please sign in to comment.