View Issue Details

IDProjectCategoryView StatusLast Update
0000585filegeneralpublic2017-01-18 16:16
ReporterMartin Raifer 
Assigned ToChristos Zoulas 
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version5.30 
Summary0000585: osmpbf files not always detected
DescriptionThe magic for "OpenStreetMap Protocolbuffer Binary Format (.osm.pbf)" checks whether the first 4 bytes of the file are equal to "0x0000000D", which is not always the case in an osm-pbf file (see the attached counter-example): the first 4 bytes represent the length of the following "BlobHeader", which is often, but not always 13 bytes large. See also the format specification on
Steps To Reproduce$ file woerrstadt.osh.pbf
woerrstadt.osh.pbf: data


$ file liechtenstein-latest.osm.pbf
woerrstadt.osh.pbf: OpenStreetMap Protocolbuffer Binary Format
Additional InformationI'd just get rid of the first magic here:
TagsNo tags attached.



Martin Raifer

Martin Raifer

2016-12-20 11:08


woerrstadt.osh.pbf (296,723 bytes)
Christos Zoulas

Christos Zoulas

2017-01-18 16:16

manager   ~0001465

Weakened the magic to check for < 16.

Issue History

Date Modified Username Field Change
2016-12-20 11:08 Martin Raifer New Issue
2016-12-20 11:08 Martin Raifer File Added: woerrstadt.osh.pbf
2017-01-18 16:16 Christos Zoulas Assigned To => Christos Zoulas
2017-01-18 16:16 Christos Zoulas Status new => assigned
2017-01-18 16:16 Christos Zoulas Status assigned => resolved
2017-01-18 16:16 Christos Zoulas Resolution open => fixed
2017-01-18 16:16 Christos Zoulas Fixed in Version => 5.30
2017-01-18 16:16 Christos Zoulas Note Added: 0001465