Download the PHP package vancuren/php-turf without Composer
On this page you can find all versions of the php package vancuren/php-turf. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package php-turf
PHP Turf
PHP Turf is a PHP library for geospatial analysis similar to Turf.js.
- Installation
- Example
- Usage
- Contributing
Installation
You can install PHP Turf via Composer. Run the following command in your terminal:
Example
Here's a basic example demonstrating how to use PHP Turf to perform geospatial analysis:
Usage
Helpers
Point
Creates a Point feature from a coordinate.
Polygon
Creates a Polygon feature from an array of coordinates.
LineString
Creates a new line string
FeatureCollection
Takes one or more Features and creates a FeatureCollection.
Measurement
Area
Returns the polygon’s area
Bearing
Calculate the bearing between two points
Center
Takes a Feature or FeatureCollection and returns the absolute center point of all features.
Destination
Calculate the destination point from a given point, distance, and bearing
Distance
Calculate the distance between two points
Midpoint
Calculate the midpoint between two points
Coordinate Mutation
TODO - Need to implement Coordinate Mutation ...
Transformation
TODO - Need to implement Transformation ...
Feature Conversion
TODO - Need to implement Feature Conversion ...
Misc
Nearest Point
Find the nearest point to a reference point
Contains Point
Checks to see if a polygon contains a point.
Random
Misc
Get Points
Returns the points that create the line string.
Contributing
Contributions are welcome! Please feel free to submit pull requests or open issues if you encounter any problems or have suggestions for improvement.
Backers
Thank you to all our backers! 🙏
[Become a backer]()
Sponsors
Support this project by becoming a sponsor. Your logo will show up here with a link to your website.
[Become a sponsor]()
License
This project is licensed under the GNU AGPLv3 License. See the LICENSE file for details.