https://github.com/andyg2/parse-gadm-kml
https://github.com/andyg2/parse-gadm-kml
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/andyg2/parse-gadm-kml
- Owner: andyg2
- Created: 2021-09-02T08:36:08.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-09-03T05:17:55.000Z (almost 5 years ago)
- Last Synced: 2025-03-03T14:13:24.102Z (over 1 year ago)
- Language: PHP
- Size: 23.6 MB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Parse gadm.org KML to Google Maps Polygon
For this example I downloaded the Philippines KMZ level 3 file from here: https://gadm.org/download_country_v3.html
I used [7-Zip](https://www.7-zip.org/download.html) to extract the `gadm36_PHL_3.kml` file to produce `gadm36_PHL_3.kml`.
On line 3 of parse.php - The level I want to generate (based on the KML level):
> `$level = 3;`
On line 4 of parse.php - The first part of the filename you want to parse
> `$file_part = 'gadm36_PHL_';`
This will parse the entries of `gadm36_PHL_3.kml` into the `cords_3` directory structure in this repo.
[Coordinates to Map overlay Polygon](https://jsfiddle.net/andyg2/0t1gwnja/25/)