Osm2go-server
This page refers to the discontinued Osm2go server. The OSM2Go mobile mapping application has its own page here.
What/Why is OSM2GO?
Osm2go is a standalone, minimal-dependency, Java based OSM server. The main OSM stack requires a fair number of external packages and configuration to get started (MySQL, Apache, Ruby). Since this isn't an environment I had hanging around, there's a barrier to entry if I want to do any kind of analysis or playing around with OSM data.
Current Status
Very, very early alpha. Successfully loads planet-xxx.osm.bz2 files, and seems to correctly serve /map requests (sufficient to keep JOSM happy at any rate). However, saving nodes seems to cause an error in JOSM; not sure why; will have to have a look to see why that is.
How to get/use OSM2GO
Download
- You need a 1.5 Java environment (java.sun.com)
- You need some data from planet.openstreetmap.org
- An OSM2GO download (hosted @ http://www.nirima.com/osm - please be gentle, it's my home line. Feel free to mirror it!)
There's 2 versions - if you have something like tomcat, you can just use the .war file - drop it into a servlet container. For everyone else, download the .zip file somewhere convenient (with enough disk space - you'll need about 8Gb for a full planet.osm). Just run the start.bat (or the command inside it if you're linux) and you should (after a bunch of debug statements) have an OSM server sitting on port 8088.
Usage : Loading the data
Use a web browser, go to localhost:8088. Follow the link to install a database. Enter the local path name to the planet.osm.bz2 file, hit install. Go make dinner. It takes about 2-3 hrs to do the bulk import for a full dataset on my machine.
Usage : JOSM
You can change the URL used in JOSM to localhost:8088, and you'll be reading from your local database.
Tech Stuff
OSM2Go is using Apache Derby (nee Cloudscape) underneath as an embedded database. You can access this data through JDBC, or via a client (e.g. SQuirrel: squirrel-sql.sourceforge.net)
Derby has the advantage of having no extra dependencies, so it doesn't need installing. Unfortunately, it also has some interesting performance characteristics, such as 'IN' clause processing being absolutely atrocious, and flaky support around DISTINCT. So, the map API stuff had to be written to use temporary tables instead.
TODOs
- Full editing support (basically all of the 0.3 API) - it's nearly there, but something is causing JOSM to be unhappy (could be segments with node ids of 0 'cos they're missing in the dataset?)
- Multi-database support (probably MySQL first, maybe SQL*Server next). These will perform much much faster than Derby, and won't have to use the map hacks.
- Synchronise to OSM. Basically so you can add data in your local OSM2GO, then 'push' the entire change set out to the 'real' OSM when you're happy with it.
- Integrate the java tile renderer stuff so you can see your dataset
- OSM2GoMobile - deploy onto a PDA / mobile phone.
- Source - yes - it's a bit clunky to show at the moment, but it'll be open source.
Bugs, Abuse
nigel dot magnay at gmail dot com