I have a DATAFRAME
+----------+----------+
| longitude| latitude|
+----------+----------+
|-7.1732833|32.0414966|
|-7.1732844|32.0414406|
|-7.1732833|32.0414966|
|-7.1732833|32.0414966|
|-7.1732833|32.0414966|
|-7.1732833|32.0414966|
expected result
+----------+----------+-----------------+----------------------+----------------+-------------+
| longitude| latitude| origin_longitude |destination_longitude|origine_latitude|destination_latitude
+----------+----------+ -----------------+---------------------+----------------+
|-7.1732833|32.0414966|-7.1732833 |-7.1732844 |32.0414966 |32.0414406
|-7.1732844|32.0414406|-7.1732844 |-7.1732833 |32.0414406 |32.0414966
|-7.1732833|32.0414966|-7.1732833 |-7.1732833 |32.0414966 |32.0414966
|-7.1732833|32.0414966|-7.1732833 |-7.1732833 |32.0414966 |32.0414966
|-7.1732833|32.0414966|-7.1732833 |-7.1732833 |32.0414966 |32.0414966
|-7.1732833|32.0414966|
how can i do that with scala , I'm new in scala , please help . Thank you .