Hi everybody, I am working with Windows 7 64 bits and 0.47 osmosis. I am interested in extract some countries from old planet.osm but my osmosis doesn´t work properly with planet.osm older than 2010. It seems it is a problem about the XML format. From 2010 all the files are in 0.6 XML format but older files are in 0.5 XML format or even 0.4 or 0.3. When I used osmosis the message is: "Warning: Expected version 0.6 but received 0.5 ... Thread for task 1-read-xml failed ... Node 2 does not have a version attribute as OSM 0.6 are required to have. Is this a 0.5 file? ... the execution is aborted" I can only think in two possible solutions:
Does anybody know how to fix this problem? Is it available in somewhere an older version of osmosis which allows to work with 0.5 XML format? Does anybody hear about a tool which converts XML formats? Thanks!!! asked 12 Jan '15, 15:11 frose SimonPoole ♦ |
You may simply have to convert from 0.5 to 0.6 with osmosis 0.35 first: http://wiki.openstreetmap.org/wiki/Osmosis/Detailed_Usage_0.35#--migrate answered 13 Jan '15, 19:15 SimonPoole ♦ 1
Problem solved!!! I have tried the SimonPoole´s idea and it works perfectly. I used osmosis 0.35 to migrate from 0.5 to 0.6: osmosis --read-xml-0.5 enableDateParsing=no file="input_0.5.osm" --migrate --write-xml file="output_0.6.osm" After that I was able to extract my AOI with osmosis 0.47. Tank you very much!
(15 Jan '15, 09:00)
frose
|
The differences between 0.5 and 0.6 are not so big; you can probably get away with changing your XML in an editor or scripting language of your choice by changing every occurrence of
to
that would add the new required attributes and work as long as you're just processing the data for reading. Having said that, the Osmosis version 0.35 should indeed work with the old files - what exactly is the error message, and are you sure that you've called 0.35 and not accidentally used the newer version? answered 13 Jan '15, 06:58 Frederik Ramm ♦ I have tried to edit the XML but notepad ++ says that It is a too big file. Could you recommend me a programme which could manage files with the size of a planet.osm? I am not really sure if I am using 0.35 osmosis. The message says so at the beginning but in the middle of the message I receive contradictory info: ene 13, 2015 11:38:01 AM org.openstreetmap.osmosis.core.Osmosis run INFORMACIËN: Osmosis Version 0.35 ene 13, 2015 11:38:01 AM org.java.plugin.registry.xml.ManifestParser <init> INFORMACIËN: got SAX parser factory - org.apache.xerces.jaxp.SAXParserFactoryImpl@a1b4e7 ene 13, 2015 11:38:01 AM org.java.plugin.registry.xml.PluginRegistryImpl configure INFORMACIËN: configured, stopOnError=false, isValidating=true ene 13, 2015 11:38:01 AM org.java.plugin.registry.xml.PluginRegistryImpl register INFORMACIËN: plug-in and fragment descriptors registered - 1 ene 13, 2015 11:38:01 AM org.java.plugin.standard.StandardPluginManager activatePlugin INFORMACIËN: plug-in started - org.openstreetmap.osmosis.core.plugin.Core@0.35.0 ene 13, 2015 11:38:01 AM org.openstreetmap.osmosis.core.Osmosis run INFORMACIËN: Preparing pipeline. ene 13, 2015 11:38:01 AM org.openstreetmap.osmosis.core.Osmosis run INFORMACIËN: Launching pipeline execution. ene 13, 2015 11:38:01 AM org.openstreetmap.osmosis.core.Osmosis run INFORMACIËN: Pipeline executing, waiting for completion. ene 13, 2015 11:38:01 AM org.openstreetmap.osmosis.core.xml.v0_6.impl.OsmElementProcessor begin ADVERTENCIA: Expected version 0.6 but received 0.5. ene 13, 2015 11:38:01 AM org.openstreetmap.osmosis.core.pipeline.common.ActiveTaskManager waitForCompletion GRAVE: Thread for task 1-read-xml failed org.openstreetmap.osmosis.core.OsmosisRuntimeException: Node 2 does not have a version attribute as OSM 0.6 are required to have. Is this a 0.5 file?
ene 13, 2015 11:38:01 AM org.openstreetmap.osmosis.core.Osmosis main GRAVE: Execution aborted. org.openstreetmap.osmosis.core.OsmosisRuntimeException: One or more tasks failed
Thanks for your answer
(13 Jan '15, 11:14)
frose
3
If you need a to perform line-by-line changes to large files on Windows, try "sed" from http://unxutils.sourceforge.net/ .
(13 Jan '15, 11:17)
SomeoneElse ♦
|