laravel-hgt-reader maintained by sleepcat
Author
Last update
2017/07/19 11:05
(dev-master)
Downloads
4 196
laravel-hgt-reader
Installation For Laravel
Require this package with Composer
$ composer require sleepcat/laravel-hgt-reader
for laravel
your config/app.php
'providers' => [
SleepCat\LaravelHgtReader\ReaderServiceProvider::class,
]
Add the facade to your config/app.php file:
'aliases' => array(
//...
'HgtReader' => SleepCat\LaravelHgtReader\Facades\HgtReader::class,
),
Usage
Laravel usage
use HgtReader;
// Set Hgt files path in /storage
$hgtPath = "/hgt";
HgtReader::init($hgtPath, 3);
// Get elevation
$el = HgtReader::getElevation($lat, $lon);
Download htg files
Download xxx.hgt to storage/hgt