| Total Complexity | 5 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 8 | abstract class AbstractCylindricalEqualAreaProjection implements Projection |
||
| 9 | { |
||
| 10 | abstract public function getStandardParallelDegree(): float; |
||
| 11 | |||
| 12 | abstract public function getWidthToHeightAspectRatio(): float; |
||
| 13 | |||
| 14 | public function getX(Position $position): float |
||
| 15 | { |
||
| 16 | return (deg2rad($position->longitude) - 0) * cos(deg2rad($this->getStandardParallelDegree())); |
||
| 17 | } |
||
| 18 | |||
| 19 | public function getY(Position $position): float |
||
| 20 | { |
||
| 21 | return sin($position->latitude) / cos($this->getStandardParallelDegree()); |
||
| 22 | } |
||
| 23 | |||
| 24 | public function getMaxX(): float |
||
| 25 | { |
||
| 26 | return 360; |
||
| 27 | } |
||
| 28 | |||
| 29 | public function getMaxY(): float |
||
| 30 | { |
||
| 31 | return 700; |
||
| 32 | } |
||
| 33 | |||
| 34 | public function getMaxLatitude(): float |
||
| 37 | } |
||
| 38 | } |
||
| 39 |