geohashing

How to Decode GEOHASH Column using PySpark

How to Decode GEOHASH Column using PySpark Question: I’m trying to decode the GEOHASH to Latitude and Longitude using the pygeohash library. Below is my code import pygeohash as pgh from pyspark.sql.types import StringType udf1 = udf(lambda x: pgh.decode(x)) add_latlong = add.withColumn(‘location’, udf1(col(‘GEOHASH’))) However, I’m getting the result below: +————+——————–+ | GEOHASH| location| +————+——————–+ |w284nyv39qzn|[Ljava.lang.Objec…| …

Total answers: 1