Looking to hire Laravel developers? Try LaraJobs

laravel-hgt-reader maintained by sleepcat

Author
Last update
2017/07/19 11:05 (dev-master)
Links
Downloads
4 196

Comments
comments powered by Disqus

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

Here

Download xxx.hgt to storage/hgt