[OSM-dev] Visualising change (.osc) files

Brett Henderson brett at bretth.com
Thu Nov 27 23:46:39 GMT 2008


S Knox wrote:
> Wow,
> Thanks for all the info Brett!
> I have subscribed to itoworld, and it's extremely useful, however it 
> would be useful both to see node changes and also to be able to 
> visualise a wider area.
>
> When you say "if you can wait for API 0.6" what do you mean, as I am 
> assuming that Osmosis is able to deal with 0.6 format data now.
Yes, osmosis can deal with 0.6 format data now.  There are two 
problems.  1. There is no source data in 0.6 format.  2. The 0.6 
implementation may change before it is released.
>
> I had a go at populating a pgsql database with the new 0.6 schema, 
> using version 0.29.4 of Osmosis. unfortunately the latest version zip 
> linked from the wiki page is corrupted for some reason. I get an error 
> as follows:
> SEVERE: Thread for task 1-read-xml-0.6 fail
> java.lang.NumberFormatException: null
> at java.lang.Integer.parseInt(Unknown Source)
>
> ..... etc down to the calling of the run method of 0.6 Xml Reader;
> at com.bretth.osmosis.core.xml.v0_6.XmlReader.run(XmlReader.java:109)
>
> my command line is as follows:
>  java -classpath "C:\Documents and Settings\Stevo\My 
> Documents\Maps\osmosis-0.29.4\osmosis.jar";"C:\Program 
> Files\Java\jdk1.6.0_07\bin\postgis_1.4.0SVN.jar";"C:\Program 
> Files\Java\jdk1.6..0_07\bin\postgresql-8.3-604.jdbc4.jar" -Xmx1048m 
> com.bretth.osmosis.core.Osmosis --read-xml-0.6 "C:\Documents and 
> Settings\Stevo\My Documents\Maps\uk-081119.osm.bz2" --write-pgsql-0.6 
> host=***** database=****user=****
>
> Not sure where that's coming from really.
I assume you tried to use a 0.5 file.  I think osmosis prints a warning 
if you use the wrong version of file, I should make it abort instead.  
You need to use the --migrate task to convert a 0.5 file into 0.6 
format.  In other words, do something like this:
osmosis --read-xml-0.5 myfile.osm --migrate --write-pgsql-0.6 .....

There is a --migrate-change task (not sure if it's in the version you 
have) that will let you migrate change files as well.  These aren't true 
migration tasks because they always assume the version of an entity is 
1.  Version information is not available in 0.5 format files.  This 
shouldn't be an issue for the osmosis pgsql schema which can only store 
one version anyway.

Brett





More information about the dev mailing list