<div dir="ltr"><div><div><div><div><div>Hello,<br><br></div>I'm trying to use GRASS in RStudio using the 'rgrass7' pacakge.<br><br></div>So far I have:<br><br><i><b>library(rgrass7)<br><br>initGRASS(gisBase = "C:/OSGeo4W64/apps/grass/grass-7.3.svn",<br>          gisDbase = "C:/Sandbox/RGRASS/",<br>          location = "TEST", mapset = "MAP1",override=TRUE)<br><br>in.rast <- "C:/Users/James/Desktop/15m_site2/subset_output/15m_site2_subset_ortho.tif"<br><br>execGRASS("r.in.gdal", flags="o", parameters=list(input=in.rast, output="ortho"))<br><br></b></i></div>Which works fine!<br><br></div>However, when I want to install an extension with:<br><br><b><i>execGRASS("g.extension", parameters=list(extension="i.segment.uspo", operation="add")) </i><br><br></b></div>I get the following error:<br><br><i><b>Downloading precompiled GRASS Addons <i.segment.uspo>...<br>ERROR: Variable 'LOCATION_NAME' not set<br>ERROR: Variable 'LOCATION_NAME' not set<br>ERROR: Variable 'LOCATION_NAME' not set<br>Traceback (most recent call last):<br>  File "C:/OSGeo4W64/apps/grass/grass-7.3.svn/scripts/<a href="http://g.extension.py">g.extension.py</a>", line 1737, in <module><br>    sys.exit(main())<br>  File "C:/OSGeo4W64/apps/grass/grass-7.3.svn/scripts/<a href="http://g.extension.py">g.extension.py</a>", line 1716, in main<br>    install_extension(source=source, url=url, xmlurl=xmlurl)<br>  File "C:/OSGeo4W64/apps/grass/grass-7.3.svn/scripts/<a href="http://g.extension.py">g.extension.py</a>", line 702, in install_extension<br>    blist = install_extension_xml(xmlurl, mlist)<br>  File "C:/OSGeo4W64/apps/grass/grass-7.3.svn/scripts/<a href="http://g.extension.py">g.extension.py</a>", line 922, in install_extension_xml<br>    write_xml_modules(xml_file, tree)<br>  File "C:/OSGeo4W64/apps/grass/grass-7.3.svn/scripts/<a href="http://g.extension.py">g.extension.py</a>", line 601, in write_xml_modules<br>    libgis_revison = grass.version()['libgis_revision']<br>KeyError: 'libgis_revision'<br>Warning message:<br>running command 'g.extension.bat extension=i.segment.uspo operation=add' had status 1<br clear="all"></b></i><div><div><div><div><div><div><div><div><div><br></div><div>Can anyone tell me where I have to set the 'LOCATION_NAME' please?<br><br></div><div>Kind regards<br><br></div><div>James<br></div><div><br>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><span style="color:rgb(39,78,19)"><span style="font-family:tahoma,sans-serif"><font size="4"><b>James Duffy</b></font><br>PhD Researcher<br>Environment and Sustainability Institute<br>Penryn Campus<br>University of Exeter<br>Penryn<br>Cornwall<br>TR10 9FE</span></span><br></div></div></div></div></div></div>
</div></div></div></div></div></div></div></div></div></div>