1

I have the following dataframe o spark :

   __________________________
  │Longitude   │latitude     |
  ├────────────┼─────────────┼
  | -7.07378166|33.826661    |
  └────────────┴─────────────┴

I want to apply the ST_Geomfromtext from GeoSpark , but I don't know how to do it

I tried the following code , but id doesn't work for me

Dataset<Row> dataframe = df.withColumn("ST_Geomfromtext ", ST_GeomFromText(col("Longitude"),col("Latitude")));

I need your help .

Thank you

HBoulmi
  • 333
  • 5
  • 16
  • Does this answer your question? [ST\_geomfromtext function using Spark / java](https://stackoverflow.com/questions/62830434/st-geomfromtext-function-using-spark-java) – Som Jul 10 '20 at 17:10
  • duplicate of - https://stackoverflow.com/q/62830434/4758823 – Som Jul 10 '20 at 17:10

0 Answers0