You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+60-32
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
# phpgeo - A Simple Geo Library for PHP
2
2
3
-
phpgeo provides abstractions to geographical coordinates (including support for different ellipsoids) and allows you to calculate geographical distances between coordinates with high precision.
3
+
phpgeo provides abstractions to geographical coordinates (including support for different ellipsoids) and allows you to
4
+
calculate geographical distances between coordinates with high precision.
|`Line`, `Polygon`, and `Polyline` classes are now implementing a new interface |`GeometryLinesInterface` provides the `getSegments()` method. | There's no need to change anything if you don't extend those classes. |
67
+
|`getBounds()` method was added to `GeometryInterface`|| Ensure your class has a `getBounds()` method if you implement `GeometryInterface`|
68
+
| removed support for PHP 8.1 | Older PHP versions are no longer supported. | Upgrade to at least PHP 8.2 or keep using phpgeo 5.x |
69
+
57
70
### Upgrading to 5.x
58
71
59
-
*phpgeo* has some breaking changes in the 5.x release line. Please refer to the following list to see what has changed and what you need to do to upgrade your code.
72
+
*phpgeo* has some breaking changes in the 5.x release line. Please refer to the following list to see what has changed
|`setPoint1()` and `setPoint2()` methods removed from `Line`| The `Line` class now is immutable. | Use the constructor to create a new instance of `Line`. |
64
78
| removed support for PHP 7.3, 7.4 and 8.0 | Older PHP versions are no longer supported. | Upgrade to at least PHP 8.1. |
65
79
@@ -69,27 +83,35 @@ Starting with version 2.0.0 phpgeo is licensed under the MIT license. Older vers
69
83
70
84
## Features
71
85
72
-
**Info:** Please visit the **[documentation site](https://phpgeo.marcusjaschen.de/)** for complete and up-to-date documentation with many examples!
86
+
**Info:** Please visit the **[documentation site](https://phpgeo.marcusjaschen.de/)** for complete and up-to-date
87
+
documentation with many examples!
73
88
74
89
phpgeo provides the following features (follow the links for examples):
75
90
76
-
- abstractions of several geometry objects ([coordinate/point](https://phpgeo.marcusjaschen.de/Geometries/Coordinate.html),
i.e. answering the question "Is this point contained in that area/polygon?" and other [intersection](https://phpgeo.marcusjaschen.de/Comparisons/Intersections.html) checks between different geometries
100
+
i.e. answering the question "Is this point contained in that area/polygon?" and
101
+
other [intersection](https://phpgeo.marcusjaschen.de/Comparisons/Intersections.html) checks between different
102
+
geometries
85
103
-[formatting and output](https://phpgeo.marcusjaschen.de/Formatting_and_Output/index.html) of geometry objects
86
104
(GeoJSON, nice strings, e. g. `18° 54′ 41″ -155° 40′ 42″`)
87
-
- calculation of [bearing angle between two points](https://phpgeo.marcusjaschen.de/Calculations/Bearing_and_Destination.html#page_Bearing-between-two-points)
105
+
- calculation
106
+
of [bearing angle between two points](https://phpgeo.marcusjaschen.de/Calculations/Bearing_and_Destination.html#page_Bearing-between-two-points)
88
107
(spherical or with Vincenty's formula)
89
-
- calculation of a [destination point for a given starting point](https://phpgeo.marcusjaschen.de/Calculations/Bearing_and_Destination.html#page_Destination-point-for-given-bearing-and-distance),
108
+
- calculation of
109
+
a [destination point for a given starting point](https://phpgeo.marcusjaschen.de/Calculations/Bearing_and_Destination.html#page_Destination-point-for-given-bearing-and-distance),
90
110
bearing angle, and distance (spherical or with Vincenty's formula)
91
-
- calculation of the [perpendicular distance between a point and a line](https://phpgeo.marcusjaschen.de/Calculations/Perpendicular_Distance.html)
92
-
- calculation of the [Cardinal Distances between two points](https://phpgeo.marcusjaschen.de/Calculations/Cardinal_Distance.html)
111
+
- calculation of
112
+
the [perpendicular distance between a point and a line](https://phpgeo.marcusjaschen.de/Calculations/Perpendicular_Distance.html)
113
+
- calculation of
114
+
the [Cardinal Distances between two points](https://phpgeo.marcusjaschen.de/Calculations/Cardinal_Distance.html)
93
115
- getting segments of a [polyline](https://phpgeo.marcusjaschen.de/Geometries/Polyline.html#page_Segments)
Polylines can be simplified to save storage space or bandwidth. Simplification is done with the [Ramer–Douglas–Peucker algorithm](https://en.wikipedia.org/wiki/Ramer–Douglas–Peucker_algorithm) (AKA Douglas-Peucker algorithm).
159
+
Polylines can be simplified to save storage space or bandwidth. Simplification is done with
160
+
the [Ramer–Douglas–Peucker algorithm](https://en.wikipedia.org/wiki/Ramer–Douglas–Peucker_algorithm) (AKA
* Marcus Jaschen <[email protected]> and [all contributors](https://github.com/mjaschen/phpgeo/graphs/contributors)
275
-
*[Chris Veness](http://www.movable-type.co.uk/scripts/latlong-vincenty.html) - JavaScript implementation of the [Vincenty formula](http://en.wikipedia.org/wiki/Vincenty%27s_formulae) for distance calculation
276
-
* Ersts,P.J., Horning, N., and M. Polin[Internet] Perpendicular Distance Calculator(version 1.2.2) [Documentation](http://biodiversityinformatics.amnh.org/open_source/pdc/documentation.php). American Museum of Natural History, Center for Biodiversity and Conservation. Available from http://biodiversityinformatics.amnh.org/open_source/pdc. Accessed on 2013-07-07.
277
-
* W. Randolph Franklin, PNPOLY - Point Inclusion in Polygon Test [Documentation](http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html)
0 commit comments