DOC: Added sjoin_nearest method to examples gallery. (#2259)

This commit is contained in:
ryanward-io
2021-12-11 15:43:18 +00:00
committed by GitHub
parent 554d2ee376
commit ee8adfb276
+18
View File
@@ -213,6 +213,24 @@
"source": [
"pointdf.sjoin(polydf, how=\"left\", predicate=\"within\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can also conduct a nearest neighbour join with `sjoin_nearest`."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"pointdf.sjoin_nearest(polydf, how=\"left\", distance_col=\"Distances\")\n",
"# Note the optional Distances column with computed distances between each point\n",
"# and the nearest polydf geometry."
]
}
],
"metadata": {