and want to get 3 vectors of coordinates (longitude, latitude, altitude) (Float64)
I did
a = split.(a)
longitude = [parse(Float64, c[1]) for c in a]
latitude = [parse(Float64, c[2]) for c in a]
altitude = [parse(Float64, c[3]) for c in a]
I wonder if there isn’t a quicker method
function timethis()
a = ["0.309042 46.586349 111.4", "0.309042 46.586349 111.1", "0.309042 46.586349 111.3"]
a = split.(a)
longitude = [parse(Float64, c[1]) for c in a]
latitude = [parse(Float64, c[2]) for c in a]
altitude = [parse(Float64, c[3]) for c in a]
return longitude, latitude, altitude
end
julia> @time timethis()
0.407742 seconds (237.58 k allocations: 11.579 MiB, 39.14% gc time)
([0.309042, 0.309042, 0.309042], [46.586349, 46.586349, 46.586349], [111.4, 111.1, 111.3])