PHP code example of lraveri / geojson-converter
1. Go to this page and download the library: Download lraveri/geojson-converter library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
lraveri / geojson-converter example snippets
$content = file_get_contents('/path/to/file.gpx');
$gpxConverter = new GpxConverter($content);
$geoJson = $gpxConverter->convert();`
$content = file_get_contents('/path/to/file.kml');
$kmlConverter = new KmlConverter($content);
$geoJson = $kmlConverter->convert();`