terrain-obj icon indicating copy to clipboard operation
terrain-obj copied to clipboard

How to use it?

Open malte-v opened this issue 7 years ago • 2 comments

Could you provide some information about what arguments you need to pass to get this working?

malte-v avatar Oct 02 '18 19:10 malte-v

Good question, haven't used it myself since forever... but looking at https://github.com/perliedman/terrain-obj/blob/master/cli.js, it looks like the args should be:

[path to hgt dir] [south] [west] [north] [east] [proj.4 def]

That is, you provide the path to a directory of HGT files, the bounding box coordinates in some projection, and finally the definition of the projection itself.

If you don't know what projection to use, you can look at https://github.com/perliedman/local-proj, which can find a projection given a latitude and longitude.

perliedman avatar Oct 08 '18 16:10 perliedman

First of all, thank you for your help. However, if I run node cli.js C:\Users\malte\Desktop\HGTFiles 47 12 48 13 WGS84 it says

# Projection: undefined
# Bounds: [[12.000000000000002,47],[13,48.00000000000001]]
# Projected bounds: [[12.000000000000002,47],[13,48.00000000000001]]
# 3601 rows, 3601 cols
# 12967201 vertices

and all I get is a bunch of new HGT files whose filenames do not match the bounding box, such as "N44E006.hgt". Originally, I only had "N47E012.hgt" in the HGTFiles directory.

malte-v avatar Oct 09 '18 07:10 malte-v