Open kozlown opened 7 years ago
Hi! Interesting, it's been a looong time since I worked on this project, so hard to say for sure without diving into the code, but it sounds like this might be related to #13. I'll try to find the time to have a closer look!
Ok no problem anyway i cloned the node-hgt into my project instead of installing with npm, I made some changes, I used geojson-elevation (it fixed the error above) and I had another error about zip unlinking (file not found) so I made a quick modification to imagico.js, replacing this line :
fs.unlinkSync(tempPath);
by :
if (fs.existsSync(tempPath)) {
fs.unlinkSync(tempPath);
}
It works pretty well in my case now.
Hi, I am using osm-slope tool, you have done a great work, thanks you.
I have the same error using osm-slope (node-hgt).
**events.js:141 throw er; // Unhandled 'error' event
Error: ENOENT: no such file or directory, open 'data/N40E000.hgt' at Error (native)**
'data/N40E000.hgt' --> Depending on wich map I am using.
Is there any solution ? Can I download all .hgt file on my computer and search directly from there?
Thanks for your time.
@carles3 hi, great to hear that you're finding the module useful!
I can't say for certain, but I would suspect it will work if you already have the hgt file in the correct location, since it's most likely some kind of race when getting/unpacking the ZIP file.
I have already the file .hgt but the error is the same.
node index.js [--cache-dir <DIR>] <IN>; <OUT>;
--cache-dir
--> node_modules/node-hgt/test/data
?
The .hgt file is suposed to be there, am I wright? I have copied the .hgt file in this directory.
@carles3 not sure then, sounds very weird that you would get "no such file or directory" if the file is there. I would recommend stepping through the code to actually see where it's looking and why it goes wrong.
Hi, and first of all great work for this module :+1: It looks like SyncTileSet is not waiting the end of file writing before calling callback, I got the error bellow, though after a while I got the specified file in my data directory at absolute path specified in the error. My code runs with values which lead to the creation of about 40 .hgt files. By the way when I execute it a second time everything is ok because .hgt files are already in data directory.
my code :