TerraME / calibration

A TerraME package with calibration functionalities.
GNU General Public License v3.0
1 stars 4 forks source link

MultipleRuns and CellularSpace file possible bug #164

Closed pedro-andrade-inpe closed 6 years ago

pedro-andrade-inpe commented 8 years ago

From @ricds, in https://github.com/TerraME/terrame/issues/1362

I had this code working, the shapefile was in the same directory of my .lua:

        model.prodes = CellularSpace{
            file = "prodes.shp"
        }

When running MultipleRuns, CellularSpace couldn't find the shapefile, returning this error:

Error: Resource 'prodes.shp' not found for argument 'file'. Stack traceback: File F:/MODELAGEM/exercicios/ex04/deforestation.lua, line 176, in function 'init' File F:/MODELAGEM/exercicios/ex04/deforestation.lua, line 292, in call to function 'MultipleRuns'

MultipleRuns creates a folder "MultipleRunsTests", i tried placing the shapefiles inside of it, and it worked.

Also, the documentation was not exactly clear about how to insert the path (file:///C:/TerraME/bin/packages/base/doc/files/CellularSpace.html). I use windows and the path that I can extract from any folder returns "F:\MODELAGEM\exercicios\ex04" with backlashes '\', and the function requires common slashes '/'. Documentation could give an example of this case.

This case worked:

        model.prodes = CellularSpace{
            file = "F:/MODELAGEM/exercicios/ex04/prodes.shp"
        }