2017 © Pedro Peláez
 

library geohashs

Geohash library for php

image

rebing0512/geohashs

Geohash library for php

  • Wednesday, February 28, 2018
  • by rebing0512
  • Repository
  • 0 Watchers
  • 0 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

geohash

Usage

use Rebing0512\Geohashs;

$length = 6;

$geohash = new Geohash();

$hash = substr($geohash->encode('latitude','longitude'), 0, $length);

$box = $geohash->neighbors($hash);

$box[] = $hash;

$in_str = "'".implode("','", $box)."'";

// PHP
// $sql = "SELECT FROM `table` WHERE LEFT(geohash, {$length}) IN ($in_str)";
// echo $sql;

// OUTPUT
// SELECT FROM `table` WHERE LEFT(geohash, 6) IN ('xxxxxx','aaaaaa', ......)

The Versions

28/02 2018

dev-master

9999999-dev https://github.com/rebing0512/geohashs

Geohash library for php

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Avatar rebing0512

geohash

28/02 2018

v1.0

1.0.0.0 https://github.com/rebing0512/geohashs

Geohash library for php

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Avatar rebing0512

geohash

28/02 2018

v1.1.0

1.1.0.0 https://github.com/rebing0512/geohashs

Geohash library for php

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Avatar rebing0512

geohash