From 950170f9f428ef994ee3c51e143fdacfe4cdb74f Mon Sep 17 00:00:00 2001 From: Ju-gow Date: Tue, 2 Apr 2024 11:35:14 +0200 Subject: [PATCH] Geometry::fromArray, add $srid parameter --- src/Objects/Geometry.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Objects/Geometry.php b/src/Objects/Geometry.php index 864b8a8..d7ef0e7 100644 --- a/src/Objects/Geometry.php +++ b/src/Objects/Geometry.php @@ -126,11 +126,11 @@ public static function fromJson(string $geoJson, int|Srid $srid = 0): static * * @throws JsonException */ - public static function fromArray(array $geometry): static + public static function fromArray(array $geometry, int|Srid $srid = 0): static { $geoJson = json_encode($geometry, JSON_THROW_ON_ERROR); - return static::fromJson($geoJson); + return static::fromJson($geoJson, $srid); } /**