Cyrille37 edited this page Apr 10, 2012 · 5 revisions
Clone this wiki locally

Welcome to the yapafo wiki!


Yapafo is a PHP-based library for reading and writing OpenStreetMap data. It may be used to develop both OpenStreetMap-editing batches and web-based editing applications.


Yapafo requires PHP version 5.3 or later.

It is necessary to install Pear's Log package. On a Debian-based operating system, you may do this so:

sudo apt-get install php-pear sudo pear install Log


When the OSM_Api class is instantiated default options are set, so you go nothing to specify.

Otherwise you can specify somes configuration options:

  • url (mandatory): URL of the API instance to be used, use OSM_Api::URL_PROD_UK for the main OpenStreetMap server
  • url4Write (optional): API instance where changesets must be sent, by default, the "url" parameter will be used for writing changesets
  • simulation (bool): specify whether the changes should be written.
  • appName: application name, it will be mentioned as the user agent and in the "created_by" tag in changesets
  • outputFolder:
  • log:

Library options may be changed any time with the setOption($key,$value).