All notable changes to mjaschen/phpgeo
will be documented in this file.
Updates should follow the Keep a CHANGELOG principles.
Warning: Backwards-compatibility-breaking changes
- Support for PHP 7.3, 7.4 and 8.0
- deprecated methods
setPoint1()
andsetPoint2()
fromLine
master
is now renamed tomain
GeometryFactoryInterface::fromString()
now hasGeometryInterface
as return type
- deprecated methods
getDestination()
andgetBearingFinal()
fromDirectVincentyBearing
- deprecated methods
getDistance()
,getBearingInitial()
andgetBearingFinal()
fromInverseVincentyBearing
- deprecated methods
getX()
,getY()
andgetZ()
fromCartesian
- deprecated methods
getPoint1()
andgetPoint2()
fromLine
- use proper variable as index for array access
- point-to-line distance is calculated iteratively now, fixes #92
- improved intersection checking for polygon/polygon
This release has no breaking changes.
Thanks, @nilshoerrmann, for contributing!
- method
Bounds::getAsPolygon()
which returns a polygon containing the four nodes of the Bounds instance - methods
Bounds::getNorthEast()
andBounds::getSouthWest()
- new public methods:
CardinalDirection::isStrictlyNorth()
,CardinalDirection::isStrictlyEast()
,CardinalDirection::isStrictlySouth()
andCardinalDirection::isStrictlyWest()
- new class
Direction
for checking if one point is north, eat, south or west from another point - new Class
Intersection
for checking if two geometries intersect each other
- drop support for PHP 7.2 breaking change
- add support for PHP 8.1
- add deprecations for setter methods in
DMS
andLine
classes
- Division by zero in
SimplifyBearing
if two consecutive points share the same location, fixes #79.
- Calculation of Cardinal Distances between two points. Thanks @LeoVie!
- change
static
toself
to prevent accidentally calling the constructor with wrong arguments in child classes (Ellipsoid
,Line
,Polygon
,Polyline
)
- Simplifying polygons is now supported as well, see
simplifyGeometry()
methods inSimplifyBearing
andSimplifyDouglasPeucker
classes (fixes #69).
- #68
CoordinateFactory
emitted a warning if a coordindates string without arc seconds was passed to thefromString()
method
- phpgeo requires PHP >= 7.2 now
- backwards compatibility breaking: fix double space in Ellipsoid Name
World␣Geodetic␣System␣␣1984
→World␣Geodetic␣System␣1984
(#49) - updated tests for PHPUnit 8
- class constant visibiliy modifiers
- support for PHP 7.0 and PHP 7.1 from Travis CI config
- method
getIntermediatePoint()
to theLine
class which calculates an intermediate point on a line by following the Great Circle between the two line ends and dividing the line by the given fraction (0.0 ... 1.0)
- method
getMidpoint()
to theLine
class which calculates the midpoint of a line by following the Great Circle between the two line ends and dividing the line into two halves. - utility class
Cartesian
which abstracts three-dimensional cartesian coordinates x, y, and z
- access modifier for the
tolerance
attribute is now protected (SimplifyDouglasPeucker
)
BoundsFactory
to create a bounds instance for a center point and a given distance to the bounds' corners. Thanks @sdennler!
- improve precision in
PointToLineDistance
PointToLineDistance
calculates the smallest distance between a point and a line
hasSameLocation()
checks if two points share the same location (optionally within a distance which defaults to 0.001 m = 1 mm)addUniquePoint
adds unique points to a polyline (i.e., points that doesn't already exist in that polyline)getAveragePoint()
returns the average value of latitude and longitude values for a polyline
- wrongly placed parenthesis in
Polygon::contains()
- The bounds for a
Polyline
can now be retrieved in form of aBound
object.
- The auto-loader is now PSR-4 compatible; directory structure was flattened by one level.
- improvements to the Douglas-Peucker processor. Thanks @iamskey!
- Links to documentation in README. Thanks @JonathanMH
- better floating point number comparisons in
Vincenty
- add exception message in
Vincenty
- type-cast regexp matches before doing calculations in
CoordinateFactory
- Information on how to run checks and tests for developers in the README.
- Updated internal stuff like type and return hints after running a static analysis.
- Updated some PHPDoc blocks after running a static analysis.
- Wrongly typed return value in
BearingEllipsoidal::inverseVincenty()
.
- new supported format for coordinates parser. Thanks to @petrknap
- License: phpgeo is now distributed under the MIT license
- phpgeo requires at least PHP 7.0
- deprecated class
Simplify
was removed; alternatives:SimplifyBearing
orSimplifyDouglasPeucker
- PHP versions 5.4, 5.5, and 5.6 are no longer supported
- Area calculation for polygons works now. Thanks to @felixveysseyre
- GeoJSON output for polygon is now compliant with RFC 7946. Thanks to @arsonik
- add method for calculating the final bearing for a
Line
object
- bugifx for a division-by-zero error which occurred when symplifying a polyline with the Douglas-Peucker algorithm.
- add an utility class to calculate the perpendicular distance between a point and a line; documentation
- add method to calculate the bearing of a
Line
instance (point 1 -> point 2)
- A new
SimplifyInterface
was introduced and is implemented in two classes:SimplifyDouglasPeucker
andSimplifyBearing
- Added documentation
- The
Simplify
processor class is now deprecated and will be removed in the 2.0 release.
- Added functionality to change the direction of Polygon instances
- Added documentation
- Added geofence check for arbitrary geometry objects
- Extended and updated documentation
- Added formatter for "Decimal Minutes" format, e.g.
43° 37.386' N, 070° 12.472' W
- Added documentation for the new formatter
- Added calculation of the bearing angle between two points (initial and final bearing)
- Added calculation of the destination point for a given starting point, the bearing angle, and the distance
- Support for spherical and ellipsoidal algorithms for the described bearing calculations
- Added documentation for the bearing calculations
- Added functionality to change the direction of Line/Polyline instances
- Added documentation
- Added documentation sources in mkdocs format. Documentation is now available online at http://phpgeo.marcusjaschen.de/
- several optimizations in control structures
- Added license information. phpgeo is now licensed under the GPL 3. (see issue #8)
- removed support for PHP 5.3; introduced short array syntax
- added the new Polyline class (thanks @paulvl)