Le 24/12/2010 à 21:03:24 +1100 "Nicolas Dumoulin" [email protected] a écrit au sujet de "[OSM-dev-fr] OSM API < 0.6 => PBF":
> Au fait, j'obtiens une erreur avec un vieux planet de 2007 : > osmosis-0.35 --read-xml-0.5 file="planet-070103.osm.bz2" --migrate --bp > file=auvergne.poly completeWays=yes --used-node --write-xml > file="auvergne-070103.osm.bz2" > INFO: Pipeline executing, waiting for completion. > 24 déc. 2010 10:02:40 > org.openstreetmap.osmosis.core.xml.v0_5.impl.OsmElementProcessor begin > ATTENTION: Expected version 0.5 but received 0.3. > 24 déc. 2010 10:18:12 > org.openstreetmap.osmosis.core.pipeline.common.ActiveTaskManager > waitForCompletion > GRAVE: Thread for task 1-read-xml-0.5 failed > org.openstreetmap.osmosis.core.OsmosisRuntimeException: Unable to parse xml > file planet-070103.osm.bz2. publicId=(null), systemId=(null), > lineNumber=23805688, columnNumber=34. > at > org.openstreetmap.osmosis.core.xml.v0_5.XmlReader.run(XmlReader.java:113) > at java.lang.Thread.run(Thread.java:619) > Caused by: > org.apache.xerces.impl.io.MalformedByteSequenceException: Invalid > byte 2 of 4-byte UTF-8 sequence. J'ai eu dernièrement une erreur dans une relations dans l'extrait australia-oceania.osm qui faisait planter osmosis. Mais heureusement qu'il était en XML, sinon je n'aurai pas pu le résoudre. J'avais échangé par mél privé avec Matt qui fait des cartes Garmin pour l'Australie: ,----- [ ] | Hi Matt, | | I have compiled by my own a Garmin map around Brisbane for my | friends. | | I noticed that in the geofabrik.de extract australia-oceania was an | relation with uid=-1 and caused osmosis to fail: | | Original XML: | | <relation id="70443" version="1" changeset="833531" user="" uid="-1" timestamp="2009-01-25T10:20:25Z"> | | <member type="way" ref="25485329" role="outer"/> | <member type="way" ref="30472972" role="inner"/> | <tag k="type" v="multipolygon" /> | </relation> | | I modified the XML using two SED command line text editor runs: | | "c:\Program Files\GnuWin32\bin\sed.exe" | s/user=\"\"/user=\"eingesettet0815\"/g australia-oceania.osm >australia-oceania2.osm | | "c:\Program Files\GnuWin32\bin\sed.exe" s/uid=\"-1/uid=\"314159/g australia-oceania2.osm >australia-oceania3.osm | | | Result is: | | <relation id="70443" version="1" changeset="833531" user="eingesettet0815" uid="314159" timestamp="2009-01-25T10:20:25Z"> | | <member type="way" ref="25485329" role="outer"/> | <member type="way" ref="30472972" role="inner"/> | <tag k="type" v="multipolygon" /> | </relation> | | After I was able to cut the OSM file using osmosis in the usual way | (assuming I renabed the modified OSM file back to | australia-oceania.osm) : | | osmosis --read-xml file=australia-oceania.osm enableDateParsing=no | --bounding-box top=-26.0 left=152.0 bottom=-30.0 right=154.0 | --write-xml file=bbosmosis.osm | | | To try to correct the main database, I modified the relation wich was | causing the error to put my username and uid on it: | | http://www.openstreetmap.org/browse/changeset/6534218 | | Hopefully that this corrected the database and subsequent extracts | will work without trouble...? | | Maybe this experience can help in the future if similar problems | come again... | | Kindly | Hendrik Oesterlin | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | Message original***Original Message***Ursprüngliche Nachricht | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | From: [email protected] Matt White | To: [email protected] "[email protected]" | Cc: | Send: 06/12/2010 11:32:14 | Subject: OSM Australia map issues | Attach.: Nachricht.html | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | Hi all - heaps of you have emailed me about the maps not generating | recently. My apologies for the delay in responding - just been best | man in a wedding, so it's been crazy busy, and I haven't had the | chance to fix the issue. | | | Anyway, I think I've resolved the issue now (something somewhere | changed in the OSM data set to do with relations which broke | everything). | | | The maps are building now - it'll probably be a few more hours till | they are up and about (it's not a fast process anymore) - hopefully by | about 3pm AEST. | | | Cheers | | Matt `----- -- Cordialement Hendrik Oesterlin _______________________________________________ dev-fr mailing list [email protected] http://lists.openstreetmap.org/listinfo/dev-fr
