Download the PHP package longitude-one/geo-parser without Composer

On this page you can find all versions of the php package longitude-one/geo-parser. 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 geo-parser

Geographic parser: longitude-one/geo-parser

longitude-one/geo-parser Stable release Packagist License

Lexer and parser library for geographic point string values.

PHP CI Maintainability Test Coverage Coverage Status Minimum PHP Version Tested on PHP 8.1 to 8.3

Downloads

[!NOTE] This package is the continuation of the now abandoned creof/geo-parser package.

Installation

Usage

There are two use patterns for the parser. The value to be parsed can be passed into the constructor, then parse() called on the returned object:

If many values need to be parsed, a single instance can be used:

Supported Formats

Both single values and pairs are supported. Some samples of supported formats are below, though not every possible iteration may be explicitly specified:

  1. Simple single-signed values

    • 40
    • -40
    • -8.543
    • +132
    • +77.2
  2. Simple single signed values with degree symbol

    • 40°
    • -40°
    • -5.234°
    • +43°
    • +38.43°
  3. Single unsigned values with or without degree symbol, and cardinal direction

    • 40° N
    • 40 S
    • 56.242 E
  4. Single values of signed integer degrees with degree symbol, and decimal minutes with apostrophe

    • 40° 26.222'
    • -65° 32.22'
    • +165° 52.22'
  5. Single values of unsigned integer degrees with degree symbol, decimal minutes with apostrophe, and cardinal direction

    • 40° 26.222' E
    • 65° 32.22' S
  6. Single values of signed integer degrees with degree symbol, integer minutes with apostrophe, and optional integer or decimal seconds with quote

    • 40° 26' 46"
    • -79° 58' 56"
    • 93° 19' 25.8"
    • +120° 19' 25.8"
  7. Single values of signed integer degrees with colon symbol, integer minutes, and optional colon and integer or decimal seconds

    • +40:26:46
    • -79:58:56
    • 93:19:25.8
  8. Single values of unsigned integer degrees with degree symbol, integer minutes with apostrophe, optional integer or decimal seconds with quote, and cardinal direction

    • 40° 26' 46" S
    • 99° 58' 56" W
    • 44° 58' 53.9" N
  9. Single values of unsigned integer degrees with colon symbol, integer minutes with, optional colon and integer or decimal seconds, and cardinal direction

    • 40:26:46 S
    • 99:58:56 W
    • 44:58:53.9 N
  10. Two of any one format separated by whitespace

  11. Two of any one format separated by a comma

Return

The parser will return an integer/float or an array containing a pair of these values.

Exceptions

The and will throw exceptions implementing interface .


All versions of geo-parser with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
doctrine/lexer Version ^2.1|^3.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 longitude-one/geo-parser contains the following files

Loading the files please wait ....