Skip to content

Commit

Permalink
Merge pull request #56 from cesarkohl/patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
saibotk authored Jul 6, 2023
2 parents eb17e22 + 0916950 commit 62cbce8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/IO/Parser/Geojson/GeojsonParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ public function parse($input): Geometry
'MultiPolygon' => $this->parseMultiPolygon($input['coordinates']),
'Point' => $this->parsePoint($input['coordinates']),
'Polygon' => $this->parsePolygon($input['coordinates']),
'GeometryCollection' => $this->parseGeomeryCollection($input),
'GeometryCollection' => $this->parseGeometryCollection($input),
'FeatureCollection' => throw new \RuntimeException('Invalid GeoJSON: The type FeatureCollection is not supported'),
default => throw new \RuntimeException("Invalid GeoJSON: Invalid GeoJSON type $type"),
};
}

protected function parseGeomeryCollection(array $geometryCollectionData): Geometry
protected function parseGeometryCollection(array $geometryCollectionData): Geometry
{
$geometries = $geometryCollectionData['geometries'];
$geometries = array_map(fn (array $geometry) => $this->parse($geometry), $geometries);
Expand Down

0 comments on commit 62cbce8

Please sign in to comment.