src/Processor/Polyline/SimplifyBearing.php 1 location
|
@@ 43-52 (lines=10) @@
|
40 |
|
* @return Polyline |
41 |
|
* @throws \RuntimeException |
42 |
|
*/ |
43 |
|
public function simplify(Polyline $polyline): Polyline |
44 |
|
{ |
45 |
|
$result = $this->simplifyGeometry($polyline); |
46 |
|
|
47 |
|
if (!($result instanceof Polyline)) { |
48 |
|
throw new \RuntimeException('Result is no Polyline', 4231694400); |
49 |
|
} |
50 |
|
|
51 |
|
return $result; |
52 |
|
} |
53 |
|
|
54 |
|
/** |
55 |
|
* Simplifies the given polyline |
src/Processor/Polyline/SimplifyDouglasPeucker.php 1 location
|
@@ 47-56 (lines=10) @@
|
44 |
|
* @return Polyline |
45 |
|
* @throws \RuntimeException |
46 |
|
*/ |
47 |
|
public function simplify(Polyline $polyline): Polyline |
48 |
|
{ |
49 |
|
$result = $this->simplifyGeometry($polyline); |
50 |
|
|
51 |
|
if (!($result instanceof Polyline)) { |
52 |
|
throw new \RuntimeException('Result is no Polyline', 9737647468); |
53 |
|
} |
54 |
|
|
55 |
|
return $result; |
56 |
|
} |
57 |
|
|
58 |
|
/** |
59 |
|
* This method is a workaround to allow simplifying polygons too. It'll be |