Spatial joining with a map reduce program on top of Apache Spark using the Apache Sedona spatial extension
We make use of Spark map and reducebyKey operations to complete the task. Convert the resultant RDD back to a DataFrame before returning the result. The returned DataFrame should contain the number of points within each rectangle in an ascending order of count values. You don’t need to return rectangles.