/oneway-data-api

🚗 A simple API for getting oneway data from improveosm.org ➡️

Primary LanguagePHPGNU General Public License v3.0GPL-3.0

The ImproveOSM project has been cancelled by Grab, hence, this repository is obsolete.

Oneway Data API

This is an API to get the latest oneway data from improveosm.org

It consists mainly of two files:

update.php

  • Used to get the latest data from the server (should be run daily)
  • Invoke for example via cron as php -f update.php

index.php

  • Used to get the data for a specified bounding box
  • The bounding box must be passed as an URL parameter
  • Example: /index.php/?bbox=18,-34,19,-33 gets all ways in Cape Town

Configuration & Deployment

  1. Copy everything into a web directory of your choice
  2. Create a config.php file from the config.sample.php template and fill it with your MySQL DB settings. Don't forget to create the respective DB and user beforehand.
  3. Set up a daily scheduled execution of update.php (at midnight UTC+0 is good)

Getting started