Hi there,
I am using osmar to work with open streetmap data in R. I tried to import a small area (25km²) from the german os.pbf (2.7 GB). Yet this failed due to osmosis not parsing the osm file.
System: Ubuntu 15.04, i686 GNU/Linux, 4 Cores, 8GB Ram
R:
platform i686-pc-linux-gnu
arch i686
os linux-gnu
system i686, linux-gnu
status
major 3
minor 1.2
year 2014
month 10
day 31
svn rev 66913
language R
version.string R version 3.1.2 (2014-10-31)
nickname Pumpkin Helmet
R-Script:
require (osmar)
setwd ("~/data/")
### Datasource
src <- osmsource_osmosis("/home/administrator/data/pgsql/osm_germany/germany-latest.osm.pbf")
### BBox
bb_sol_leipz <- center_bbox(12.359383, 51.403859, width = 5000, height = 5000)
sol_leipz <- get_osm(bb_sol_leipz, source = src)
Error Report:
Mrz 18, 2016 12:19:23 PM org.openstreetmap.osmosis.core.Osmosis run
INFORMATION: Osmosis Version 0.43.1
Mrz 18, 2016 12:19:23 PM org.openstreetmap.osmosis.core.Osmosis run
INFORMATION: Preparing pipeline.
Mrz 18, 2016 12:19:23 PM org.openstreetmap.osmosis.core.Osmosis run
INFORMATION: Launching pipeline execution.
Mrz 18, 2016 12:19:23 PM org.openstreetmap.osmosis.core.Osmosis run
INFORMATION: Pipeline executing, waiting for completion.
Mrz 18, 2016 12:19:23 PM org.openstreetmap.osmosis.core.pipeline.common.ActiveTaskManager waitForCompletion
SCHWERWIEGEND: Thread for task 1-read-xml failed
org.openstreetmap.osmosis.core.OsmosisRuntimeException: Unable to parse xml file /home/administrator/data/pgsql/osm_germany/germany-latest.osm.pbf. publicId=(null), systemId=(null), lineNumber=1, columnNumber=1.
at org.openstreetmap.osmosis.xml.v0_6.XmlReader.run(XmlReader.java:116)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:189)
at org.openstreetmap.osmosis.xml.v0_6.XmlReader.run(XmlReader.java:111)
... 1 more
Mrz 18, 2016 12:19:23 PM org.openstreetmap.osmosis.core.Osmosis main
SCHWERWIEGEND: Execution aborted.
org.openstreetmap.osmosis.core.OsmosisRuntimeException: One or more tasks failed.
at org.openstreetmap.osmosis.core.pipeline.common.Pipeline.waitForCompletion(Pipeline.java:146)
at org.openstreetmap.osmosis.core.Osmosis.run(Osmosis.java:92)
at org.openstreetmap.osmosis.core.Osmosis.main(Osmosis.java:37)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:328)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:408)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:351)
at org.codehaus.classworlds.Launcher.main(Launcher.java:31)
Fehler in file(con, "r") : kann Verbindung nicht öffnen
Zusätzlich: Warnmeldung:
In file(con, "r") :
kann Datei '/tmp/RtmpLD8AMb/file5f1170f48b12' nicht öffnen: Datei oder Verzeichnis nicht gefunden
Thanks for your help,
Gunnar
asked
18 Mar '16, 12:26
GunnarOeh
11●1●1●3
accept rate:
0%
Just checking, but does the MD5sum of the germany-latest file match?
Hi, thanks for the hint:
md5sum -c data/pgsql/osm_germany/germany-latest.osm.pbf
md5sum: data/pgsql/osm_germany/germany-latest.osm.pbf: keine korrekt formatierte MD5‐Prüfsummenzeile gefunden
(no correct md5sum found)
Try without the -c, and manually compare the resulting checksum with the .osm.pbf.md5 file on the download site.