Download the PHP package brianfp/geometry-library without Composer

On this page you can find all versions of the php package brianfp/geometry-library. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package geometry-library

Geometry Library Google Maps API V3

PHP Geometry Library provides utility functions for the computation of geometric data on the surface of the Earth. Code ported from Google Maps Android API.

Features

Dependency

Installation

Issue following command:

Alternatively edit composer.json by adding following line and run composer update

Usage

Here is an example of using GeometryLibrary:

Available methods

PolyUtil class

SphericalUtil class


containsLocation( $point, $polygon, $geodesic = false ) - To find whether a given point falls within a polygon

Returns boolean


isLocationOnEdge( $point, $polygon, $tolerance = self::DEFAULT_TOLERANCE, $geodesic = true ) - To determine whether a point falls on or near a polyline, or on or near the edge of a polygon, within a specified tolerance in meters.

Returns boolean


isLocationOnPath( $point, $polygon, $tolerance = self::DEFAULT_TOLERANCE, $geodesic = true ) - To determine whether a point falls on or near a polyline, within a specified tolerance in meters

Returns boolean


distanceToLine( $p, $start, $end ) - To calculate distance from a point to line start->end on sphere.

Returns distance from a point to line


decode( $encodedPath ) - Decodes an encoded path string into a sequence of LatLngs.

Returns array


encode( $path ) - Encodes a sequence of LatLngs into an encoded path string.

Returns string


computeHeading( $from, $to ) - Returns the heading from one LatLng to another LatLng.

Returns int


computeOffset( $from, $distance, $heading ) - Returns the LatLng resulting from moving a distance from an origin in the specified heading.

Returns array


computeOffsetOrigin( $from, $distance, $heading ) - Returns the location of origin when provided with a LatLng destination, meters travelled and original heading. Headings are expressed in degrees clockwise from North.

Returns array


interpolate( $from, $to, $fraction ) - Returns the LatLng which lies the given fraction of the way between the origin LatLng and the destination LatLng.

Returns array


computeDistanceBetween( $from, $to ) - Returns the distance, in meters, between two LatLngs. You can optionally specify a custom radius. The radius defaults to the radius of the Earth.

Returns float


computeLength( $path ) - Returns the length of the given path, in meters, on Earth.

Returns float


computeArea( $path ) - Returns the area of a closed path.

Returns float


computeSignedArea( $path ) - Returns the signed area of a closed path.

Returns float


Support

Please open an issue on GitHub

License

Geometry Library Google Maps API V3 is released under the MIT License. See the bundled LICENSE file for details.


All versions of geometry-library with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package brianfp/geometry-library contains the following files

Loading the files please wait ....