GRASS GIS

GRASS GIS -- 免费和开放源码的地理信息系统(GIS)。「GRASS GIS - free and open source Geographic Information System (GIS)」

Github stars Tracking Chart

GRASS GIS 储存库

说明

GRASS GIS(https://grass.osgeo.org/)是一个地理信息系统,用于地理空间数据管理和分析、图像处理、图形/地图制作、空间建模和可视化。

如何获得这里的写入权限

一般来说:你并不需要真正的写权限,因为你可以简单地打开一个 拉取请求 来为 GRASS GIS 做贡献。更多详情请参见 CONTRIBUTING 文件

想成为核心开发者?请看 获取 Git 写入权限的步骤

如何编译 GRASS

请看 INSTALL 文件。

是的,你真的应该阅读 INSTALL。此外,在 Wiki 中有详细的 编译说明

Docker

使用下载的源代码构建一个 docker 映像(在包含源代码的目录下运行)。

docker build -t grassgis79 .

测试运行(假设你有现有的 GRASS GIS 测试位置,它可以从 这里 下载)。

#情况 1:在存放位置的 grassdata 目录下启动
docker run -it --rm --user=$(id -u):$(id -g) --volume $(pwd):/data \
    --env HOME=/data/ grassgis79 grass --text nc_basic_spm_grass7/user1 \
        --exec g.region -p

# 情况 2:在任何地方启动
docker run -it --rm --user=$(id -u):$(id -g) \
    --volume /your/test/grassdata/:/data --env HOME=/data/ grassgis79 \
        grass /data/nc_basic_spm_grass7/PERMANENT --exec g.region -p

请注意,第一个 grassgis79 是映像的名称,而第二个 grass 是可执行文件的名称。

要运行这些测试(同样假设在本地)

docker run -it --rm --user=$(id -u):$(id -g) \
    --volume /your/test/grassdata/:/data --env HOME=/data/ -w /code/grass \
        grassgis79 grass /data/nc_basic_spm_grass7/PERMANENT --exec \
            python -m grass.gunittest.main \
                --location nc_basic_spm_grass7 --location-type nc

注意:如果你在构建 Docker 映像之前进行了本地编译,你可能会遇到问题,因为本地配置和本地编译文件会被复制到 Docker 映像中并被使用。为了确保你没有这个问题,请清理源代码中的所有编译文件。

make distclean

如何生成"程序员手册"

你可以在本地生成 《GRASS GIS 程序员手册》

这需要 doxygen(http://www.doxygen.org)和可选的 Graphviz(http://www.research.att.com/sw/tools/graphviz/

要构建 GRASS 程序员文档,请运行

make htmldocs

或以单个 html 文件的形式生成文档(建议简单阅读)

make htmldocs-single

这里。这需要相当长的时间。结果是在 lib/html/index.html 中,它引用了更多的文档库,在

lib/vector/html/index.html
lib/db/html/index.html
lib/gis/html/index.html

主文件是:./grasslib.dox,所有的子文件都要链接到这里。

要生成 PDF 格式的文件,运行

make pdfdocs


Overview

Name With OwnerOSGeo/grass
Primary LanguageC
Program languageShell (Language Count: 24)
PlatformDocker, Linux, Mac, Windows
License:Other
Release Count143
Last Release Name8.3.2 (Posted on 2024-03-06 23:58:49)
First Release Namegrass_7_0_0beta1 (Posted on 2014-03-27 20:01:15)
Created At2019-05-17 16:13:33
Pushed At2024-04-15 13:06:41
Last Commit At
Stargazers Count762
Watchers Count45
Fork Count279
Commits Count22.4k
Has Issues Enabled
Issues Count962
Issue Open Count380
Pull Requests Count2266
Pull Requests Open Count111
Pull Requests Close Count179
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private

GRASS GIS Repository

Build Status
GCC C/C++ standards check
Python code quality check
General linting
Ubuntu
OSGeo4W
OpenSSF Scorecard
OpenSSF Best Practices
DOI
Join the chat at https://gitter.im/grassgis/community

Description

GRASS GIS (https://grass.osgeo.org/) is
a Geographic Information System used for geospatial data management and
analysis, image processing, graphics/map production, spatial modeling, and
visualization.

Launch this repository in Binder and experiment with GRASS's Python API in
Jupyter Notebooks by clicking the button below:

Binder

Contributing

In general: you don't really need write access as you can simply open
a pull request to contribute to
GRASS GIS. See CONTRIBUTING file for more details.

How to get write access here

Want to become a core developer? See
Procedure for gaining Git write access

How to compile GRASS

See the INSTALL.md file.

Yes, you should really read INSTALL.md. In addition, there are
detailed compile instructions
in the Wiki.

Docker

Build a docker image using the downloaded source code (run this in the directory
containing the source code):

A. Docker image without graphical user interface - wxGUI.

docker build -t grassgis .

A test run (assuming you have the existing GRASS GIS test location; it can be
downloaded from
here)

# case 1: launching in the grassdata directory in which the location is stored:
docker run -it --rm --user=$(id -u):$(id -g) --volume $(pwd):/data \
    --env HOME=/data/ grassgis grass --text nc_basic_spm_grass7/user1 \
        --exec g.region -p

# case 2: launching anywhere
docker run -it --rm --user=$(id -u):$(id -g) \
    --volume /your/test/grassdata/:/data --env HOME=/data/ grassgis \
        grass /data/nc_basic_spm_grass7/PERMANENT --exec g.region -p

Note that the first grassgis is the name of the image while the second
grass is the name of the executable.

To run the tests (again assuming local location):

docker run -it --rm --user=$(id -u):$(id -g) \
    --volume /your/test/grassdata/:/data --env HOME=/data/ -w /code/grass \
        grassgis grass /data/nc_basic_spm_grass7/PERMANENT --exec \
            python -m grass.gunittest.main \
                --location nc_basic_spm_grass7 --location-type nc

B. Docker image with graphical user interface - wxGUI.

docker build -t grassgis -f docker/ubuntu_wxgui/Dockerfile .

Note that the first grassgis is the name of the image while the second
grass is the name of the executable.

xhost local:$(id -u)
docker run -it --privileged --user=$(id -u):$(id -g) --rm \
    --volume="$(pwd)/:/data" --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
    --env HOME=/data/ --env DISPLAY=$DISPLAY \
    --device="/dev/dri/card0:/dev/dri/card0" \
    grassgis grass --gui

Note: If you compiled locally before building the Docker image, you may
encounter problems as the local configuration and the locally compiled files
are copied to and used in the Docker image. To make sure you don't have
this issue, clean all the compiled files from the source code:

make distclean

Thanks to all contributors ❤

GRASS contributors

To the top