php-h3
php-h3 copied to clipboard
Repository seems unmaintained, does it still work?
@notflip Works fine for me. After installing it and adding this to my Laravel routes file:
Route::get('/h3', function () {
/// via neatlife/php-h3
$index = geotoh3(40.689167, -74.044444, 10);
$geo = h3togeo($index);
$resolution = h3getresolution($index);
return "Testing H3 Library: index($index) resolution($resolution) geo(".json_encode($geo).')';
});
It will work both on DigitalOcean and Vapor:
Testing H3 Library: index(Resource id #722) resolution(10) geo([40.68942184369929,-74.04443139990863])
Looks like there's also active development on the forks, that fix the only known issue. Feel free to point at one of those forks if you run into the seg fault until it is merged.
@michaellindahl Can you check my issue https://github.com/neatlife/php-h3/issues/7
Seems like you got this to work recently? I can't get this to install on Ubuntu, as when I run ./configure I get that error. Even after checking out the v3.7.1 branch as dfellis suggests. I have the geoToH3 binary in my /usr/local/bin now so I think I should be on a working version of the C library.
However, it seems to me that the php binding here is looking for something (degsToRads) on my system and not finding it..? Do you have any ideas / hints here or can share what OS you got this working on and the steps you took?
Thanks!!