diff --git a/src/Geometry/Collection.php b/src/Geometry/Collection.php index 9ce907ea..0e39aea5 100644 --- a/src/Geometry/Collection.php +++ b/src/Geometry/Collection.php @@ -222,7 +222,9 @@ public function numPoints() { public function getPoints() { $points = array(); foreach ($this->components as $component) { - $points = array_merge($points, $component->getPoints()); + foreach ($component->getPoints() as $point) { + $points[] = $point; + } } return $points; } @@ -274,7 +276,9 @@ public function isSimple() { public function explode() { $parts = array(); foreach ($this->components as $component) { - $parts = array_merge($parts, $component->explode()); + foreach ($component->explode() as $subComponent) { + $parts[] = $subComponent; + } } return $parts; }