diff --git a/ide/zerobrane/terrame.lua b/ide/zerobrane/terrame.lua index e81496f2..3b3f5c78 100644 --- a/ide/zerobrane/terrame.lua +++ b/ide/zerobrane/terrame.lua @@ -16,18 +16,19 @@ return { -- path to TerraME terrame = os.getenv("TME_PATH") -- hack in Mac OS X - if terrame == nil then + if terrame == nil and ide.osname == "Macintosh" then terrame = "/Applications/terrame.app/Contents/bin" - end - - local fopen = io.open(terrame..executable) - if not fopen then - DisplayOutputLn("Please define 'path.terrame_install' in your cfg/user.lua") else - fopen:close() - end + DisplayOutputLn("Could not find TME_PATH. Is TerraME installed?") + return + end end + if not wx.wxDirExists(terrame) then + DisplayOutputLn("Can't find terrame executable in "..terrame) + return + end + wx.wxSetEnv("TME_PATH", terrame) if rundebug then diff --git a/packages/base/tests/functional/basics/CellularSpace.lua b/packages/base/tests/functional/basics/CellularSpace.lua index 923aba29..0ec77155 100644 --- a/packages/base/tests/functional/basics/CellularSpace.lua +++ b/packages/base/tests/functional/basics/CellularSpace.lua @@ -422,7 +422,8 @@ return{ layer = gis.Layer{ project = proj, name = layerName1, - file = filePath1 + file = filePath1, + epsg = 4326 } cs = CellularSpace{ diff --git a/packages/gis/tests/nc/basic/Layer.lua b/packages/gis/tests/nc/basic/Layer.lua index 090db7a6..7f5bfae1 100644 --- a/packages/gis/tests/nc/basic/Layer.lua +++ b/packages/gis/tests/nc/basic/Layer.lua @@ -37,7 +37,8 @@ return { Layer { project = proj, name = layerName1, - file = filePath("test/vegtype_2000.nc", "gis") + file = filePath("test/vegtype_2000.nc", "gis"), + epsg = 4326 } local filePath1 = "vegtype_cells_nc_basic.shp" @@ -78,7 +79,8 @@ return { local l = Layer { project = proj, name = vegType, - file = filePath("test/vegtype_2000.nc", "gis") + file = filePath("test/vegtype_2000.nc", "gis"), + epsg = 4326 } unitTest:assertEquals(l:representation(), "raster") -- SKIP @@ -101,7 +103,8 @@ return { local l = Layer { project = proj, name = vegType, - file = filePath("test/vegtype_2000.nc", "gis") + file = filePath("test/vegtype_2000.nc", "gis"), + epsg = 4326 } unitTest:assertEquals(l:bands(), 1) -- SKIP @@ -125,11 +128,12 @@ return { local l = Layer { project = proj, name = layerName1, - file = filePath("test/vegtype_2000.nc", "gis") + file = filePath("test/vegtype_2000.nc", "gis"), + epsg = 4326 } unitTest:assertEquals( -- SKIP -tostring(l), [[epsg number [0] +tostring(l), [[epsg number [4326] file string [vegtype_2000.nc] name string [Vegtype_layer] project Project