Copied!

Geohash interface

AbstractInterface
Methods
public abstract decode( $geohash) : League\Geotools\Geohash\GeohashInterface
 

Returns the decoded geo hash to it's center.

Note that the coordinate that you used to generate the geo hash may be anywhere in the geo hash's bounding box and therefore you should not expect them to be identical.

  • param string $geohash The geo hash string to decode.
  • return \GeohashInterface
  • throws \InvalidArgumentException
  • throws \RuntimeException
public abstract encode(League\Geotools\Coordinate\CoordinateInterface $coordinate, $length) : League\Geotools\Geohash\GeohashInterface
 

Returns a geo hash string.

  • param \CoordinateInterface $coordinate The coordinate to encode.
  • param int $length The length of the hash between 1 and 12 by default.
  • return \GeohashInterface
  • throws \InvalidArgumentException
© 2025 Bruce Wells
Search Namespaces \ Classes
Configuration