I am working on a problem where I need to plot output on a Map.
In past I was able to do it using geopandas
.
However this does not work in databricks-notebook
.
I tried to look at alternative but couldn't find any on web.
Pages I looked in to:
GeoPandas Notebook
Processing Geospatial Data at Scale With Databricks
In the second link it mentions that we can read .shp
flies through scala
however it does not mention what sc
in ShapefileReader.readToGeometryRDD
stands for?
%scala
var spatialRDD = new SpatialRDD[Geometry]
spatialRDD = ShapefileReader.readToGeometryRDD(sc, "/ml/blogs/geospatial/shapefiles/nyc")
var rawSpatialDf = Adapter.toDf(spatialRDD,spark)
rawSpatialDf.createOrReplaceTempView("rawSpatialDf") //DataFrame now available to SQL, Python, and R