Download the PHP package m165437/igc2kmz-php without Composer
On this page you can find all versions of the php package m165437/igc2kmz-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download m165437/igc2kmz-php
More information about m165437/igc2kmz-php
Files in m165437/igc2kmz-php
Package igc2kmz-php
Short Description PHP wrapper for Python script igc2kmz, an IGC to Google Earth converter.
License MIT
Informations about the package igc2kmz-php
igc2kmz PHP Wrapper
PHP wrapper for Python script igc2kmz, an IGC to Google Earth converter.
What is igc2kmz-php?
igc2kmz-php allows you to use Python script igc2kmz, an IGC to Google Earth converter, with your PHP application.
In a nutshell: you can convert IGC files to KMZ files.
IGC is a Data File Standard, developed by the IGC GPS Subcommittee and the Gliding Flight Data Recorder Manufacturers (…) to facilitate the introduction of GPS technology into gliding and in particular into competition verification and the homologation of badge and record flights, using GPS, by the FAI.
KML is an XML notation for expressing geographic annotation and visualization within Internet-based, two-dimensional maps and three-dimensional Earth browsers. KMZ files are zipped KML files consisting of a single root KML document and optionally any overlays, images and icons.
Requirements
- igc2kmz Python script
- Python version 2.x, not version 3.0 (as required by igc2kmz)
- PHP 7.1 or greater
What's what
- igc2kmz is a Python script to convert IGC files to KMZ files.
- igc2kmz-php is a PHP wrapper around the igc2kmz Python script.
Installation
The recommended way to install igc2kmz-php is by using composer:
This will install the PHP package with your application. Please keep in mind that the Python script igc2kmz is not included.
Install the Python script igc2kmz using Composer
Head over to m165437/igc2kmz-installer.
Usage of igc2kmz-php
- Get an instance of the
\Igc2KmzPhp\Igc2KmzInterface
implementation,\Igc2KmzPhp\Igc2Kmz
. Pass the path to the igc2kmz binary to the constructor. - Set the igc file and options on your
\Igc2KmzPhp\Igc2Kmz
instance. - Run your command.
With Laravel
This package includes a Laravel service provider and registers itself via Package Discovery.
Type-hint the class in a constructor or method that is resolved by Laravel's service container. It's automatically resolved and injected into the class.
If you need to change the default binary path vendor/bin/igc2kmz
, create a config file config/igc2kmz.php
and set the path in there.
Code Examples
Keep in mind that igc2kmz-php is designed to keep its state, run
\Igc2KmzPhp\Igc2KmzInterface::resetOptions
and\Igc2KmzPhp\Igc2KmzInterface::resetPhotos
to get rid of the options and photos you set for the next call on the instance.
Convert flight.igc to output.kmz
Make sure your igc path is correct and readable, and your output path is writable.
Set pilot name and glider type
For individual flights you can override the pilot name and glider type (otherwise they are taken from the IGC file).
Add photos with comments
Get process before it is run
Testing
Run the tests with:
Credits
Credit goes to Tom Payne for creating igc2kmz.
Contributing
Thank you for considering contributing to this package! Please see CONTRIBUTING for details.
License
igc2kmz-php is licensed under the MIT License (MIT). Please see the LICENSE file for more information.
All versions of igc2kmz-php with dependencies
php Version ^7.1.3
symfony/process Version ^4.0