API v0.6/2009 Migration testing

From OpenStreetMap Wiki
Jump to navigation Jump to search

Back in April 2009 we migrated from version 0.5 to 0.6 of the API (introducing Changesets and various other changes). During the switchover we had test API servers and opened them up for anyone to try out the new API. "crowd sourced" testing we might say.

Old API testing information (Historical interest only)

information sign

The information on this page is of historical interest only.

The following information was provided back in 2009 to encourage folks to get involved in testing out the version 0.6 API.

Test servers

There are public API v0.6 servers running for testing purposes. The aim is for every tool that uses the API to be able to be tested against these servers to make sure that it is still working, or that it is fixed.

The following servers are available (each of them have their own separate database, so you need to sign up for each of them separately):

The servers are updated periodically to the latest code in svn. Their database may be wiped to fix problems. The current status can be found at http://apis.dev.openstreetmap.org/.

0.6 changesets are available at http://planet.openstreetmap.org/test06 are are created on the same schedule as the production changesets. They are extracted from the database of the postgresql based api above. More details in the Osmosis section below.

Reporting Bugs

If you find a problem, with the API code please send a mail to the OpenStreetMap dev mailing list, or file a bug in trac with the milestone of "OSM 0.6". If the bug is with a tool, please go to the appropriate mailing list for that editor, as not all the authors of the editors are on the OpenStreetMap dev mailing list.

Editor/Tool Mailing List Trac Reporting
Potlatch OSM dev OSM trac, assign to the component "Potlatch (Flash Editor)"
JOSM JOSM dev JOSM trac
Merkaartor Merkaartor OSM trac, assign to the component "Merkaartor"
Osmosis OSM dev OSM trac, assign to the component "Osmosis"
Vespucci General discussion Google Code Issues

API and website

Typically you'd test the API by testing how the editors / tools work with the API, as detailed below. But you could also take a look at the new displays for changesets on the website, and (in conjunction with editor testing) see if the displays work as expected :

  • 'Recent Changes' display showing any recently closed changeset across the map
  • 'history' tab showing recently closed changeset which overlap with a particular bounding box
  • 'User edits' display showing recently closed changeset by a particular user.
  • Please verify that the data browser works as expected.

Editors

The most commonly used method for editing the osm data.

The following requires testing in all editors

  • Creation of new changesets
  • Saving a new version of an object fails if it has been modified elsewhere prior to upload, but since the last download in that editor. A nice error message should be returned requesting the user to redownload the area.
  • The number of edits in one upload are limited to 50,000 changes as specified in the capabilities api call.
  • <Add items here>

Potlatch

Potlatch is working under API 0.6 but fairly little testing has yet been done.

The following areas require extra testing:

  • Creating of changesets half way through an editing session, press the C key.
  • Undelete ('U')/history ('H') features
  • Delete Way (shft-del) seems to be deleting the way, but leaving the nodes behind.
  • <Add items here>

JOSM

From JOSM version 1523 and later the API version is automatically detected. There are significant bugs in that version so use 1526 or later. Automatic detection may mean you only need to do one change:

  • In connection settings change the "Base Server URL". For publicly available server please look at the list above. Typically there will be a /api on the end e.g. http://api06.dev.openstreetmap.org/api/

You'll need to register a user account on your chosen test server. If you choose the same username and password as normal, then that's one less thing to change within JOSM, otherwise...

  • Change the username and password to appropriate values (registered user account on your chosen test server)

Old versions of josm-latest <1523 also require the following:

  • Go to the advanced preferences, and add the property "osm-server.version" with the value "0.6".

No need to restart JOSM but you'll want to clear down your data layers when switching server, to avoid confusion. JOSM releases older than 1071 wont work at all with v0.6.

The following areas require extra testing:

  • Try weird comment values (missing, >255 chars, weird UTF chars, etc) check error messages are helpful.
  • Check how your changeset looks on the website (user edits display) Check bbox was calculated sensibly.
  • <Add items here>

Merkaartor

You can use Merkaartor from svn. Inside the preferences dialog go to the "Data" tab, check the "Use 0.6 API" checkbox and change the server to one of the servers mentioned above. A restart of Merkaartor is required :-(

The following areas require extra testing:

  • <Add items here>

Vespucci

Now Vespucci 0.6.0 is published on the Website and on the Android Market. Please report all Bugs the Bugtracker.

Data Change/Replication Tools

Tools that will modify osm data using the api, or allow the replication of data.

Osmosis

The latest version of Osmosis in svn support API 0.6. This means any version of osmosis from 0.29.3 onwards. It is best to build from the latest source, as the code is getting regular improvements. A pre-compiled nightly build is available at http://www.bretth.com/osmosis/. As of version 0.30.3, the postgresql api database is supported. The postgresql tasks are not documented yet but the documentation for the mysql tasks can be used by replacing "mysql" with "apidb" (eg. --write-apidb).

The version of osmosis used by the test APIs hosted on dev.openstreetmap.org will be available at http://dev.openstreetmap.org/~edgemaster/, and will be updated whenever rebuilt.

Testing changesets are available from http://planet.openstreetmap.org/test06 and run on the same schedule as the production changesets. These changesets are produced from the postgresql test api database.

Osmosis supports 0.5 and 0.6 at the same time. To invoke 0.6 tasks, append a "-0.6" to the long version of the task name. For example, --read-xml becomes --read-xml-0.6. Short names such as --rx are not supported for 0.6 tasks yet. The 0.30.3 version in svn defaults to 0.6 versions of tasks.

A basic migration task called --migrate is available for converting 0.5 files into 0.6 format. It loses version information but otherwise should work correctly. If using an older planet file it will also lose user information but any relatively recent planet (within the last month) will be fine. An example command line would be osmosis --read-xml-0.5 data05.osm --migrate --write-xml-0.6 data06.osm. A --migrate-change task is also available for migrating change files.

Unit tests in Osmosis are used to verify all 0.6 database tasks and many of the other tasks as a side effect.

OSMXAPI

Does the OSMXAPI support 0.6, and ready to go?

Please test the following:

  • <Add items here>

Bulk Upload Scripts

Are there any bulk upload scripts? Add them as a subheading here.

Bulk_upload.pl

Bulk_upload.pl uses [[1]] and allows for bulk uploads through the API.

Data Readers

Tools that only read from the api

Planet Dump Tool

Still needs to be implemented for Postgres

Tile@Home

Are the T@H clients able to read from the 0.6 api?


Other?

We can track down all the software described on the wiki and label things with {{Not 0.6 compatible}}. The list of things so labelled is at: Category:Things that do not work with 0.6. We need to check if any of these present a serious problem for anyone, and work on updating the code where necessary (See API v0.6#Summary of changes required in clients)