Error with another OSM file using docker install

Hi guys.

Since yesterday, I haven’t been able to correctly process/use another OSM data file, thing that I had managed to achieve before. The only thing I can think of that has changed is that I removed the existing docker images (docker rmi ...) and started from scratch.

My master branch is up-to-date and currently pointing to:

Author: nilsnolde <nilsnolde@gmail.com>
Date:   Wed May 29 16:51:59 2019 +0300

    upgrade GH to v0.10.1.15, fixes #394

The new OSM file is rather small and I had previously managed to use it. Here it is in case it helps:
~57M us-pacific-latest.osm.pbf

This is the error message I’m getting:

07-Jun-2019 22:16:10.243 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
07-Jun-2019 22:16:10.251 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
07-Jun-2019 22:16:10.252 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 7889 ms
Exception in thread "PBF Reader" java.lang.RuntimeException: Unable to read PBF file.
	at com.graphhopper.reader.osm.pbf.PbfReader.run(PbfReader.java:50)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.RuntimeException: java.lang.InterruptedException
	at com.graphhopper.reader.osm.OSMInputFile.process(OSMInputFile.java:259)
	at com.graphhopper.reader.osm.pbf.PbfDecoder.sendResultsToSink(PbfDecoder.java:96)
	at com.graphhopper.reader.osm.pbf.PbfDecoder.processBlobs(PbfDecoder.java:151)
	at com.graphhopper.reader.osm.pbf.PbfDecoder.run(PbfDecoder.java:162)
	at com.graphhopper.reader.osm.pbf.PbfReader.run(PbfReader.java:47)
	... 1 more
Caused by: java.lang.InterruptedException
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:2014)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2048)
	at java.util.concurrent.LinkedBlockingQueue.put(LinkedBlockingQueue.java:350)
	at com.graphhopper.reader.osm.OSMInputFile.process(OSMInputFile.java:257)
	... 5 more
07 Jun 22:17:25 ERROR [routing.RoutingProfileManager] - java.util.concurrent.ExecutionException: java.lang.RuntimeException: Couldn't process file /ors-core/data/us-pacific-latest.osm.pbf, error: Can't decode srtm_12_03.tif
java.util.concurrent.ExecutionException: java.lang.RuntimeException: Couldn't process file /ors-core/data/us-pacific-latest.osm.pbf, error: Can't decode srtm_12_03.tif
	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.util.concurrent.FutureTask.get(FutureTask.java:192)
	at heigit.ors.routing.RoutingProfileManager.initialize(RoutingProfileManager.java:216)
	at heigit.ors.routing.RoutingProfileManager.getInstance(RoutingProfileManager.java:64)
	at heigit.ors.servlet.listeners.ORSInitContextListener.lambda$contextInitialized$0(ORSInitContextListener.java:43)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.RuntimeException: Couldn't process file /ors-core/data/us-pacific-latest.osm.pbf, error: Can't decode srtm_12_03.tif
	at com.graphhopper.reader.osm.OSMReader.writeOsm2Graph(OSMReader.java:406)
	at com.graphhopper.reader.osm.OSMReader.readGraph(OSMReader.java:256)
	at com.graphhopper.GraphHopper.importData(GraphHopper.java:741)
	at com.graphhopper.GraphHopper.process(GraphHopper.java:710)
	at com.graphhopper.GraphHopper.importOrLoad(GraphHopper.java:688)
	at heigit.ors.routing.graphhopper.extensions.ORSGraphHopper.importOrLoad(ORSGraphHopper.java:156)
	at heigit.ors.routing.RoutingProfile.initGraphHopper(RoutingProfile.java:158)
	at heigit.ors.routing.RoutingProfile.<init>(RoutingProfile.java:103)
	at heigit.ors.routing.RoutingProfileLoader.call(RoutingProfileLoader.java:37)
	at heigit.ors.routing.RoutingProfileLoader.call(RoutingProfileLoader.java:21)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	... 1 more
Caused by: java.lang.RuntimeException: Can't decode srtm_12_03.tif
	at com.graphhopper.reader.dem.CGIARProvider.generateRasterFromFile(CGIARProvider.java:115)
	at com.graphhopper.reader.dem.AbstractTiffElevationProvider.getEle(AbstractTiffElevationProvider.java:133)
	at com.graphhopper.reader.dem.MultiSourceElevationProvider.getEle(MultiSourceElevationProvider.java:52)
	at com.graphhopper.reader.osm.OSMReader.getElevation(OSMReader.java:782)
	at com.graphhopper.reader.osm.OSMReader.addNode(OSMReader.java:755)
	at com.graphhopper.reader.osm.OSMReader.processNode(OSMReader.java:723)
	at com.graphhopper.reader.osm.OSMReader.writeOsm2Graph(OSMReader.java:373)
	... 15 more
Caused by: java.util.zip.ZipException: invalid stored block lengths
	at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:164)
	at java.util.zip.ZipInputStream.read(ZipInputStream.java:194)
	at org.apache.xmlgraphics.image.codec.util.FileCacheSeekableStream.readUntil(FileCacheSeekableStream.java:104)
	at org.apache.xmlgraphics.image.codec.util.FileCacheSeekableStream.read(FileCacheSeekableStream.java:169)
	at org.apache.xmlgraphics.image.codec.util.SeekableStream.readUnsignedShortLE(SeekableStream.java:510)
	at org.apache.xmlgraphics.image.codec.tiff.TIFFDirectory.readUnsignedShort(TIFFDirectory.java:565)
	at org.apache.xmlgraphics.image.codec.tiff.TIFFDirectory.getNumDirectories(TIFFDirectory.java:608)
	at org.apache.xmlgraphics.image.codec.tiff.TIFFImageDecoder.getNumPages(TIFFImageDecoder.java:81)
	at org.apache.xmlgraphics.image.codec.tiff.TIFFImageDecoder.decodeAsRenderedImage(TIFFImageDecoder.java:85)
	at org.apache.xmlgraphics.image.codec.util.ImageDecoderImpl.decodeAsRaster(ImageDecoderImpl.java:136)
	at org.apache.xmlgraphics.image.codec.util.ImageDecoderImpl.decodeAsRaster(ImageDecoderImpl.java:122)
	at com.graphhopper.reader.dem.CGIARProvider.generateRasterFromFile(CGIARProvider.java:113)
	... 21 more

Any suggestion is very welcomed.
Thanks in advance.

Yeah, I get the same error on the Pacific dataset… It seems like the SRTM elevation tiles might be corrupted. If you’re not particularly interested in elevation, you could turn it off in the app.config or just use gmted as elevation_provider instead of multi (less accurate, but still elevation).

Please let us know if that works.

You can also see if there’s a problem with the SRTM grid:

http://srtm.csi.cgiar.org/wp-content/uploads/files/srtm_5x5/TIFF/srtm_12_03.zip

Yes, we noticed this problem the other day whilst doing some testing - it seems that there are a few tiles in that area that are corrupt for some reason. Currently waiting to hear back from the guys who do the srtm website to see whether they know of it being a problem

Hi Nils, I´m having the same issue with the PBF for Toronto and Miami (I joined the BB osm that covers both cities using osmium and then converted it to a pbf using osm convert cli)
I have used successfully the ors app to route trips in other cities using the same method on files from the same source.
Is elevation data used for calculating route distances and/or travel times (on any or some profiles, I’m currently only using the default car profile)? Or is it only used for the elevation API
Also, (sorry for the noob question), what field should I modify in te app.config file to not use elevation data? is it the elevation bool in each profile (in that case, I´m assuming its enabled based on the toggle and what profiles are active?)

PS: the gmted solution you posted worked for me for another pair of cities, but not on these particular pair :confused:
Thanks in advance :smiley: