From cd5a15856680ee559ee9f2c1cf52e35a63e44740 Mon Sep 17 00:00:00 2001 From: Marcus Jaschen Date: Fri, 22 Mar 2019 08:13:19 +0100 Subject: [PATCH] remove file-level docblocks --- src/Bearing/BearingEllipsoidal.php | 46 ++++++++----------- src/Bearing/BearingInterface.php | 15 ++++-- src/Bearing/BearingSpherical.php | 26 ++++------- src/Bearing/DirectVincentyBearing.php | 12 +---- src/Bearing/InverseVincentyBearing.php | 12 +---- src/Bounds.php | 4 +- src/Coordinate.php | 12 +---- src/Distance/DistanceInterface.php | 12 +---- src/Distance/Haversine.php | 16 ++----- src/Distance/Vincenty.php | 14 +----- src/Ellipsoid.php | 12 +---- src/Factory/CoordinateFactory.php | 12 +---- src/Factory/GeometryFactoryInterface.php | 12 +---- src/Formatter/Coordinate/DMS.php | 12 +---- src/Formatter/Coordinate/DecimalDegrees.php | 12 +---- src/Formatter/Coordinate/DecimalMinutes.php | 12 +---- .../Coordinate/FormatterInterface.php | 12 +---- src/Formatter/Coordinate/GeoJSON.php | 12 +---- src/Formatter/Polygon/FormatterInterface.php | 15 +----- src/Formatter/Polygon/GeoJSON.php | 12 +---- src/Formatter/Polyline/FormatterInterface.php | 12 +---- src/Formatter/Polyline/GeoJSON.php | 14 +----- src/Line.php | 30 ++++-------- src/Polygon.php | 17 +------ src/Polyline.php | 14 +----- src/Processor/Polyline/SimplifyBearing.php | 14 +----- .../Polyline/SimplifyDouglasPeucker.php | 29 ++++-------- src/Processor/Polyline/SimplifyInterface.php | 14 +----- src/Utility/PerpendicularDistance.php | 12 +---- 29 files changed, 87 insertions(+), 361 deletions(-) diff --git a/src/Bearing/BearingEllipsoidal.php b/src/Bearing/BearingEllipsoidal.php index eb7e7e3..b979f0a 100644 --- a/src/Bearing/BearingEllipsoidal.php +++ b/src/Bearing/BearingEllipsoidal.php @@ -1,32 +1,22 @@ - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo - */ - namespace Location\Bearing; +use InvalidArgumentException; use Location\Coordinate; use Location\Exception\NotConvergingException; /** * Calculation of bearing between two points using a - * ellipsoidal model of the earth + * ellipsoidal model of the earth. * - * @author Marcus Jaschen - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo + * This class is based on the awesome work Chris Veness + * has done. For more information visit the following URL. + * + * @see http://www.movable-type.co.uk/scripts/latlong-vincenty.html + * + * @author Marcus Jaschen */ class BearingEllipsoidal implements BearingInterface { @@ -34,8 +24,8 @@ class BearingEllipsoidal implements BearingInterface * This method calculates the initial bearing between the * two points. * - * @param \Location\Coordinate $point1 - * @param \Location\Coordinate $point2 + * @param Coordinate $point1 + * @param Coordinate $point2 * * @return float Bearing Angle */ @@ -47,8 +37,8 @@ public function calculateBearing(Coordinate $point1, Coordinate $point2): float /** * Calculates the final bearing between the two points. * - * @param \Location\Coordinate $point1 - * @param \Location\Coordinate $point2 + * @param Coordinate $point1 + * @param Coordinate $point2 * * @return float */ @@ -61,7 +51,7 @@ public function calculateFinalBearing(Coordinate $point1, Coordinate $point2): f * Calculates a destination point for the given point, bearing angle, * and distance. * - * @param \Location\Coordinate $point + * @param Coordinate $point * @param float $bearing the bearing angle between 0 and 360 degrees * @param float $distance the distance to the destination point in meters * @@ -77,13 +67,13 @@ public function calculateDestination(Coordinate $point, float $bearing, float $d * The method expects a starting point point, the bearing angle, * and the distance to destination. * - * @param \Location\Coordinate $point + * @param Coordinate $point * @param float $bearing * @param float $distance * * @return float * - * @throws \Location\Exception\NotConvergingException + * @throws NotConvergingException */ public function calculateDestinationFinalBearing(Coordinate $point, float $bearing, float $distance): float { @@ -97,8 +87,8 @@ public function calculateDestinationFinalBearing(Coordinate $point, float $beari * * @return DirectVincentyBearing * - * @throws \Location\Exception\NotConvergingException - * @throws \InvalidArgumentException + * @throws NotConvergingException + * @throws InvalidArgumentException */ private function directVincenty(Coordinate $point, float $bearing, float $distance): DirectVincentyBearing { @@ -162,7 +152,7 @@ private function directVincenty(Coordinate $point, float $bearing, float $distan * * @return InverseVincentyBearing * - * @throws \Location\Exception\NotConvergingException + * @throws NotConvergingException */ private function inverseVincenty(Coordinate $point1, Coordinate $point2): InverseVincentyBearing { diff --git a/src/Bearing/BearingInterface.php b/src/Bearing/BearingInterface.php index 1127066..23619b7 100644 --- a/src/Bearing/BearingInterface.php +++ b/src/Bearing/BearingInterface.php @@ -5,14 +5,19 @@ use Location\Coordinate; +/** + * Interface BearingInterface + * + * @author Marcus Jaschen + */ interface BearingInterface { /** * This method calculates the initial bearing between the * two points. * - * @param \Location\Coordinate $point1 - * @param \Location\Coordinate $point2 + * @param Coordinate $point1 + * @param Coordinate $point2 * * @return float Bearing Angle */ @@ -21,8 +26,8 @@ public function calculateBearing(Coordinate $point1, Coordinate $point2): float; /** * Calculates the final bearing between the two points. * - * @param \Location\Coordinate $point1 - * @param \Location\Coordinate $point2 + * @param Coordinate $point1 + * @param Coordinate $point2 * * @return float */ @@ -32,7 +37,7 @@ public function calculateFinalBearing(Coordinate $point1, Coordinate $point2): f * Calculates a destination point for the given point, bearing angle, * and distance. * - * @param \Location\Coordinate $point + * @param Coordinate $point * @param float $bearing the bearing angle between 0 and 360 degrees * @param float $distance the distance to the destination point in meters * diff --git a/src/Bearing/BearingSpherical.php b/src/Bearing/BearingSpherical.php index 60cf49c..8a9776c 100644 --- a/src/Bearing/BearingSpherical.php +++ b/src/Bearing/BearingSpherical.php @@ -1,26 +1,16 @@ - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo - */ - namespace Location\Bearing; +use InvalidArgumentException; use Location\Coordinate; /** * Calculation of bearing between two points using a * simple spherical model of the earth. * - * @author Marcus Jaschen - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo + * @author Marcus Jaschen */ class BearingSpherical implements BearingInterface { @@ -33,8 +23,8 @@ class BearingSpherical implements BearingInterface * This method calculates the initial bearing between the * two points. * - * @param \Location\Coordinate $point1 - * @param \Location\Coordinate $point2 + * @param Coordinate $point1 + * @param Coordinate $point2 * * @return float Bearing Angle */ @@ -60,8 +50,8 @@ public function calculateBearing(Coordinate $point1, Coordinate $point2): float /** * Calculates the final bearing between the two points. * - * @param \Location\Coordinate $point1 - * @param \Location\Coordinate $point2 + * @param Coordinate $point1 + * @param Coordinate $point2 * * @return float */ @@ -76,12 +66,12 @@ public function calculateFinalBearing(Coordinate $point1, Coordinate $point2): f * Calculates a destination point for the given point, bearing angle, * and distance. * - * @param \Location\Coordinate $point + * @param Coordinate $point * @param float $bearing the bearing angle between 0 and 360 degrees * @param float $distance the distance to the destination point in meters * * @return Coordinate - * @throws \InvalidArgumentException + * @throws InvalidArgumentException */ public function calculateDestination(Coordinate $point, float $bearing, float $distance): Coordinate { diff --git a/src/Bearing/DirectVincentyBearing.php b/src/Bearing/DirectVincentyBearing.php index a2d58cf..48c4412 100644 --- a/src/Bearing/DirectVincentyBearing.php +++ b/src/Bearing/DirectVincentyBearing.php @@ -1,14 +1,6 @@ - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo - */ - namespace Location\Bearing; use Location\Coordinate; @@ -16,9 +8,7 @@ /** * Value object for a "Direct Vincenty" bearing calculation result. * - * @author Marcus Jaschen - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo + * @author Marcus Jaschen */ class DirectVincentyBearing { diff --git a/src/Bearing/InverseVincentyBearing.php b/src/Bearing/InverseVincentyBearing.php index 2721dbb..db86545 100644 --- a/src/Bearing/InverseVincentyBearing.php +++ b/src/Bearing/InverseVincentyBearing.php @@ -1,22 +1,12 @@ - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo - */ - namespace Location\Bearing; /** * Value object for a "Direct Vincenty" bearing calculation result. * - * @author Marcus Jaschen - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo + * @author Marcus Jaschen */ class InverseVincentyBearing { diff --git a/src/Bounds.php b/src/Bounds.php index 29f9c08..e19b62e 100644 --- a/src/Bounds.php +++ b/src/Bounds.php @@ -6,9 +6,7 @@ /** * Coordinate Bounds Class * - * @author Marcus Jaschen - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo + * @author Marcus Jaschen */ class Bounds { diff --git a/src/Coordinate.php b/src/Coordinate.php index df10fcd..4233b36 100644 --- a/src/Coordinate.php +++ b/src/Coordinate.php @@ -1,14 +1,6 @@ - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo - */ - namespace Location; use Location\Distance\DistanceInterface; @@ -17,9 +9,7 @@ /** * Coordinate Implementation * - * @author Marcus Jaschen - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo + * @author Marcus Jaschen */ class Coordinate implements GeometryInterface { diff --git a/src/Distance/DistanceInterface.php b/src/Distance/DistanceInterface.php index c37074d..1adb035 100644 --- a/src/Distance/DistanceInterface.php +++ b/src/Distance/DistanceInterface.php @@ -1,14 +1,6 @@ - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo - */ - namespace Location\Distance; use Location\Coordinate; @@ -16,9 +8,7 @@ /** * Interface for Distance Calculator Classes * - * @author Marcus Jaschen - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo + * @author Marcus Jaschen */ interface DistanceInterface { diff --git a/src/Distance/Haversine.php b/src/Distance/Haversine.php index 9c850ea..15b2d33 100644 --- a/src/Distance/Haversine.php +++ b/src/Distance/Haversine.php @@ -1,14 +1,6 @@ - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo - */ - namespace Location\Distance; use Location\Coordinate; @@ -18,11 +10,9 @@ /** * Implementation of distance calculation with http://en.wikipedia.org/wiki/Law_of_haversines * - * @see http://en.wikipedia.org/wiki/Law_of_haversines + * @see http://en.wikipedia.org/wiki/Law_of_haversines * - * @author Marcus Jaschen - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo + * @author Marcus Jaschen */ class Haversine implements DistanceInterface { @@ -36,7 +26,7 @@ class Haversine implements DistanceInterface */ public function getDistance(Coordinate $point1, Coordinate $point2): float { - if ($point1->getEllipsoid() != $point2->getEllipsoid()) { + if ($point1->getEllipsoid()->getName() !== $point2->getEllipsoid()->getName()) { throw new NotMatchingEllipsoidException('The ellipsoids for both coordinates must match'); } diff --git a/src/Distance/Vincenty.php b/src/Distance/Vincenty.php index 96bb028..e6daee0 100644 --- a/src/Distance/Vincenty.php +++ b/src/Distance/Vincenty.php @@ -1,14 +1,6 @@ - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo - */ - namespace Location\Distance; use Location\Coordinate; @@ -18,11 +10,9 @@ /** * Implementation of distance calculation with Vincenty Method * - * @see http://www.movable-type.co.uk/scripts/latlong-vincenty.html + * @see http://www.movable-type.co.uk/scripts/latlong-vincenty.html * - * @author Marcus Jaschen - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo + * @author Marcus Jaschen */ class Vincenty implements DistanceInterface { diff --git a/src/Ellipsoid.php b/src/Ellipsoid.php index 6c919b3..50e9c7d 100644 --- a/src/Ellipsoid.php +++ b/src/Ellipsoid.php @@ -1,22 +1,12 @@ - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo - */ - namespace Location; /** * Ellipsoid * - * @author Marcus Jaschen - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo + * @author Marcus Jaschen */ class Ellipsoid { diff --git a/src/Factory/CoordinateFactory.php b/src/Factory/CoordinateFactory.php index b3d0d61..00aeff1 100644 --- a/src/Factory/CoordinateFactory.php +++ b/src/Factory/CoordinateFactory.php @@ -1,14 +1,6 @@ - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo - */ - namespace Location\Factory; use Location\Coordinate; @@ -17,9 +9,7 @@ /** * Coordinate Factory * - * @author Marcus Jaschen - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo + * @author Marcus Jaschen */ class CoordinateFactory implements GeometryFactoryInterface { diff --git a/src/Factory/GeometryFactoryInterface.php b/src/Factory/GeometryFactoryInterface.php index bd22daf..db00e0d 100644 --- a/src/Factory/GeometryFactoryInterface.php +++ b/src/Factory/GeometryFactoryInterface.php @@ -1,14 +1,6 @@ - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo - */ - namespace Location\Factory; use Location\GeometryInterface; @@ -16,9 +8,7 @@ /** * Geometry Factory Interface * - * @author Marcus Jaschen - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo + * @author Marcus Jaschen */ interface GeometryFactoryInterface { diff --git a/src/Formatter/Coordinate/DMS.php b/src/Formatter/Coordinate/DMS.php index d79abc4..bfdf1c1 100644 --- a/src/Formatter/Coordinate/DMS.php +++ b/src/Formatter/Coordinate/DMS.php @@ -1,14 +1,6 @@ - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo - */ - namespace Location\Formatter\Coordinate; use Location\Coordinate; @@ -16,9 +8,7 @@ /** * Coordinate Formatter "DMS" * - * @author Marcus Jaschen - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo + * @author Marcus Jaschen */ class DMS implements FormatterInterface { diff --git a/src/Formatter/Coordinate/DecimalDegrees.php b/src/Formatter/Coordinate/DecimalDegrees.php index 28da76d..0efeebd 100644 --- a/src/Formatter/Coordinate/DecimalDegrees.php +++ b/src/Formatter/Coordinate/DecimalDegrees.php @@ -1,14 +1,6 @@ - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo - */ - namespace Location\Formatter\Coordinate; use Location\Coordinate; @@ -16,9 +8,7 @@ /** * Coordinate Formatter "Decimal Degrees" * - * @author Marcus Jaschen - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo + * @author Marcus Jaschen */ class DecimalDegrees implements FormatterInterface { diff --git a/src/Formatter/Coordinate/DecimalMinutes.php b/src/Formatter/Coordinate/DecimalMinutes.php index 245f580..b64a142 100644 --- a/src/Formatter/Coordinate/DecimalMinutes.php +++ b/src/Formatter/Coordinate/DecimalMinutes.php @@ -1,14 +1,6 @@ - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo - */ - namespace Location\Formatter\Coordinate; use Location\Coordinate; @@ -16,9 +8,7 @@ /** * Coordinate Formatter "DecimalMinutes" * - * @author Marcus Jaschen - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo + * @author Marcus Jaschen */ class DecimalMinutes implements FormatterInterface { diff --git a/src/Formatter/Coordinate/FormatterInterface.php b/src/Formatter/Coordinate/FormatterInterface.php index cd0146a..bc35eff 100644 --- a/src/Formatter/Coordinate/FormatterInterface.php +++ b/src/Formatter/Coordinate/FormatterInterface.php @@ -1,14 +1,6 @@ - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo - */ - namespace Location\Formatter\Coordinate; use Location\Coordinate; @@ -16,9 +8,7 @@ /** * Coordinate Formatter Interface * - * @author Marcus Jaschen - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo + * @author Marcus Jaschen */ interface FormatterInterface { diff --git a/src/Formatter/Coordinate/GeoJSON.php b/src/Formatter/Coordinate/GeoJSON.php index a65cfbe..2ac5ef5 100644 --- a/src/Formatter/Coordinate/GeoJSON.php +++ b/src/Formatter/Coordinate/GeoJSON.php @@ -1,14 +1,6 @@ - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo - */ - namespace Location\Formatter\Coordinate; use Location\Coordinate; @@ -16,9 +8,7 @@ /** * GeoJSON Coordinate Formatter * - * @author Marcus Jaschen - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo + * @author Marcus Jaschen */ class GeoJSON implements FormatterInterface { diff --git a/src/Formatter/Polygon/FormatterInterface.php b/src/Formatter/Polygon/FormatterInterface.php index a5581c9..6b97dc8 100644 --- a/src/Formatter/Polygon/FormatterInterface.php +++ b/src/Formatter/Polygon/FormatterInterface.php @@ -1,15 +1,6 @@ - * @author Richard Barnes - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo - */ - namespace Location\Formatter\Polygon; use Location\Polygon; @@ -17,10 +8,8 @@ /** * Polygon Formatter Interface * - * @author Marcus Jaschen - * @author Richard Barnes - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo + * @author Marcus Jaschen + * @author Richard Barnes */ interface FormatterInterface { diff --git a/src/Formatter/Polygon/GeoJSON.php b/src/Formatter/Polygon/GeoJSON.php index 7b64830..59a184a 100644 --- a/src/Formatter/Polygon/GeoJSON.php +++ b/src/Formatter/Polygon/GeoJSON.php @@ -1,14 +1,6 @@ - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo - */ - namespace Location\Formatter\Polygon; use Location\Coordinate; @@ -18,9 +10,7 @@ /** * GeoJSON Polygon Formatter * - * @author Richard Barnes - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo + * @author Richard Barnes */ class GeoJSON implements FormatterInterface { diff --git a/src/Formatter/Polyline/FormatterInterface.php b/src/Formatter/Polyline/FormatterInterface.php index 087d3ce..128495d 100644 --- a/src/Formatter/Polyline/FormatterInterface.php +++ b/src/Formatter/Polyline/FormatterInterface.php @@ -1,14 +1,6 @@ - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo - */ - namespace Location\Formatter\Polyline; use Location\Polyline; @@ -16,9 +8,7 @@ /** * Polyline Formatter Interface * - * @author Richard Barnes - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo + * @author Richard Barnes */ interface FormatterInterface { diff --git a/src/Formatter/Polyline/GeoJSON.php b/src/Formatter/Polyline/GeoJSON.php index 0c448f6..5b15596 100644 --- a/src/Formatter/Polyline/GeoJSON.php +++ b/src/Formatter/Polyline/GeoJSON.php @@ -1,14 +1,6 @@ - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo - */ - namespace Location\Formatter\Polyline; use Location\Polyline; @@ -16,14 +8,12 @@ /** * GeoJSON Polyline Formatter * - * @author Richard Barnes - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo + * @author Richard Barnes */ class GeoJSON implements FormatterInterface { /** - * @param \Location\Polyline $polyline + * @param Polyline $polyline * * @return string */ diff --git a/src/Line.php b/src/Line.php index 8f8dfbd..86901f4 100644 --- a/src/Line.php +++ b/src/Line.php @@ -1,16 +1,6 @@ - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo - */ - namespace Location; use Location\Bearing\BearingInterface; @@ -19,19 +9,17 @@ /** * Line Implementation * - * @author Marcus Jaschen - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo + * @author Marcus Jaschen */ class Line implements GeometryInterface { /** - * @var \Location\Coordinate + * @var Coordinate */ protected $point1; /** - * @var \Location\Coordinate + * @var Coordinate */ protected $point2; @@ -46,7 +34,7 @@ public function __construct(Coordinate $point1, Coordinate $point2) } /** - * @param \Location\Coordinate $point1 + * @param Coordinate $point1 * * @return void */ @@ -56,7 +44,7 @@ public function setPoint1(Coordinate $point1) } /** - * @return \Location\Coordinate + * @return Coordinate */ public function getPoint1(): Coordinate { @@ -64,7 +52,7 @@ public function getPoint1(): Coordinate } /** - * @param \Location\Coordinate $point2 + * @param Coordinate $point2 * * @return void */ @@ -74,7 +62,7 @@ public function setPoint2(Coordinate $point2) } /** - * @return \Location\Coordinate + * @return Coordinate */ public function getPoint2(): Coordinate { @@ -105,7 +93,7 @@ public function getLength(DistanceInterface $calculator): float } /** - * @param \Location\Bearing\BearingInterface $bearingCalculator + * @param BearingInterface $bearingCalculator * * @return float */ @@ -115,7 +103,7 @@ public function getBearing(BearingInterface $bearingCalculator): float } /** - * @param \Location\Bearing\BearingInterface $bearingCalculator + * @param BearingInterface $bearingCalculator * * @return float */ diff --git a/src/Polygon.php b/src/Polygon.php index 40c4dc5..74b2763 100644 --- a/src/Polygon.php +++ b/src/Polygon.php @@ -1,17 +1,6 @@ - * @author Marcus Jaschen - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo - */ - namespace Location; use Location\Distance\DistanceInterface; @@ -20,10 +9,8 @@ /** * Polygon Implementation * - * @author Paul Vidal - * @author Marcus Jaschen - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo + * @author Paul Vidal + * @author Marcus Jaschen */ class Polygon implements GeometryInterface { diff --git a/src/Polyline.php b/src/Polyline.php index 131495c..a16a38c 100644 --- a/src/Polyline.php +++ b/src/Polyline.php @@ -1,16 +1,6 @@ - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo - */ - namespace Location; use Location\Distance\DistanceInterface; @@ -19,9 +9,7 @@ /** * Polyline Implementation * - * @author Marcus Jaschen - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo + * @author Marcus Jaschen */ class Polyline implements GeometryInterface { diff --git a/src/Processor/Polyline/SimplifyBearing.php b/src/Processor/Polyline/SimplifyBearing.php index e1d11fa..d75130c 100644 --- a/src/Processor/Polyline/SimplifyBearing.php +++ b/src/Processor/Polyline/SimplifyBearing.php @@ -1,25 +1,15 @@ - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo - */ - namespace Location\Processor\Polyline; use Location\Bearing\BearingEllipsoidal; use Location\Polyline; /** - * Simplify Polyline + * Simplify Polyline. * - * @author Marcus Jaschen - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo + * @author Marcus Jaschen */ class SimplifyBearing implements SimplifyInterface { diff --git a/src/Processor/Polyline/SimplifyDouglasPeucker.php b/src/Processor/Polyline/SimplifyDouglasPeucker.php index 60d1df9..c5c8325 100644 --- a/src/Processor/Polyline/SimplifyDouglasPeucker.php +++ b/src/Processor/Polyline/SimplifyDouglasPeucker.php @@ -1,32 +1,23 @@ - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo - */ - namespace Location\Processor\Polyline; use Location\Line; use Location\Polyline; use Location\Utility\PerpendicularDistance; +/** /** * Simplify Polyline with the Douglas-Peucker-Algorithm * - * @author Marcus Jaschen - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo + * The Algorithm is described here: + * http://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm + * + * The formula for the Perpendicular Distance is described here: + * http://biodiversityinformatics.amnh.org/open_source/pdc/documentation.php + * + * @author Marcus Jaschen */ class SimplifyDouglasPeucker implements SimplifyInterface { @@ -44,9 +35,9 @@ public function __construct(float $tolerance) } /** - * @param \Location\Polyline $polyline + * @param Polyline $polyline * - * @return \Location\Polyline + * @return Polyline */ public function simplify(Polyline $polyline): Polyline { diff --git a/src/Processor/Polyline/SimplifyInterface.php b/src/Processor/Polyline/SimplifyInterface.php index 595c12a..2ce50c0 100644 --- a/src/Processor/Polyline/SimplifyInterface.php +++ b/src/Processor/Polyline/SimplifyInterface.php @@ -1,14 +1,6 @@ - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo - */ - namespace Location\Processor\Polyline; use Location\Polyline; @@ -16,16 +8,14 @@ /** * Interface for simplifying a polyline * - * @author Marcus Jaschen - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo + * @author Marcus Jaschen */ interface SimplifyInterface { /** * Simplifies the given polyline * - * @param \Location\Polyline $polyline + * @param Polyline $polyline * * @return Polyline */ diff --git a/src/Utility/PerpendicularDistance.php b/src/Utility/PerpendicularDistance.php index 114f9b5..f13327e 100644 --- a/src/Utility/PerpendicularDistance.php +++ b/src/Utility/PerpendicularDistance.php @@ -1,14 +1,6 @@ - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo - */ - namespace Location\Utility; use Location\Coordinate; @@ -17,9 +9,7 @@ /** * Calculate the perpendicular distance between a Line and a Point * - * @author Marcus Jaschen - * @license https://opensource.org/licenses/MIT - * @link https://github.com/mjaschen/phpgeo + * @author Marcus Jaschen */ class PerpendicularDistance {