mirror of
https://github.com/wassname/geopandas.git
synced 2026-09-12 12:20:25 +08:00
DOC: Added sjoin_nearest method to examples gallery. (#2259)
This commit is contained in:
@@ -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": {
|
||||
|
||||
Reference in New Issue
Block a user