First off; let me apologize for first asking this question on the issues of Github. It was a bit of a hurried question, however it's fine for now.
I've written a script that samples the terrain to get the 'appropriate' zoomlevel for the final sampleTerrain function, starting from zoomlevel 15.
Now, this works great. I get the correct zoomlevels for the tiles I'm on (f.e. - Netherlands generally returns '14' as the highest zoomlevel. But if I go to Mirny Mine, it will return '9'.).
However what this does do is that it throws quite a lot of errors (for the lower detail levels ofcourse a larger amount due to the fact that multiple sampleterrains are ran.). Is there a way to catch these by myself instead of having the sampleTerrain function itself throw the errors?
The pull request includes a function to sample terrain at the most detailed level. This way you can sample terrain at the highest level of detail without having to catch any errors.
I don’t know exactly when it will be merged, but we’re trying to get it moving and figure out what else needs to be done before it’s ready. I’ll post here when it’s merged.