Download the PHP package ligorikus/h3-php without Composer

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

h3-php

Pure PHP implementation of H3 - Uber's hexagonal hierarchical geospatial indexing system.

Installation

Requirements

Development Approach

The library's implementation is developed without large language models (LLMs). LLMs are used only for documentation and writing tests.

Development

Use PHP 8.2.27 or newer to run the development tools. Composer resolves the locked dependencies against PHP 8.2.27 so they also install on PHP 8.2.

CI checks the following compatible combinations:

PHP PHPUnit
8.2 11
8.3 11, 12
8.4 11, 12, 13
8.5 11, 12, 13

The matrix resolves dependencies for each actual PHP version. A separate PHP 8.2 job validates and installs composer.lock, audits dependencies, runs tests, PHPStan, and Psalm.

Quick Start

H3::cellToLatLng(int $h3): LatLng returns the center of an H3 cell as a LatLng object. getLat() and getLng() return coordinates in degrees. The cell center may differ from the coordinates originally passed to latLngToCell. H3 indexes are passed as integers; use hexdec('89283082803ffff') to convert a hexadecimal H3 index string before calling cellToLatLng.

API implementation status

Functions are grouped and ordered as in the official H3 4.x API reference, including experimental functions and C memory-management helpers.

๐ŸŸข Implemented ยท ๐Ÿ”ด Not implemented

Status refers to the API exposed by H3\H3. Low-level helpers such as H3Modification::h3GetResolution() and H3Modification::h3GetIndexDigit() are available internally but do not expose the corresponding official API methods.

Indexing [Official documentation](https://h3geo.org/docs/api/indexing/) - ๐ŸŸข `latLngToCell` - ๐ŸŸข `cellToLatLng` - ๐Ÿ”ด `cellToBoundary`
Inspection [Official documentation](https://h3geo.org/docs/api/inspection/) - ๐Ÿ”ด `getResolution` - ๐Ÿ”ด `getBaseCellNumber` - ๐Ÿ”ด `getIndexDigit` - ๐Ÿ”ด `constructCell` - ๐Ÿ”ด `stringToH3` - ๐Ÿ”ด `h3ToString` - ๐Ÿ”ด `isValidCell` - ๐Ÿ”ด `isValidIndex` - ๐Ÿ”ด `isResClassIII` - ๐Ÿ”ด `isPentagon` - ๐Ÿ”ด `getIcosahedronFaces` - ๐Ÿ”ด `maxFaceCount`
Traversal [Official documentation](https://h3geo.org/docs/api/traversal/) - ๐Ÿ”ด `gridDistance` - ๐Ÿ”ด `gridRing` - ๐Ÿ”ด `gridRingUnsafe` - ๐Ÿ”ด `maxGridRingSize` - ๐Ÿ”ด `gridDisk` - ๐Ÿ”ด `maxGridDiskSize` - ๐Ÿ”ด `gridDiskDistances` - ๐Ÿ”ด `gridDiskUnsafe` - ๐Ÿ”ด `gridDiskDistancesUnsafe` - ๐Ÿ”ด `gridDiskDistancesSafe` - ๐Ÿ”ด `gridDisksUnsafe` - ๐Ÿ”ด `gridPathCells` - ๐Ÿ”ด `gridPathCellsSize` - ๐Ÿ”ด `cellToLocalIj` - ๐Ÿ”ด `localIjToCell`
Hierarchy [Official documentation](https://h3geo.org/docs/api/hierarchy/) - ๐Ÿ”ด `cellToParent` - ๐Ÿ”ด `cellToChildren` - ๐Ÿ”ด `cellToChildrenSize` - ๐Ÿ”ด `cellToCenterChild` - ๐Ÿ”ด `cellToChildPos` - ๐Ÿ”ด `childPosToCell` - ๐Ÿ”ด `compactCells` - ๐Ÿ”ด `uncompactCells` - ๐Ÿ”ด `uncompactCellsSize`
Regions [Official documentation](https://h3geo.org/docs/api/regions/) - ๐Ÿ”ด `polygonToCells` - ๐Ÿ”ด `maxPolygonToCellsSize` - ๐Ÿ”ด `polygonToCellsExperimental` - ๐Ÿ”ด `maxPolygonToCellsSizeExperimental` - ๐Ÿ”ด `cellsToLinkedMultiPolygon` / `cellsToMultiPolygon` - ๐Ÿ”ด `destroyLinkedMultiPolygon`
Directed edges [Official documentation](https://h3geo.org/docs/api/uniedge/) - ๐Ÿ”ด `areNeighborCells` - ๐Ÿ”ด `cellsToDirectedEdge` - ๐Ÿ”ด `isValidDirectedEdge` - ๐Ÿ”ด `getDirectedEdgeOrigin` - ๐Ÿ”ด `getDirectedEdgeDestination` - ๐Ÿ”ด `directedEdgeToCells` - ๐Ÿ”ด `originToDirectedEdges` - ๐Ÿ”ด `directedEdgeToBoundary` - ๐Ÿ”ด `reverseDirectedEdge`
Vertexes [Official documentation](https://h3geo.org/docs/api/vertex/) - ๐Ÿ”ด `cellToVertex` - ๐Ÿ”ด `cellToVertexes` - ๐Ÿ”ด `vertexToLatLng` - ๐Ÿ”ด `isValidVertex`
Miscellaneous [Official documentation](https://h3geo.org/docs/api/misc/) - ๐Ÿ”ด `degsToRads` - ๐Ÿ”ด `radsToDegs` - ๐Ÿ”ด `getHexagonAreaAvgKm2` - ๐Ÿ”ด `getHexagonAreaAvgM2` - ๐Ÿ”ด `cellAreaRads2` - ๐Ÿ”ด `cellAreaKm2` - ๐Ÿ”ด `cellAreaM2` - ๐Ÿ”ด `getHexagonEdgeLengthAvgKm` - ๐Ÿ”ด `getHexagonEdgeLengthAvgM` - ๐Ÿ”ด `edgeLengthKm` - ๐Ÿ”ด `edgeLengthM` - ๐Ÿ”ด `edgeLengthRads` - ๐Ÿ”ด `getNumCells` - ๐Ÿ”ด `getRes0Cells` - ๐Ÿ”ด `res0CellCount` - ๐Ÿ”ด `getPentagons` - ๐Ÿ”ด `pentagonCount` - ๐Ÿ”ด `greatCircleDistanceKm` - ๐Ÿ”ด `greatCircleDistanceM` - ๐Ÿ”ด `greatCircleDistanceRads` - ๐Ÿ”ด `describeH3Error`

License

Apache License 2.0 - see LICENSE


All versions of h3-php with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
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 ligorikus/h3-php contains the following files

Loading the files please wait ...