yapafo is a library which permits to authenticate, read and write objects in the OpenStreetMap database.
- Read objects from API, XAPI and Overpass-API.
- Write objects to API.
- Authenticate with Basic or OAuth.
- The class instance and its osm objects are serializable.
- A bit of geometry stuff (is node inside/outside polygon)
- ...
Requirements are covered in composer.json
.
Php extensions:
Php libraries:
- install dependencies
composer install
- A web page to create OAuth Access Token
- change directory
cd examples-web
- launch the php webserver
php -S localhost:8000
- then open a browser at
http://localhost:8000/OAuthRequestAccess.php
- change directory
- Other command-line examples in
examples-console
- the tool examples/OAuthRequestAccess.php is an easy way to get OAuth Access Token (and understand the protocol phases ;-)
- Overpass-API requests are shown in examples/OApiQuery.php and ApiOApiQuery.php
- The OAuth 1.0 Protocol : http://tools.ietf.org/html/rfc5849
- OSM OAuth doc : http://wiki.openstreetmap.org/wiki/OAuth
- PSR-3: Logger Interface