diff --git a/lib/geometry/Collection.class.php b/lib/geometry/Collection.class.php index dfacf37b..2b80ecad 100644 --- a/lib/geometry/Collection.class.php +++ b/lib/geometry/Collection.class.php @@ -231,7 +231,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; } @@ -290,7 +292,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; }