Download the PHP package ixnode/php-coordinate without Composer

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

PHP Coordinate

Release PHP PHPStan PHPUnit PHPCS PHPMD Rector - Instant Upgrades and Automated Refactoring LICENSE

This library offers a collection of various PHP coordinate classes like Coordinate, etc. It converts various coordinate strings and values into a unique format.

1. Usage

1.1 Converter example

1.2 Parser example

1.3 Distance example

1.4 Direction example (degree)

1.5 Direction example (cardinal direction)

2. Parser

2.1 Basic decimal degree parser

2.1.1 Parser formats

Given value (string) Latitude (float) Longitude (float) Place
"51.0504,13.7373" 51.0504 13.7373 Dresden, Germany
"51.0504, 13.7373" 51.0504 13.7373 Dresden, Germany
"51.0504 13.7373" 51.0504 13.7373 Dresden, Germany
"POINT(-31.425299, -64.201743)" -31.425299 -64.201743 Córdoba, Argentina
"POINT(-31.425299 -64.201743)" -31.425299 -64.201743 Córdoba, Argentina

2.1.2 Code example

2.2 Basic DMS Parser

2.2.1 Parser formats

Given value (string) Latitude (float) Longitude (float) Place
"51°3′1.44″N,13°44′14.28″E" 51.0504 13.7373 Dresden, Germany
"51°3′1.44″N, 13°44′14.28″E" 51.0504 13.7373 Dresden, Germany
"51°3′1.44″N 13°44′14.28″E" 51.0504 13.7373 Dresden, Germany
"POINT(31°25′31.0764″S, 64°12′6.2748″W)" -31.425299 -64.201743 Córdoba, Argentina
"POINT(31°25′31.0764″S 64°12′6.2748″W)" -31.425299 -64.201743 Córdoba, Argentina

2.2.2 Code example

2.3 Google Url Parser Parser

2.3.1 Parser formats

Given value (string) Latitude (float) Longitude (float) Place
Copied Google Maps Short Url1) 54.07304830 18.992402 Malbork, Poland
Copied Google Maps Link2) 51.31237 12.4132924 Leipzig, Germany

2.3.2 Code example

3. Converter

3.1 Methods of class Coordinate

Method Type Parameter(s) Description Example
getLatitude float --- Returns the decimal degree presentation of latitude value. -31.425299
getLongitude float --- Returns the decimal degree presentation of longitude value. -64.201743
getLatitudeDD float --- Alias of getLatitude. -31.425299
getLongitudeDD float --- Alias of getLongitude. -64.201743
getLatitudeDMS string --- Returns the dms representation of the latitude value. "31°25′31.0764″S"
getLongitudeDMS string --- Returns the dms representation of the longitude value. "64°12′6.2748″W"
getLatitudeDMS string CoordinateValue::FORMAT_DMS_SHORT_2 Returns the dms representation of the latitude value (v2). "S31°25′31.0764″"
getLongitudeDMS string CoordinateValue::FORMAT_DMS_SHORT_2 Returns the dms representation of the longitude value (v2). "W64°12′6.2748″"
getDistance float new Coordinate(), meters (default) or kilometers Returns the distance to given second Coordinate instance. 11904.668
getDegree float new Coordinate() Returns the direction (degree) to given second Coordinate instance (0° - North, 90° - East, etc.). -136.62
getDirection string new Coordinate() Returns the cardinal direction to given second Coordinate instance (N, NE, E, SE, S, SW, W, NW). "SW"
getLinkGoogle string false (default - as decimal) or true (as DMS) Returns the link to Google. Google
getLinkOpenStreetMap string --- Returns the link to OpenStreetMap. OpenStreetMap

3.2 Code example

4. Installation

5. Command line tool

Used to quickly check two given coordinates.

Check Dresden, Germany and New York, United States:

or within your composer project:

6. Library development

7. License

This library is licensed under the MIT License - see the LICENSE file for details.


All versions of php-coordinate with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-curl Version *
ext-gd Version *
ixnode/php-exception Version ^0.1.21
adhocore/cli Version ^v1.0.0
ixnode/php-cli-image Version ^1.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 ixnode/php-coordinate contains the following files

Loading the files please wait ....