Created
August 15, 2017 14:43
-
-
Save zouzias/9d4377849c9e70ce4af7fa8814df5464 to your computer and use it in GitHub Desktop.
Convert from GeoJSON geometry.coordinates property to WKT (Polygons)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val geometryToWKT = udf((a: Seq[Seq[Seq[Double]]]) => "POLYGON ((" + a.head.map(x => x.head + " " + x.last).mkString(", ") + "))") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment