/chivia-server

Backend for https://github.com/koba/chivia-app-ios

Primary LanguageJavaScriptGNU General Public License v3.0GPL-3.0

chivia-backend

Fetch elevation data

  1. Replace the process_segment function in lua profile for this one:

    function process_segment(profile, segment)
        io.write(segment.source.lat .. ',' .. segment.source.lon, '\n')
        io.write(segment.target.lat .. ',' .. segment.target.lon, '\n')
        os.exit()
    end
  2. Run

    node ./scripts/build_osrm_data.js uruguay.bicycle/uruguay-latest.osm.pbf bicycle.chivia > ./data/osrm/uruguay.bicycle/latlng/uruguay-latest.txt
  3. Restore process_segment function to it's original

  4. Run

    node ./scripts/fetch_elevation_data.js uruguay.bicycle/uruguay-latest.osm.pbf bicycle.chivia

Build data

node ./scripts/build_osrm_data.js uruguay.bicycle/uruguay-latest.osm.pbf bicycle.chivia