Download the PHP package chriscollins/gis-utils without Composer

On this page you can find all versions of the php package chriscollins/gis-utils. 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 gis-utils

GIS Utils

Build Status

A PHP library for performing GIS tasks, such as geocoding addresses and transforming coordinates.

https://github.com/chriscollins/gis-utils

Installation

Require in your project via composer as follows:

Run composer install.

Usage

The majority of functionality is accessed via the ChrisCollins\GisUtils\Coordinate\LatLong class.

Creating a LatLong object manually

You will first need to create a ChrisCollins\GisUtils\Datum\Datum object for the datum you wish to represent. Datums are composed of a name, an ChrisCollins\GisUtils\Ellipsoid\Ellipsoid representing the Earth and a ChrisCollins\GisUtils\Equation\HelmertTransform to convert a coordinate in the commonly used WGS84 datum to a coordinate in your datum:

The ChrisCollins\GisUtils\Ellipsoid\EllipsoidFactory, ChrisCollins\GisUtils\Datum\DatumFactory and ChrisCollins\GisUtils\Equation\HelmertTransformFactory classes are available to create a few commonly used options:

There is also the ChrisCollins\GisUtils\Facade class which handles the dependency injection for you via Pimple, but is a little less flexible:

Once you have your Datum, you can create LatLong objects if you know your chosen point's latitude, longitude, and height in your chosen datum:

Creating a LatLong object from a lookup

This library also provides a method of creating LatLong objects with the ChrisCollins\GisUtils\Lookup\GoogleLookup class, which looks up the coordinates of an address by using Google's geocoding service. Please take note of Google's terms of use and API limits for using the geocoder service. Coordinates created by this service will use the WGS84 datum. To use the class, you will need to instantiate an ChrisCollins\GisUtils\Address\Address (or your own class that implements ChrisCollins\GisUtils\Address\AddressInterface):

You can then perform the lookup as follows:

Again, this functionality is available via the Facade class, if you want to have the dependency injection handled for you:

Functionality available

Once you have a LatLong object, you can perform calculations to calculate distances between it and other LatLong objects (Spherical law of cosines and the more accurate, more computationally expensive Vincenty formula are both supported), convert it to equivalent coordinates in other datums, calculate initial and final bearings to other LatLongs and calculate the destination LatLong that would be reached if a given initial bearing was followed for a certain distance. There is also support for converting the LatLong to cartesian coordinates (ChrisCollins\GisUtils\Coordinate\CartesianCoordinate) and back.

Generate the code documentation via phpdox for further information.


All versions of gis-utils with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4.0
pimple/pimple Version ~3.5
chriscollins/general-utils Version ~2.0.0
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 chriscollins/gis-utils contains the following files

Loading the files please wait ....