24 lines
431 B
Go
24 lines
431 B
Go
package dem_test
|
||
|
||
import (
|
||
"testing"
|
||
|
||
"github.com/airbusgeo/godal"
|
||
"starwiz.cn/sjy01/image-proc/pkg/dem"
|
||
)
|
||
|
||
func init() {
|
||
godal.RegisterAll()
|
||
}
|
||
|
||
func TestDem(t *testing.T) {
|
||
t.Log("TestDem")
|
||
d := dem.NewDem1Km("../../dem/gdlebm.tif")
|
||
// 珠穆朗玛 经纬度:27°59′17″ N ;86°55′31″ E
|
||
elv := d.Elevation(86+55.0/60.0+31.0/3600.0, 27+59.0/60.0+17.0/3600.0)
|
||
t.Log("elv:", elv)
|
||
if elv < 8000 {
|
||
t.Fail()
|
||
}
|
||
}
|