Skip to content

Instantly share code, notes, and snippets.

@om-henners
Created April 28, 2019 14:30
Show Gist options
  • Save om-henners/f7182f38c818fb310bb949935fdd235b to your computer and use it in GitHub Desktop.
Save om-henners/f7182f38c818fb310bb949935fdd235b to your computer and use it in GitHub Desktop.
Generate KML files for the first three levels of resolution using Uber Eng's h3 (https://github.com/uber/h3)
mkdir -p KML
for resolution in $(seq 1 3); do
h3ToHier ${resolution} | h3ToGeoBoundary 1 res${resolution}cells.kml "Res ${resolution} Cells" > KML/res${resolution}cells.kml
h3ToHier ${resolution} | h3ToGeo 1 res${resolution}centers.kml "Res ${resolution} Centers" > KML/res${resolution}centers.kml
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment