gisma/uavRst

object 'giLinks' not found. Error in link2GI::linkSAGA(returnPaths = T) : unused argument (returnPaths = T)

ahmedshovon opened this issue · 9 comments

giLinks<-get_gi()
Error in link2GI::linkSAGA(returnPaths = T) :
unused argument (returnPaths = T)

tPos <- uavRst::treepos(chm1,

  •                     minTreeAlt = minTreeAlt,
    
  •                     minCrownArea = 1,
    
  •                     maxCrownArea = maxCrownArea,
    
  •                     join = 1, 
    
  •                     thresh = 0.35,
    
  •                     giLinks = giLinks )
    

:: start crown identification...
Error in uavRst::treepos(chm1, minTreeAlt = minTreeAlt, minCrownArea = 1, :
object 'giLinks' not found

gisma commented

You need to install the github version of link2GI. There are some major changes in comparison to the CRAN version.

giLinks<-uavRst::get_gi()
Error in if (nrow(params_GRASS) == 1) { : argument is of length zero
In addition: Warning messages:
1: running command 'cmd.exe /c dir /B /S C:\grass*.bat' had status 1
Show Traceback

Rerun with Debug
Error in if (nrow(params_GRASS) == 1) { : argument is of length zero

gisma commented

please send your sessioninfo
please check also that GRASS7.x SAGA QGIS and OTB are installed

Do I need to install OTB as QGIS tool? Under the 'Available QGIS Data Provider Plugins' (Help--> About), OTB is not showing. Is there any way I can download it as a stand-alone software?

gisma commented

Please follow as mentioned in the readme the installation instructions of the RQGIS team

gisma commented

I know. It is not a question of OTB in QGIS but OTB on your system. You may install them with QGIS or standalone it should word.
Please note I did not make any thests with QGIS based installations of QGIS 3.x. link2GI´ is a wrapper for the standalone binaries and it is also tested for QGIS` version <3.0

Package seems working now. When I tried to produce dsm from given las data I have this error:

dsm1 <- uavRst::pc2dsm(lasDir = "lasdata.las",

  •                    gisdbase_path = projRootDir,
    
  •                    type_smooth = "gauss",
    
  •                    otb_gauss_radius = gauss,
    
  •                    grid_size = actual_grid_size,
    
  •                    GRASSlocation = "dsm",
    
  •                    grass_lidar_method = "mean",
    
  •                    giLinks = giLinks)[[1]]
    

Error: 'pc2dsm' is not an exported object from 'namespace:uavRst'

I have a CHM generated from lastools and lidR. I got this error.

tPos <- uavRst::treepos(chmR,

  •                     minTreeAlt = minTreeAlt,
    
  •                     minCrownArea = 1,
    
  •                     maxCrownArea = maxCrownArea,
    
  •                     join = 1, 
    
  •                     thresh = 0.35,
    
  •                     giLinks = giLinks )
    

:: start crown identification...
:: run pre-segmentation...
:: filter results...
:: find max height position...
:: calculate chm statistics
Error in ogrInfo(dsn = dsn, layer = layer, encoding = encoding, use_iconv = use_iconv, :
Cannot open data source

gisma commented

pls retry with the updated version. if still not working you're welcome to reopen the issue