问题标签 [grass]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
r - 从 R 运行 GRASS GIS 7
我正在尝试使用 Windows 7 从 R 版本 3.2.3 运行 GRASS GIS 版本 7.0.3。我rgrass7
从 CRAN 存储库安装了 R 包(它提供了 GRASS GIS 7 和 R 之间的接口)。在以管理员身份运行的 R 中,我尝试像这样初始化 GRASS GIS(加载rgrass7
库后):
这是我系统的正确路径,我还在 Windows 系统路径中添加了以下 GRASS GIS 和 R 路径:
C:\OSGeo4W64\apps\grass\grass-7.0.3
C\Program Files\R-3.2.3\bin
我收到以下错误:
系统错误(粘贴(“g.dirseps.exe -g”,shQuote(Sys.getenv(“WINGISRC”))),:找不到“g.dirseps.exe”调用自:系统(粘贴(“g.dirseps .exe -g", shQuote(Sys.getenv("WINGISRC"))), 实习生 = TRUE)
任何人都可以帮助我找出路径中的问题或任何其他相关的歧义吗?
python - 从外部通过 python 调用草模块
我想在我的 python 脚本中调用一些草模块(egrwalk 模块)。幸运的是,我在https://grasswiki.osgeo.org/wiki/GRASS_and_Python#MS-Windows上找到了很多有用的提示。这里是。
MS-Windows 为了从外部通过 Python 使用 GRASS 功能,必须设置一些环境变量:
GISBASE= C:\GRASS-64 GISRC= C:\Documents and Settings\user\.grassrc6 LD_LIBRARY_PATH= C:\GRASS-64\lib PATH= C:\GRASS-64\etc;C:\GRASS-64\etc\python;C:\GRASS-64\lib;C:\GRASS-64\bin;C:\GRASS-64\extralib;C:\GRASS-64\msys\bin;C:\Python26; PYTHONLIB= C:\Python26 PYTHONPATH= C:\GRASS-64\etc\python GRASS_SH= C:\GRASS-64\msys\bin\sh.exe
但是,我安装最新版本的 WinGRASS-7.0.3 和 7.0.4 后,msys 文件夹不存在。我想知道的是在没有msys文件夹的情况下如何使用最新版本设置环境变量。非常感谢。
grass - 草 GIS:r.diversity
我从文件菜单中的启动脚本选项中启动了 GRASS GIS 6.4.3 中的脚本 r.diveristy.py。之后出现了 r.diversity GUI,我在其中给出了输入和输出文件名,然后运行。显示以下错误消息:
我该如何解决这个问题?
python - 使用 GRASS GIS API 的 python 脚本错误
我有来自官方网站的独立安装 GRASS,并且我使用 python 2.7 32b 和 windows 10。我尝试使用来自 GRASS GIS 7.0.4 的 python api。但我有导入错误。
一些导入工作我可以在 python ide 中导入,而一些导入不起作用,我无法使用。
首先我读了这篇文章grass python,我尝试使用pygrass api python代码:
成功导入
没有成功导入
from pygrass.modules import Module
错误信息:No module named pygrass.modules
2.from grass.pygrass.gis import Mapset
错误信息:
3.from grass.pygrass.vector import VectorTopo
错误信息 :
4.from grass.pygrass.vector import Vector
错误信息 :
5.from grass.pygrass.raster import RasterRow
错误信息 :
6.from grass.pygrass.gis import Location
错误信息 :
7.from grass.pygrass.gis.region import Region
错误信息:
8.from grass.pygrass.modules import raster as r
错误信息:ImportError: cannot import name raster
9.from grass.pygrass.functions import coor2pixel
错误信息:No module named functions
10.import grass.scripts
错误信息 :No module named scripts
知道为什么我可以从 pygrass 导入一些导入,为什么我不能从 pygrass 导入一些其他导入?
python - 在 Windows 10 上将 Numpy 导入 Grass GIS 7.0 时遇到问题
我最近在我的 Windows 10 上安装了 Grass GIS 7。加载程序后,我在终端窗口中收到一条错误消息:
'此模块需要 Numeric/numarray 或 NumPy 模块,无法导入。它可能没有安装(它是标准 Python 发行版的一部分)。有关未找到 Numeric、numarray 或 NumPy 的信息,请参阅 Numeric Python 站点 ( http://numpy.scipy.org )。
我单独安装了包含 NumPy 模块的 Anaconda,但 Grass GIS 无法识别它。如何让 Grass 识别此模块已安装在我的计算机上?
我有 Windows 10,Anaconda 和 Grass 都下载为 64 位。Anaconda 使用 Python 3.5 下载,Grass 使用 OSGeo64W 7.0.4 版本下载。
python - 如何在 QGIS python 命令控制台中执行草模块
我在 QGIS V2.16.0 下工作。我想使用 QGIS 的 python 命令控制台运行草的 r.watershed 模块。
我尝试了很多这样的语法:
execfile ("r.watershed", "elev=D:\Developpement\Debits_cartes_alea\Donnees_test\exemple_mnt1.tif" )
但没有人在工作。
python - Error occurred when python function calling GRASS GIS module and another python function of the same kind
I wrote a python funciton A to call a GRASSGIS module from outside, and it ran fine. I wrote another python function B containing statement calling another GRASSGIS module and python function A, error occurred.
function A:
#xA;function B:
#xA;error:
#xA;And I have tested that function B without the statement calling function A ran well without error.
I don't know why this happened and how to solve it.
r - Fill raster holes in R or Grass GIS
Sample data
The problem
How do I distinguish (algorithmically) the holes in the raster i.e., the area bounded by cells c(15:17, 22) from the other gaps that are not holes (i.e., the rest of the empty cells)?
This would make it possible to do operations only on the hole / island regions of the raster, fill holes with a custom value etc etc.
The actual rasters have around 30000 holes and therefore speed is important. I am interested in both R and Grass GIS solutions. Many thanks for your help, much appreciated !
gis - 如何从 Grass 7 地图集中删除图层?(QGIS 14.9 中的草 7 插件)
我在 QGIS 2.14.9 中使用 Grass 7 插件,但我找不到如何从 Grass 地图集中删除图层。
文件管理模块中不存在此功能。