Last active
July 21, 2016 09:44
-
-
Save kiliankoe/29b6ad308f7d25496054614fe1ae09b7 to your computer and use it in GitHub Desktop.
Coord pairs
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
let coords = [ | |
13.723288596942021, | |
51.02547875103679, | |
13.723312997594022, | |
51.02553463039252, | |
13.723399424330877, | |
51.02551749405676 | |
] | |
let lats = coords.enumerated().filter({ $0.offset % 2 == 0 }).map { $1 } | |
let lngs = coords.enumerated().filter({ $0.offset % 2 != 0 }).map { $1 } | |
for pair in zip(lats, lngs) { | |
print(pair) | |
} | |
// (13.723288596942021, 51.025478751036793) | |
// (13.723312997594022, 51.025534630392521) | |
// (13.723399424330877, 51.025517494056757) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment