From ff7e4a3259f3e241360e176a90e297116f551e58 Mon Sep 17 00:00:00 2001 From: typebrook Date: Thu, 5 Dec 2019 10:26:15 +0800 Subject: update --- scripts/match-road.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'scripts/match-road.sh') diff --git a/scripts/match-road.sh b/scripts/match-road.sh index 7c61f58..ba94ee2 100755 --- a/scripts/match-road.sh +++ b/scripts/match-road.sh @@ -19,7 +19,7 @@ set -e # put yout Mapbox token here ACCESS_TOKEN=$(cat ~/settings/tokens/mapbox) - # number of coordinates for each Mapbox Map Matching API request, Maximum value is 100 +# number of coordinates for each Mapbox Map Matching API request, Maximum value is 100 LIMIT=10 ORIGIN_DATA=/tmp/origin @@ -28,11 +28,12 @@ RESPONSE=/tmp/response # extract data from the given gpx file, dump coordindate and time with the following format: # [121.0179739,14.5515336] 1984-01-01T08:00:46.234 function get_data() { + # FIXME sometimes trkpt doesn't contains time, need to return empty line paste -d' ' \ - <(sed -nE '// s/.*lon=\"([^\"]+).*/\1/p' $1) \ - <(sed -nE '// s/.*lat=\"([^\"]+).*/\1/p' $1) \ - <(sed -nE '// s/.*