A command-line app for extracting names and coordinates of stops in Kalkati.net XML database dumps. For use primarily in the data update process of our search index.
Build the uberjar: lein uberjar
, and then run it with java -jar
. It'll be in the target
directory.
The program fetches the database dump from HSL, and expects the HSL API username and password to be in
environment variables HSL_API_USERNAME
and HSL_API_PASSWORD
.
The program takes as arguments names of cities and the corresponding filenames into which the station data should be added. For example:
java -jar kalkati-extraction-0.0.1.jar Helsinki=/path/to/helsinki.txt Vantaa=/path/to/vantaa.txt
Each line written to the given files will be a stop name and its coordinates (lon,lat) separated by a pipe.
Vuosaaren uimahalli|25.1416744,60.2088469