perliedman / node-hgt

Query hgt files (typically SRTM elevation data) with performance
ISC License
45 stars 20 forks source link

Doesn't handle hgt files of a no standard size. #29

Open DigNZ opened 5 years ago

DigNZ commented 5 years ago

E.g., S44W177.hgt is 2801664 bytes instead of the usual 2884802 and that breaks the system.

perliedman commented 5 years ago

Hi, to my knowledge there is no way to know the resolution except looking at the file size (https://github.com/perliedman/node-hgt/blob/master/src/hgt.js#L16), so currently there is no way for us to handle a file like that.

I am open to suggestion on how to handle this, PRs welcome if this important to you!