Created
May 28, 2018 08:59
-
-
Save ybonnel/d926f312d3c2b76b60ab0e1f34082d35 to your computer and use it in GitHub Desktop.
Just a little script to get bounds of GTFS file
This file contains 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
unzip -p *.gtfs.zip stops.txt | | |
tr -d '"' | | |
tail -n+2 | | |
awk -F "," 'BEGIN{minLat=100; maxLat=-100; minLon=100; maxLon=-100 }{ if ( $5 > maxLat ) maxLat=$5; if ( $5 < minLat ) minLat =$5; if ($6 < minLon) minLon=$6; if ($6 > maxLon) maxLon = $6 }END {print minLat" "minLon" "maxLat" "maxLon}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment