Closed apiszcz closed 4 years ago
This example works correctly
%scala
import magellan.Point
import org.apache.spark.sql.functions.udf
val toPointUDF = udf{(x:Double,y:Double) => Point(x,y) }
import magellan.Point
import org.apache.spark.sql.functions.udf
%scala
val points = sc.parallelize(Seq((-1.0, -1.0), (-1.0, 1.0), (1.0, -1.0))).toDF("x", "y")
display(points.withColumn("point", toPointUDF('x, 'y)))
This resolved the issue
import magellan. import org.apache.spark.sql.magellan.dsl.expressions.
import org.apache.spark.sql.Row import org.apache.spark.sql.functions. import org.apache.spark.sql.types.
Following this tutorial https://magellan.ghost.io/magellan-geospatial-processing-made-easy/
I see this error
**``` command-3454590236003018:9: error: not found: value point point($"pickup_longitude",$"pickup_latitude"))