{"id":36373856,"url":"https://github.com/plin-code/kml-parser","last_synced_at":"2026-01-11T14:03:56.990Z","repository":{"id":286854134,"uuid":"962511088","full_name":"plin-code/kml-parser","owner":"plin-code","description":"KML and KMZ Laravel parser","archived":false,"fork":false,"pushed_at":"2025-08-18T01:11:22.000Z","size":53,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-23T05:42:47.424Z","etag":null,"topics":["kml-files","kml-parser","kmz","laravel-package"],"latest_commit_sha":null,"homepage":"https://www.plincode.tech/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/plin-code.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"PlinCode"}},"created_at":"2025-04-08T09:07:03.000Z","updated_at":"2025-07-28T00:38:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"45482163-dd4c-4952-a392-abda4b7aa15e","html_url":"https://github.com/plin-code/kml-parser","commit_stats":null,"previous_names":["plin-code/kml-parser"],"tags_count":3,"template":false,"template_full_name":"spatie/package-skeleton-laravel","purl":"pkg:github/plin-code/kml-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plin-code%2Fkml-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plin-code%2Fkml-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plin-code%2Fkml-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plin-code%2Fkml-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/plin-code","download_url":"https://codeload.github.com/plin-code/kml-parser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plin-code%2Fkml-parser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28306985,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T11:18:18.743Z","status":"ssl_error","status_checked_at":"2026-01-11T11:07:56.842Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["kml-files","kml-parser","kmz","laravel-package"],"created_at":"2026-01-11T14:03:56.933Z","updated_at":"2026-01-11T14:03:56.983Z","avatar_url":"https://github.com/plin-code.png","language":"PHP","funding_links":["https://github.com/sponsors/PlinCode"],"categories":[],"sub_categories":[],"readme":"# Laravel KML Parser\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/plin-code/kml-parser.svg?style=flat-square)](https://packagist.org/packages/plin-code/kml-parser)\n[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/plin-code/kml-parser/run-tests.yml?branch=main\u0026label=tests\u0026style=flat-square)](https://github.com/plin-code/kml-parser/actions?query=workflow%3Arun-tests+branch%3Amain)\n[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/plin-code/kml-parser/fix-php-code-style-issues.yml?branch=main\u0026label=code%20style\u0026style=flat-square)](https://github.com/plin-code/kml-parser/actions?query=workflow%3A\"Fix+PHP+code+style+issues\"+branch%3Amain)\n[![Total Downloads](https://img.shields.io/packagist/dt/plin-code/kml-parser.svg?style=flat-square)](https://packagist.org/packages/plin-code/kml-parser)\n\nA simple Laravel package to parse KML and KMZ files, extracting geographic data in a convenient format.\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require plin-code/kml-parser\n```\n\nYou can publish the config file with:\n\n```bash\nphp artisan vendor:publish --tag=\"kml-parser-config\"\n```\n\nThis is the contents of the published config file:\n\n```php\nreturn [\n    /*\n    |--------------------------------------------------------------------------\n    | Default KML Namespace\n    |--------------------------------------------------------------------------\n    |\n    | This value is the default namespace used for parsing KML files.\n    | Usually you don't need to change this.\n    |\n    */\n    'namespace' =\u003e 'http://www.opengis.net/kml/2.2',\n    \n    /*\n    |--------------------------------------------------------------------------\n    | Temporary Directory\n    |--------------------------------------------------------------------------\n    |\n    | This value determines the temporary directory used for extracting KMZ files.\n    | If null, the system temp directory will be used.\n    |\n    */\n    'temp_directory' =\u003e null,\n];\n```\n\n## Usage\n\n### Basic Usage\n\n```php\nuse PlinCode\\KmlParser\\KmlParser;\n\n// Parse a KML file\n$parser = new KmlParser();\n$parser-\u003eloadFromFile('path/to/file.kml');\n\n// Get placemarks (points of interest)\n$placemarks = $parser-\u003egetPlacemarks();\n\n// Get styles\n$styles = $parser-\u003egetStyles();\n\n// Get style maps\n$styleMaps = $parser-\u003egetStyleMaps();\n\n// Get document name and description\n$name = $parser-\u003egetDocumentName();\n$description = $parser-\u003egetDocumentDescription();\n\n// Convert to GeoJSON\n$geoJson = $parser-\u003etoGeoJson();\n```\n\n### Working with KMZ Files\n\nKMZ files are ZIP archives that contain a KML file and possibly other assets like images:\n\n```php\n// Parse a KMZ file\n$parser = new KmlParser();\n$parser-\u003eloadFromKmz('path/to/file.kmz');\n\n// Work with the data just like with KML\n$placemarks = $parser-\u003egetPlacemarks();\n```\n\nExtract all files from a KMZ:\n\n```php\nuse PlinCode\\KmlParser\\KmzExtractor;\n\n$extractor = new KmzExtractor();\n$files = $extractor-\u003eextractAllFiles('path/to/file.kmz', 'extraction/directory');\n```\n\n### Facade Usage\n\nYou can also use the provided facade:\n\n```php\nuse PlinCode\\KmlParser\\Facades\\KmlParser;\n\n$placemarks = KmlParser::loadFromFile('path/to/file.kml')-\u003egetPlacemarks();\n```\n\n## Testing\n\n```bash\ncomposer test\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n## Security Vulnerabilities\n\nPlease review [our security policy](../../security/policy) on how to report security vulnerabilities.\n\n## Credits\n\n- [Daniele Barbaro](https://github.com/plin-code)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplin-code%2Fkml-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplin-code%2Fkml-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplin-code%2Fkml-parser/lists"}