Skip to content

Commit

Permalink
Merge pull request databrickslabs#306 from databrickslabs/feature/fix…
Browse files Browse the repository at this point in the history
…_polyfill_docs

Fixed grid_polyfill docs
  • Loading branch information
Milos Colic authored Mar 5, 2023
2 parents 1241b04 + befeb40 commit a441bb6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/code-example-notebooks/spatial-indexes.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@

# COMMAND ----------

from mosaic import polyfill
from mosaic import grid_polyfill

indexed_neighbourhoods = (
neighbourhoods
.select("*", polyfill("geometry", lit(resolution)).alias("ix_set"))
.select("*", grid_polyfill("geometry", lit(resolution)).alias("ix_set"))
.drop("geometry")
)

Expand Down
2 changes: 1 addition & 1 deletion docs/source/usage/grid-indexes.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@
{
"cell_type": "code",
"source": [
"from mosaic import polyfill\n\nindexed_neighbourhoods = (\n neighbourhoods\n .select(\"*\", polyfill(\"geometry\", lit(resolution)).alias(\"ix_set\"))\n .drop(\"geometry\")\n)\n\nindexed_neighbourhoods.show()"
"from mosaic import grid_polyfill\n\nindexed_neighbourhoods = (\n neighbourhoods\n .select(\"*\", grid_polyfill(\"geometry\", lit(resolution)).alias(\"ix_set\"))\n .drop(\"geometry\")\n)\n\nindexed_neighbourhoods.show()"
],
"metadata": {
"application/vnd.databricks.v1+cell": {
Expand Down
2 changes: 1 addition & 1 deletion docs/source/usage/quickstart.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@
{
"cell_type": "code",
"source": [
"from mosaic import polyfill\n\nneighbourhoods = (\n geoJsonDF\n .repartition(sc.defaultParallelism)\n .select(\"*\", explode(polyfill(\"geometry\", lit(10))).alias(\"h3\"))\n .drop(\"geometry\")\n)\n\nneighbourhoods.show()"
"from mosaic import grid_polyfill\n\nneighbourhoods = (\n geoJsonDF\n .repartition(sc.defaultParallelism)\n .select(\"*\", explode(grid_polyfill(\"geometry\", lit(10))).alias(\"h3\"))\n .drop(\"geometry\")\n)\n\nneighbourhoods.show()"
],
"metadata": {
"application/vnd.databricks.v1+cell": {
Expand Down

0 comments on commit a441bb6

Please sign in to comment.