You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Line 83 and 84:
df_bldg = spark.read.table("building_50k").where(mos.st_geometrytype(F.col("geom_wkt")) == "Point")
df_bldg_shape = spark.read.table("building_50k").where(mos.st_geometrytype(F.col("geom_wkt")) == "MultiPolygon")
The st_geometrytype returns POINT and MULTIPOLYGON in capital letter, therefore the correct code should be:
df_bldg = spark.read.table("building_50k").where(mos.st_geometrytype(F.col("geom_wkt")) == "POINT")
df_bldg_shape = spark.read.table("building_50k").where(mos.st_geometrytype(F.col("geom_wkt")) == "MULTIPOLYGON")
Otherwise the dataframe df_bldg and df_bldg_shape will be empty.
To Reproduce
Run the notebook
Expected behavior
df_bldg and df_bldg_shape not empty if the filter is working as expected.
The text was updated successfully, but these errors were encountered:
Describe the bug
The spatial KNN notebook:
https://github.com/databrickslabs/mosaic/blob/main/notebooks/examples/python/SpatialKNN/02.%20Spatial%20KNN.py
Line 83 and 84:
df_bldg = spark.read.table("building_50k").where(mos.st_geometrytype(F.col("geom_wkt")) == "Point")
df_bldg_shape = spark.read.table("building_50k").where(mos.st_geometrytype(F.col("geom_wkt")) == "MultiPolygon")
The st_geometrytype returns POINT and MULTIPOLYGON in capital letter, therefore the correct code should be:
df_bldg = spark.read.table("building_50k").where(mos.st_geometrytype(F.col("geom_wkt")) == "POINT")
df_bldg_shape = spark.read.table("building_50k").where(mos.st_geometrytype(F.col("geom_wkt")) == "MULTIPOLYGON")
Otherwise the dataframe df_bldg and df_bldg_shape will be empty.
To Reproduce
Run the notebook
Expected behavior
df_bldg and df_bldg_shape not empty if the filter is working as expected.
The text was updated successfully, but these errors were encountered: