src/Processor/Polyline/SimplifyBearing.php 1 location
|
@@ 77-87 (lines=11) @@
|
74 |
|
|
75 |
|
$counterPoints = $geometry->getNumberOfPoints(); |
76 |
|
|
77 |
|
if ($geometry instanceof Polygon) { |
78 |
|
if ($counterPoints <= 3) { |
79 |
|
return clone $geometry; |
80 |
|
} |
81 |
|
$result = new Polygon(); |
82 |
|
} else { |
83 |
|
if ($counterPoints < 3) { |
84 |
|
return clone $geometry; |
85 |
|
} |
86 |
|
$result = new Polyline(); |
87 |
|
} |
88 |
|
|
89 |
|
$bearingCalc = new BearingEllipsoidal(); |
90 |
|
|
src/Processor/Polyline/SimplifyDouglasPeucker.php 1 location
|
@@ 74-84 (lines=11) @@
|
71 |
|
|
72 |
|
$counterPoints = $geometry->getNumberOfPoints(); |
73 |
|
|
74 |
|
if ($geometry instanceof Polygon) { |
75 |
|
if ($counterPoints <= 3) { |
76 |
|
return clone $geometry; |
77 |
|
} |
78 |
|
$result = new Polygon(); |
79 |
|
} else { |
80 |
|
if ($counterPoints < 3) { |
81 |
|
return clone $geometry; |
82 |
|
} |
83 |
|
$result = new Polyline(); |
84 |
|
} |
85 |
|
|
86 |
|
$simplifiedLine = $this->douglasPeucker($geometry->getPoints()); |
87 |
|
|