sleepcat/laravel-hgt-reader

There is no license information available for the latest version (1.0.2) of this package.

1.0.2 2017-07-03 08:51 UTC

This package is not auto-updated.

Last update: 2025-02-02 05:33:32 UTC


README

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