如何使用Spark SQL 2.3.1将数据帧转换为Geojson

时间:2018-12-07 12:52:47

标签: json apache-spark-sql geojson

经过预测分析后,我想将数据框形式的结果转换为Geojson形式。数据框代码:

header { background: #EDEDED; /*overflow: hidden;*/ position: -webkit-sticky; /* Safari */ position: sticky; top: 0; }

这些列我想根据以下示例进行转换并另存为geojson:

val df4 = predictions.select("coordinates","auswertezeit","geschwindigkeit","strecke_id", "predictedLabel" ).withColumnRenamed("predictedLabel", "verkehrsstatus")

谢谢

0 个答案:

没有答案