From 1feea790fc6f52ee92b4fb5ac3a1df3725774a88 Mon Sep 17 00:00:00 2001 From: typebrook Date: Fri, 6 Dec 2019 18:32:50 +0800 Subject: update --- scripts/match-road.sh | 45 ++++++++++++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 15 deletions(-) (limited to 'scripts/match-road.sh') diff --git a/scripts/match-road.sh b/scripts/match-road.sh index 1f613b2..2cd416f 100755 --- a/scripts/match-road.sh +++ b/scripts/match-road.sh @@ -77,8 +77,7 @@ function validate_matched_points() { echo $VALID_DATA | jq -c '.geometry.coordinates[]' | while read point; do if [[ ${point:0:1} != '[' ]]; then - echo -n abandoned data: > /dev/tty - echo $(sed -n "$point p" $ORIGIN_DATA) | tee /dev/tty + echo $(sed -n "$point p" $ORIGIN_DATA) | while read coor time; do echo $coor $(date -d $time +%s); done sed -i 1d $MATCHED elif head -1 $MATCHED | grep -F $point > /dev/null; then index=$(head -1 $MATCHED | cut -d' ' -f2) @@ -105,7 +104,7 @@ function complete_data() { # Make GPX format for output # Take input with format: [lon,lat] [time] function make_gpx() { - sed -E 's/\[([^,]+),([^,]+)\] (.*)/