Skip to content

Introduce a way to "get" geo data

Past due by about 11 years 66% complete

As of version 0.12, Data Twist supports command line options. These options are:

Usage overview: data-twist.rb [input file] [output file]
-l, --load FILE Load a file
-o, --output FILE Create the output file
-h, --help Display this usage overview
-v, --version Show the version number

The next sensible option to include appears to be "-g, --get PLACE" to he…

As of version 0.12, Data Twist supports command line options. These options are:

Usage overview: data-twist.rb [input file] [output file]
-l, --load FILE Load a file
-o, --output FILE Create the output file
-h, --help Display this usage overview
-v, --version Show the version number

The next sensible option to include appears to be "-g, --get PLACE" to help people automatically download OpenStreetMap information.

Deep in the madness I call my head, I was thinking that this should take the format of executing a "wget" command to a OSM server. The defined "PLACE" would be a country name, and we would use something like YAML to load the corresponding download URL for "wget."

Somewhere around two seconds after that, I realised that not everyone would love me for this platform specific solution. We can use OpenURI in Ruby instead:
https://makandracards.com/makandra/2831-ruby-downloading-files

Method:
Ruby would take the command line argument, it would use that to look up the URL that matches the argument (e.g. Japan > http://download/japan), it would execute the download, and then run the input function using the downloaded file name.

Probably.