Last active
January 18, 2016 21:39
-
-
Save ddd1600/a0fb563fef4d25da4bd3 to your computer and use it in GitHub Desktop.
script that takes the latest csv export of costar data in the downloads directory, converts to kml, and opens. see costar_vrt.vrt for the file necessary here. Must be hard-coded to to work in a different path.
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
latest_download = Dir.glob("/Users/daviddouglas/Downloads/Export*.csv").max do |a,b| | |
File.ctime(a) <=> File.ctime(b) | |
end | |
puts "latest download is #{latest_download}" | |
`cp #{latest_download} /Users/daviddouglas/sikuli_scripts` | |
basename = File.basename(latest_download) | |
`mv #{basename} costar_data.csv` | |
`ogr2ogr -f KML costar_data.kml costar_vrt.vrt` | |
`open costar_data.kml` | |
`say "save the KML somewhere else to prevent from being overwritten"` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment