perliedman / terrain-obj

Convert elevation data (typically SRTM elevation data, HGT files) to Wavefront OBJ 3D models
ISC License
14 stars 2 forks source link

How to use it? #7

Open malte-v opened 6 years ago

malte-v commented 6 years ago

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

perliedman commented 6 years ago

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.

malte-v commented 6 years ago

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.