Created
May 8, 2022 22:34
-
-
Save alpha-beta-soup/6a4b0295534c501e7d008645706fbe12 to your computer and use it in GitHub Desktop.
Demonstration of Uber's H3 DGGS which I did at the Palmerston North Regional GIS Forum (May 2022)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# H3 Demonstration\n", | |
"\n", | |
"h3-py: Uber's H3 Hexagonal Hierarchical Geospatial Indexing System in Python\n", | |
"\n", | |
"## Installation\n", | |
"\n", | |
"From PyPi (conda is an option, too):" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"pip install h3" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## Basic usage\n", | |
"\n", | |
"What's the cell ID for The Chalet?" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"import h3\n", | |
"theChalet = (-40.36733404184009, 175.62988653271506)\n", | |
"resolution = 12\n", | |
"cellId = h3.geo_to_h3(*theChalet, resolution)\n", | |
"cellId" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Do the reverse: what's the coordinate of the centre of that cell?" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"h3.h3_to_geo('8cbb2b66e3723ff')" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"This is not the same as the original, so we have **lost information**. However, perhaps what we have really done is **discarded useless information**? Do we actually know the original precision of `theChalet`? I just clicked on Google Maps to get it. I never wanted the precision of my mouse click recorded to **thirteen decimal places**.\n", | |
"\n", | |
"![40 digits: You are optimistic about our understanding of the nature of distance itself](https://imgs.xkcd.com/comics/coordinate_precision.png)\n", | |
"\n", | |
"The DGGS _resolution_ allows us to be explicit about the claim we're making of a geographic object's precision." | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Add some extra dependencies just for visualiation purposes — these are not strictly required for working with a DGGS.\n", | |
"- `shapely`: geometry\n", | |
"- `pandas`: data analysis library\n", | |
"- `geopandas`: geospatial datatype extensions for `pandas` (uses `shapely`)\n", | |
" - `folium` interactive maps in a Jupyter Notebook\n", | |
" - `mapclassify`, `matplotlib` other dependencies for geopandas to show interactive maps, get colours, etc." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"pip install shapely pandas geopandas folium mapclassify matplotlib" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"What does that DGGS cell of the Chalet look like?" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"from shapely.geometry import Polygon\n", | |
"import geopandas as gpd\n", | |
"\n", | |
"gdf = gpd.GeoDataFrame({\n", | |
" 'thing': ['The Chalet'],\n", | |
" 'cellId': cellId,\n", | |
" 'geometry': Polygon(h3.h3_to_geo_boundary(cellId, geo_json=True))\n", | |
"}, crs=\"epsg:4326\")\n", | |
"gdf.geometry[0].wkt" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"gdf" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"scrolled": false | |
}, | |
"outputs": [], | |
"source": [ | |
"gdf.explore()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## Polygons in H3\n", | |
"\n", | |
"Points can be represented as a cell (at a specific resolution).\n", | |
"\n", | |
"What about polygons? I have roughly traced the Chalet's building footprint from OpenStreetMap and copied it here. Then I do Python magic to convert it to a GeoJSON object for use in GeoPandas.\n", | |
"\n", | |
"Again, note the absurd coordinate precision." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"chaletPolygon = Polygon([\n", | |
" [175.62980128436485, -40.367208360351114],\n", | |
" [175.6298267653505, -40.36723901433664],\n", | |
" [175.62987035124698, -40.36721755654824],\n", | |
" [175.62991728990474, -40.36722113284678],\n", | |
" [175.62998970954814, -40.36730696395485],\n", | |
" [175.62989516168037, -40.367360097443175],\n", | |
" [175.62983347087302, -40.36735294486065],\n", | |
" [175.62980530767837, -40.36732739991685],\n", | |
" [175.62977513282695, -40.36734425958085],\n", | |
" [175.62970874815383, -40.36733812879443],\n", | |
" [175.62962023525634, -40.36726302661556],\n", | |
" [175.6297496518413, -40.36720325135217],\n", | |
" [175.62980128436485, -40.367208360351114]\n", | |
"])\n", | |
"chaletPolygonGeoJSON = gpd.GeoSeries([chaletPolygon]).__geo_interface__['features'][0]\n", | |
"chaletPolygonGeoJSON" | |
] | |
}, | |
{ | |
"attachments": { | |
"Screenshot%20from%202022-04-28%2010-12-26.png": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAApAAAAFCCAYAAABGq+3pAAAABHNCSVQICAgIfAhkiAAAABl0RVh0U29mdHdhcmUAZ25vbWUtc2NyZWVuc2hvdO8Dvz4AACAASURBVHic7N17XFTV3vjxDzPA4G1UUBQBNRA163jXx5TfyfIe4hXEu+ZRRFQUL3k0zaPmLcUUVKqTmpmWWGpHDZIw7ahloeQVL4kgIIKKcVUYh/n94cN+HBgug3ipvu/Xq1ey99prrb32Xnu+s/baeyycnJwMAAaDAQsLC4r+WwghhBBCiEepnnUFhBBCCCHEH4sEkEIIIYQQwiwSQAohhBBCCLNYVmQjg8FQ2fUQQgghhBDPQEWeeykzgJRgUQghhBDiz8tUrFdWUFliAFmYWdH/CyGEEEK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kpKCvHx8ZjNZj744AP++te/amWMHj2a3NxcrFYrDoeDlStXar3HU6ZMYcyYMRw5coS0tDSSkpLIy8tjwYIFqKrK2LFjGT58OPn5+VobrlixgvHjx5OQkEBlZSXz5s2jurpaO66zZs2ib9++lJaW8v777/PAAw9w1VVX+dw/f/f1tttu49Zbb8VgMLBu3Tq+/PJLrrzySvR6PZdddhnXXHMNLpfrlPbVl86ugcTERN58801mz57Nvn37tLY4fvw4v//977ttlylTpjBy5EiOHTvG+PHjueGGG7rcHkC/fv146KGHiImJwePx8PXXX/PWW2/hcDi6PPe7u+dYrVbmzJnDyJEjqa+v55133umynbq6z3RVx0DKCaStTjw3pk+fzrFjx9ot0925O2XKFIYPH868efO0dRYtWsSnn37K+vXrmTJlCmPHjqWsrIz09HTi4+N57bXXSElJYcSIEfTt25f333+f999/X1vfYrGwYMECsrOzqa6u5n/+53+0NoHur0tf54cQPya9IkB6RUdHk5WVhV6vp6amhu+//96v3sdAREREkJqayp133olOp+Oll17i+uuv5w9/+ANms5mXX36Z5cuXM3v2bIxGIw8++CD33nsvixYt6lDWxRdfzP33389jjz3Gtm3bSEtL4/HHH6eqqsrntqdNm8Yf//hH8vLySExMZNmyZezdu5cvvvgCgMjISMrKypg5cyb9+/fnvffe46233mLOnDmYTCY+/PBDhgwZws6dO5k8eTJXXnkld955J9XV1QwaNIjnnnuOO++8kw0bNlBSUsLvfvc7Jk+eDODXvkVGRhIWFsb06dN99hBMmzaNX/ziFzz00EMcPXqUMWPGsGDBAu655x62b9/OzTffzOrVq32GEaPRyNNPP83tt99OQUEB4eHhTJgwwe92e/LJJ3G73fz617+msbGRa6+9loyMDC1A/uxnP2P+/PnU1NRw9913M2PGDO6+++4O5YSFhbXbh7Fjx7JgwQK2bdtGRUUFAMOGDePhhx/Wjuvrr7/OJ5984vMLzVNPPUVzczPTp0/H4XAwdepUlixZwrRp07Db7UDrVIa5c+dSV1dHfHw8y5Ytw2az8eWXX5Kens7cuXN58MEH2bdvH1arlRdffB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Q0AJCcn8/LLLxMdHY3H4+Hll1/m73//+1mutRBC9BxfPZASIIUQP3r79u3j+PHjjBkzhvDwcMaPH8+WLVuwWq0sXLgQq9VKS0sLzz33HBs2bDjb1RVCiB7lK0AqSUlJKoDH48HtdmO1WgkNDT2rFRVCiLPh8ssv55FHHkGv13P8+HFMJhNRUVE4nU6eeeYZtm7derarKIQQPa6xsRGbzYZer0ena539aDjLdRJCiF5j48aNuFwuHn/8ce2pbIfDwbx589i+fftZrp0QQvQe8hCNEEK0sXnzZv77v/8bp9NJU1MTjzzyiIRHIYQ4gQxhCyGED8OGDcNut7N///6zXRUhhDirZAhbCCH8lJ+ff7arIIQQvZYMYQshhBBCiIBIgBRCCCGEEAHReX/PRwghhBBCiO4oitK+B1LCpBBCCCGEONGJGbHDELaqqj1WGSGEEEII0bv5yoYSIIUQQgghRKe6DJCKoqAoCna7vUcrJYQQQgghei+73a7lRK8OcyAlQAohhBBCCC9vgGxLB7RLlTqdjoaGhp6vnRBCCCGE6FUaGhq0//tMu7zYdiHvGzU1NRIihRBCCCF+xBoaGqipqekwfA2gJCcnazMjVVXV/ng8HjweD0FBQQQHB/tcWQghhBBCnB+8GbC5uRm73Y5Op0On02kZsG0O7PD/wm47lK0oCg6HQ5sXKU9oCyGEEEKcn7wZUFEU9Hq9z+DoZThxRVVV2y2o1+u1ROolQVIIIYQQ4vzQNve1DYwn/r2tTnsgvX/3BkoJjUIIIYQQ57cTA2Nn0xc7BMgTC+js30IIIYQQ4vzUXe7rNEB2VYD0RgohhBBCnB9OppPw/wE4ojBzR6/QYwAAAABJRU5ErkJggg==" | |
} | |
}, | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Polyfill\n", | |
"\n", | |
"To convert a polygon to a set of DGGS cells, we \"fill\" it, the operation is called \"polyfilling\". It's conceptually similiar to rasterising a polygon.\n", | |
"\n", | |
"Just as we did to get the H3 cell of a point, we need to be explicit about our resolution. Let's try a higher resolution this time.\n", | |
"\n", | |
"Each additional resolution adds 7 times as many cells. 7 is therefore the H3 DGGS' \"aperture\".\n", | |
"\n", | |
"![Screenshot%20from%202022-04-28%2010-12-26.png](attachment:Screenshot%20from%202022-04-28%2010-12-26.png)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"resolution = 13\n", | |
"chaletPolygonH3 = h3.polyfill_geojson(\n", | |
" chaletPolygonGeoJSON['geometry'], resolution\n", | |
")\n", | |
"chaletPolygonH3" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Notice how much more terse this representation is: it only requires eight cell IDs. \n", | |
"\n", | |
"As text, compression would be extremely efficient (and lossless), since they all share the same prefix `8dbb2b66e37`. This makes a DGGS an excellent format for use with a web API (possibly avoiding the need for large `POST` payloads in favour of URL parameters.)\n", | |
"\n", | |
"Also, no funny characters, or flipping coordinates." | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Now, let's `map` these H3 cells into Shapely polygons so we can look at them with GeoPandas.\n", | |
"\n", | |
"Since this is a nice opportunity to write a generic function that accepts a set of H3 cells to render them, we'll do that too." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"import itertools\n", | |
"from typing import Set\n", | |
"\n", | |
"from shapely.geometry import Polygon, Point\n", | |
"\n", | |
"def h3set_as_gdf(label: str, h3set: Set[str], asPolygon: bool = True) -> gpd.GeoDataFrame:\n", | |
" if asPolygon:\n", | |
" geomFunc = lambda cell: Polygon(h3.h3_to_geo_boundary(cell, geo_json=True))\n", | |
" else:\n", | |
" geomFunc = lambda cell: Point(h3.h3_to_geo(cell)[::-1])\n", | |
" gdf = gpd.GeoDataFrame({\n", | |
" 'thing': itertools.repeat(label, len(h3set)),\n", | |
" 'cellId': list(h3set),\n", | |
" 'geometry': map(geomFunc, h3set)\n", | |
" }, crs='epsg:4326')\n", | |
" return gdf\n", | |
"\n", | |
"h3set_as_gdf('The Chalet', chaletPolygonH3, asPolygon=True).head()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"h3set_as_gdf('The Chalet', chaletPolygonH3).explore()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"scrolled": true | |
}, | |
"source": [ | |
"## Large things\n", | |
"\n", | |
"Wouldn't representing a large object require a lot of cells? That could be _more information_ than recording the outer ring as a series of coordinate pairs." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"path = gpd.datasets.get_path('naturalearth_lowres')\n", | |
"world = gpd.read_file(path)\n", | |
"oceania = world[(world.continent == \"Oceania\")]\n", | |
"oceania.explore()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"How do we polyfill a GeoDataFrame?\n", | |
"\n", | |
"We'll lean on another dependency." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"pip install h3pandas" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"scrolled": true | |
}, | |
"outputs": [], | |
"source": [ | |
"import h3pandas\n", | |
"\n", | |
"resolution = 5\n", | |
"oceania = oceania.h3.polyfill(resolution, explode=True)\n", | |
"\n", | |
"oceania.head(5)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"scrolled": true | |
}, | |
"outputs": [], | |
"source": [ | |
"oceania['geometry_h3'] = oceania.apply(\n", | |
" lambda row: Polygon(\n", | |
" h3.h3_to_geo_boundary(row.h3_polyfill, geo_json=True)\n", | |
" ),\n", | |
" axis=1\n", | |
")\n", | |
"\n", | |
"oceania.head(5)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"oceania = oceania.set_geometry('geometry_h3')\n", | |
"oceania.explore()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"This is **only resolution 5**. Polyfill will result in a lot of cells at higher resolutions.\n", | |
"\n", | |
"But remember that this is a **hierarchical DGGS**, and we can use that to compress our representation of polygons." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"resolution = 5\n", | |
"oceania = world[(world.continent == \"Oceania\")]\n", | |
"oceania = oceania.h3.polyfill(resolution, explode=False)\n", | |
"oceania" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"This added the `h3_polyfill` column: a set of H3 cell ids that approximate the original polygon.\n", | |
"\n", | |
"Because our input was a MultiPolygon, this is in fact a list of lists, one list for each Polygon part of the original MultiPolygon.\n", | |
"\n", | |
"Let's \"compact\" them.\n", | |
"\n", | |
"**Compaction**: when all 7 of a cell's higher resolution \"children\" are present in a set, we can omit the 7 child IDs, and record just the parent cell ID. We can do this recursively until we have the smallest possible set of IDs without losing information.\n", | |
"\n", | |
"(Note: since we did `explode=False`, we're somewhat fighting against Pandas design for _panel data_, and it'd probably be better to use normalise the data.)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"import pandas as pd\n", | |
"\n", | |
"flattened = list(itertools.chain(*oceania.h3_polyfill))\n", | |
"compacted = h3.compact(flattened)\n", | |
"\n", | |
"diff = len(flattened) - len(compacted)\n", | |
"perc = diff / len(flattened) * 100.\n", | |
"print('Set reduced by {0:,} cells ({1:.1f}%)'.format(diff, perc))\n", | |
"\n", | |
"h3set_as_gdf('Oceania', compacted).explore()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Anywhere all of the \"children\" of a large \"parent\" cell are *all* present in the complete set, we can **store a reference to the parent instead of all of its children**.\n", | |
"\n", | |
"No information has been lost (except, possibly: the original higher resolution)." | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## \"Doing GIS\"\n", | |
"\n", | |
"There are some foundational geospatial operations that we can implement with a DGGS.\n", | |
"\n", | |
"For two spatial objects, do/are they:\n", | |
"- Equal\n", | |
"- Disjoint (no point in common)\n", | |
"- Touching (meet, but do not overlap)\n", | |
"- Contained\n", | |
"- Cover\n", | |
"\n", | |
"Because objects in DGGSs are often expressed in terms of sets, we can typically just use operations on sets rather than getting out our \"geometry crayons\". Working with sets lends itself well to functional programming and set theory. Terms like _intersection_, _union_, and _difference_ are familiar in both GIS and in sets (mathematics). Working with sets, it is often the case that complex ideas can be expressed in remarkably terse code — which makes for quite robust software.\n", | |
"\n", | |
"We'll use sample data from http://geojson.xyz/" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"antarctica = gpd.read_file('https://d2ad6b4ur7yvpq.cloudfront.net/naturalearth-3.3.0/ne_10m_admin_0_antarctic_claims.geojson')\n", | |
"antarctica.explore()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"antarctic_nz = antarctica[(antarctica.sov_a3 == \"NZ1\")]\n", | |
"antarctic_au = antarctica[(antarctica.sov_a3 == \"AU1\")]\n", | |
"antarctic_gb = antarctica[(antarctica.sov_a3 == \"GB1\")]\n", | |
"antarctic_chl = antarctica[(antarctica.sov_a3 == \"CHL\")]\n", | |
"\n", | |
"resolution = 3\n", | |
"\n", | |
"from typing import Union, Set, Any\n", | |
"from shapely.geometry import Polygon, MultiPolygon, mapping\n", | |
"\n", | |
"def h3set(geom: Union[Polygon, MultiPolygon]) -> Set:\n", | |
" '''\n", | |
" Returns a Set of H3 cells representing a Shapely (Multi)Polygon\n", | |
" The result is a flat set (multiple geometry distinction is not retained)\n", | |
" '''\n", | |
" collection = geom.geoms if geom.geom_type == 'MultiPolygon' else [geom]\n", | |
" h3set = map(lambda geom: h3.polyfill_geojson(mapping(geom), resolution), collection)\n", | |
" h3set = itertools.chain(*h3set) # Flatten\n", | |
" return set(h3set)\n", | |
"\n", | |
"antarctic_nz_h3, antarctic_au_h3, antarctic_gb_h3, antarctic_chl_h3 = map(\n", | |
" lambda gdf: h3set(gdf.geometry.values[0]),\n", | |
" [antarctic_nz, antarctic_au, antarctic_gb, antarctic_chl]\n", | |
")" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"h3set_as_gdf('British Antarctic Claim', antarctic_gb_h3).explore()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"scrolled": false | |
}, | |
"outputs": [], | |
"source": [ | |
"h3set_as_gdf('Chilean Antarctic Claim', antarctic_chl_h3).explore()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"We can get the set intesection of these two areas using Python's built-in `Set.intersection()` method.\n", | |
"\n", | |
"Example:\n", | |
"\n", | |
"```python\n", | |
"x = {\"apple\", \"banana\", \"cherry\"}\n", | |
"y = {\"google\", \"microsoft\", \"apple\"}\n", | |
"\n", | |
"z = x.intersection(y)\n", | |
"\n", | |
"print(z)\n", | |
"\n", | |
"{'apple'}\n", | |
"```\n", | |
"\n", | |
"Exactly the same principle applies to H3 cell IDs, which are also (hexadecimal) strings (or 64-bit integers)." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"scrolled": true | |
}, | |
"outputs": [], | |
"source": [ | |
"disputed = antarctic_chl_h3.intersection(antarctic_gb_h3)\n", | |
"\n", | |
"h3set_as_gdf('Chilean/British Disputed Antarctic Claims', disputed).explore()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Which parts of Antarctica are Chilean, and not disputed by the UK?" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"undisputed = antarctic_chl_h3.difference(antarctic_gb_h3)\n", | |
"h3set_as_gdf('Chilean/British Undisputed Antarctic Claims', undisputed).explore()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Are the British claims a subset of the Chilean claims?" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"antarctic_gb_h3.issubset(antarctic_chl_h3)" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Let's explore both claims together." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"both_claims = antarctic_gb_h3.union(antarctic_chl_h3)\n", | |
"h3set_as_gdf('Chilean/British Antarctic Claims', both_claims).explore()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Set methods like `union` and `intersection` are built in to Python. Once you have DGGS cells, **it is possible to do some spatial analysis tasks using native Python without any dependencies.** These kinds of operations are extremely efficient, and a lot easier than using GIS libraries." | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Do NZ and Australian claims intersect?" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"not antarctic_nz_h3.isdisjoint(antarctic_au_h3)" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Do NZ and Australian claims touch?" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"# Touching?\n", | |
"touches = lambda ab: h3.h3_indexes_are_neighbors(ab[0], ab[1])\n", | |
"\n", | |
"# Cartesian product of two sets\n", | |
"product = itertools.product(antarctic_nz_h3, antarctic_au_h3)\n", | |
"any(map(touches, product))" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Do NZ and Chilean claims touch?" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"product = itertools.product(antarctic_nz_h3, antarctic_chl_h3)\n", | |
"any(map(touches, product))" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Where do NZ and Australian claims touch?" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"scrolled": true | |
}, | |
"outputs": [], | |
"source": [ | |
"# All combinations (Cartesian product)\n", | |
"product = list(itertools.product(antarctic_nz_h3, antarctic_au_h3))\n", | |
"\n", | |
"boundary = set(\n", | |
" itertools.chain(*set(\n", | |
" itertools.compress(\n", | |
" product, \n", | |
" map(touches, product)\n", | |
" ) # All combinations where a.touches(b) is True\n", | |
" ))\n", | |
") # Working back from a pairwise data structure to a simple set\n", | |
"\n", | |
"h3set_as_gdf('NZ/Aus Antarctic border', boundary).explore()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"This last one required us to calculate a Cartesian product, which is inefficient. We can re-work this using another useful property of a DGGS like H3: getting a cell's k-nearest neighbours.\n", | |
"\n", | |
"- k = 1 → returns a cell's 1st degree neighbours\n", | |
"- k = 2 → returns a cell's 2nd degree neighbours\n", | |
"- k = n → returns a cell's nth degree neigbours\n", | |
"\n", | |
"Another way to think of it is **buffering**." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"cell, k = '83ed1dfffffffff', 3\n", | |
"h3set_as_gdf(f'{k} ring of {cell}', h3.k_ring(cell, k)).explore()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"So if we take the k=1 neighbours of the NZ claims, and then check for intersection with the Australian claim, we can infer that they touch." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"k = 1\n", | |
"kring = map(lambda cell: h3.k_ring(cell, k), antarctic_nz_h3)\n", | |
"kring = set(itertools.chain(*kring)) # Flatten\n", | |
"\n", | |
"kring_exterior = kring.difference(antarctic_nz_h3) # Just get \"buffered\" cells, excluding any in the input set\n", | |
"\n", | |
"aus_border_cells = kring_exterior.intersection(antarctic_au_h3)\n", | |
"\n", | |
"h3set_as_gdf(f'{k} ring of {cell}', aus_border_cells).explore()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## Lines?\n", | |
"\n", | |
"Representing lines in a DGGS seems odd at first. but remember: any line you've ever used in a GIS has some level of positional uncertainty or inaccuracy. It is not known to an infinite degree of precision, so representing a line as a set of DGGS cells (each with an explicit area) is not actually very different to what you're already doing.\n", | |
"\n", | |
"You may have converted a vector line to a raster; that is similar but involves a loss of even more information than converting it to an _ordered set_ of DGGS cells.\n", | |
"- Order is retained\n", | |
"- Lines can self-intersect (cells can be repeated)\n", | |
"- In a hexagonal DGGS, there are six shared-edge directions, rather than four wth a shared-edge (and another four of a different type).\n", | |
"\n", | |
"Unfortunately, `h3-pandas` doesn't ([yet](https://github.com/DahnJ/H3-Pandas/issues/11)) have a function for encoding linestrings as H3 cells, like `polyfill` for polygons.\n", | |
"\n", | |
"Let's make one!" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"coastlines = gpd.read_file('https://d2ad6b4ur7yvpq.cloudfront.net/naturalearth-3.3.0/ne_50m_coastline.geojson')\n", | |
"coastlines.explore()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"scrolled": true | |
}, | |
"outputs": [], | |
"source": [ | |
"from shapely.geometry.linestring import LineString\n", | |
"from shapely.geometry.multilinestring import MultiLineString\n", | |
"from typing import Iterator, Union\n", | |
"\n", | |
"def sequential_deduplication(func: Iterator[str]) -> Iterator[str]:\n", | |
" '''\n", | |
" Decorator that doesn't permit two consecutive items to be the same\n", | |
" '''\n", | |
" def inner(*args):\n", | |
" iterable = func(*args)\n", | |
" last = None\n", | |
" while (cell := next(iterable, None)) is not None:\n", | |
" if cell != last:\n", | |
" yield cell\n", | |
" last = cell\n", | |
" return inner\n", | |
"\n", | |
"@sequential_deduplication\n", | |
"def h3polyline(line: Union[LineString, MultiLineString], resolution: int) -> Iterator[str]:\n", | |
" '''\n", | |
" Iterator yeilding H3 cells representing a line,\n", | |
" retaining order and self-intersections\n", | |
" '''\n", | |
" if line.geom_type == 'MultiLineString':\n", | |
" # Recurse after getting component linestrings from the multiline\n", | |
" for l in map(lambda geom: h3polyline(geom, resolution), line.geoms):\n", | |
" yield from l\n", | |
" else:\n", | |
" coords = zip(line.coords, line.coords[1:])\n", | |
" while (vertex_pair := next(coords, None)) is not None:\n", | |
" i, j = vertex_pair\n", | |
" a = h3.geo_to_h3(*i[::-1], resolution)\n", | |
" b = h3.geo_to_h3(*j[::-1], resolution)\n", | |
" yield from h3.h3_line(a, b) # inclusive of a and b\n", | |
"\n", | |
"resolution = 3\n", | |
"coastlines_h3 = list(map(lambda geom: h3polyline(geom, resolution), coastlines.geometry))#[:2]\n", | |
"coastlines_h3 = list(itertools.chain(*coastlines_h3)) # flatten\n", | |
"\n", | |
"coastlines_h3_gdf = h3set_as_gdf('World Coastlines H3', coastlines_h3, asPolygon=False)\n", | |
"\n", | |
"coastlines_h3_gdf.explore()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"What parts of the coastline are subject to Antarctic claims, and who claims them?" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"# Polyfill \"official\" Antarctic claims\n", | |
"antarctica_h3 = antarctica[(antarctica['type'] == 'Official')].h3.polyfill(resolution, explode=True)\n", | |
"\n", | |
"# Join (merge) our coastlines H3 set with the Antarctic claims\n", | |
"merged = coastlines_h3_gdf.merge(antarctica_h3, left_on='cellId', right_on='h3_polyfill', suffixes=[None, '_'])\n", | |
"\n", | |
"# Render it\n", | |
"merged.explore(column='name', cmap='Set1')" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Can we work **across different resolutions**? What if we H3-indexed our coastlines coarsely, but our Antarctic claims at a higher resolution?\n", | |
"\n", | |
"Some bindings, notably [`h3-pg`](https://github.com/bytesandbrains/h3-pg/blob/master/docs/api.md#r-tree-operators) (H3 bindings for PostgreSQL/PostGIS), have special operators to efficiently handle operations that work across resolutions.\n", | |
"\n", | |
"> ## R-tree Operators\n", | |
"> \n", | |
"> Operator: `h3index && h3index`\n", | |
"> \n", | |
"> Returns `true` if the two H3 indexes intersect\n", | |
">\n", | |
"> ---\n", | |
"> \n", | |
"> Operator: `h3index @> h3index`\n", | |
"> \n", | |
"> Returns `true` if A contains B\n", | |
"> \n", | |
"> ---\n", | |
"> \n", | |
"> Operator: `h3index <@ h3index`\n", | |
"> \n", | |
"> Returns `true` if A is contained by B\n", | |
"> \n", | |
"> ---\n", | |
"> \n", | |
"> Operator: `h3index <-> h3index`\n", | |
"> \n", | |
"> Returns the distance in grid cells between the two indices\n", | |
"\n", | |
"In Python we will just take a cell and use the API to calculate its parent cell at a specific resolution, to do a table join.\n", | |
"\n", | |
"The alternative would be to perform a polyfill on both inputs at the same, higher resolution. This can be expensive if one or both datasets is very large or detailed. Also, it may not be sensible to represent a dataset at a particularly high H3 resolution if it isn't actually recorded with high precision. You may have also received a dataset with location encoded as H3 cells at a lower resolution than the rest of your analysis." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"scrolled": true | |
}, | |
"outputs": [], | |
"source": [ | |
"lower_res = 2\n", | |
"higher_res = 4\n", | |
"antarctica_h3 = antarctica[(antarctica['type'] == 'Official')].h3.polyfill(higher_res, explode=True)\n", | |
"\n", | |
"coastlines_h3 = list(map(lambda geom: h3polyline(geom, lower_res), coastlines.geometry))#[:2]\n", | |
"coastlines_h3 = list(itertools.chain(*coastlines_h3)) # flatten\n", | |
"\n", | |
"coastlines_h3_gdf = h3set_as_gdf('World Coastlines H3', coastlines_h3, asPolygon=False)\n", | |
"\n", | |
"# Pandas doesn't do merge/join with functions, so we create an extra column containing the higher resolution\n", | |
"# cell's parent (lower-resolution) cell ID\n", | |
"lowResColName = f'cellId_res_{lower_res}'\n", | |
"antarctica_h3[lowResColName] = [h3.h3_to_parent(cell, lower_res) for cell in antarctica_h3['h3_polyfill']]\n", | |
"\n", | |
"merged = coastlines_h3_gdf.merge(\n", | |
" antarctica_h3,\n", | |
" left_on='cellId',\n", | |
" right_on=lowResColName,\n", | |
" # how='left', # Include this if you want to keep unmatched parts of the world coastline\n", | |
" suffixes=[None, '_']\n", | |
")\n", | |
"\n", | |
"merged.explore(column='name', cmap='Set1')\n" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## Other things\n", | |
"\n", | |
"- Very few people want to consume DGGS output. Converting from a DGGS to a raster or vector is not easy. But using a DGGS internally can make analysis a lot simpler, and it involves explicit accounting of positional accuracy.\n", | |
"- What's the best way to represent a raster in a DGGS? What's an efficient way to index it?\n", | |
"- High resolution polyfilling can be extremely resource intensive and take a long time. In Pandas there are ways to perform indexing on rows in parallel. I've done most of my H3 work in PostgreSQL. Polyfilling is by far the most expensive part of any pipeline with H3—but once it is done, doing analysis and extracting results tends to be very fast.\n", | |
" - Running analysis pipelines at a low resolution is an effective way of validating a method or process quickly; and once satisfied, a longer run can be kicked off at a higher resolution." | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"![I wrote 20 short programs in Python yesterday. It was wonderful. Perl, I'm leaving you.](https://imgs.xkcd.com/comics/python.png)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"# import antigravity" | |
] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python 3", | |
"language": "python", | |
"name": "python3" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.9.12" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 4 | |
} |
Best usage example: after installing Jupyter Notebook, download this file and run jupyter notebook
in a conda environment, in the same directory. The Python version must be at least 3.8 in order to have GeoPandas >= 0.10.
This is ideal for making use of the frequent use of explore
on GeoDataFrames in this notebook.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Any questions, feel free to leave a comment