-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
543 additions
and
424 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
local runner = require("test_executive") | ||
local console = require("console") | ||
local asset = require("asset") | ||
local assets = asset.loaddir() | ||
local json = require("json") | ||
local _,td = runner.srcscript() | ||
|
||
-- console.monitor:config(core.LOG, core.DEBUG) | ||
-- sys.setlvl(core.LOG, core.DEBUG) | ||
|
||
-- Check If Present -- | ||
if not core.UNITTEST then return end | ||
|
||
-- Setup -- | ||
local assets = asset.loaddir() | ||
|
||
local geojsonfile = td.."../data/grand_mesa_1m_dem.geojson" | ||
local f = io.open(geojsonfile, "r") | ||
local contents = f:read("*all") | ||
f:close() | ||
|
||
-- Unit Test -- | ||
|
||
print(string.format("\n-------------------------------------------------\n3dep unit test\n-------------------------------------------------")) | ||
local demType = "usgs3dep-1meter-dem" | ||
local dem = geo.raster(geo.parms({ asset = demType, algorithm = "NearestNeighbour", radius = 0, catalog = contents, sort_by_index = true })) | ||
runner.check(dem ~= nil) | ||
|
||
ut = geo.ut_sample(dem) | ||
runner.check(ut ~= nil) | ||
-- This test ignores lon, lat, lon_incr, lat_incr, pointCount as they are not used. | ||
-- It opens a test file with points. | ||
local pointsFile = td.."../../landsat/data/grand_mesa_poi.txt" | ||
print(string.format("Points file: %s", pointsFile)) | ||
local pointsInFile = 26183 -- number of points in file | ||
local maxPointCount = 110 | ||
status = ut:test(0, 0, 0, 0, maxPointCount, pointsFile); | ||
runner.check(status, "Failed sampling test") | ||
ut = nil | ||
|
||
|
||
|
||
-- Clean Up -- | ||
|
||
-- Report Results -- | ||
|
||
runner.report() | ||
|
Oops, something went wrong.