Permalink
Browse files

improve detection of pbf files

first 32 bits of a osmpbf file may not always be 0x0d (if the first
header contains index_data)
  • Loading branch information...
1 parent 1ea8a32 commit 0d1393ba73eec025c7e559746ab9d4a047eaca4c @tyrasd committed Nov 28, 2016
Showing with 1 addition and 1 deletion.
  1. +1 −1 osmtogeojson
View
@@ -96,7 +96,7 @@ function legacyParsers(data) {
var sampleStr = data.slice(0,100).toString();
if (format === 'auto') {
- if (data.readUInt32BE(0).toString(16) === 'd' &&
+ if (/*data.readUInt32BE(0).toString(16) === 'd' &&*/
data.readUInt16BE(4).toString(16) === 'a09' &&
data.slice(6,15).toString() === 'OSMHeader') // osmpbf binary file magic
format = 'pbf';

0 comments on commit 0d1393b

Please sign in to comment.