Skip to content
Commits on Source (14)
...@@ -72,11 +72,11 @@ A test run (assuming you have existing GRASS GIS location; it can be downloaded ...@@ -72,11 +72,11 @@ A test run (assuming you have existing GRASS GIS location; it can be downloaded
``` ```
# case 1: launching in the grassdata directory in which the location is stored: # 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/ grassgis78 \ docker run -it --rm --user=$(id -u):$(id -g) --volume $(pwd):/data --env HOME=/data/ grassgis78 \
grass --text nc_spm_08_grass7/user1 --exec g.region -p grass --text nc_basic_spm_grass7/user1 --exec g.region -p
# case 2: launching anywhere # case 2: launching anywhere
docker run -it --rm --user=$(id -u):$(id -g) --volume /your/test/grassdata/:/data --env HOME=/data/ grassgis78 \ docker run -it --rm --user=$(id -u):$(id -g) --volume /your/test/grassdata/:/data --env HOME=/data/ grassgis78 \
grass /data/nc_basic_spm/PERMANENT --exec g.region -p grass /data/nc_basic_spm_grass7/PERMANENT --exec g.region -p
``` ```
Note that the first `grassgis78` is the name of the image while the second Note that the first `grassgis78` is the name of the image while the second
...@@ -86,9 +86,9 @@ To run the tests (again assuming local location): ...@@ -86,9 +86,9 @@ 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 \ docker run -it --rm --user=$(id -u):$(id -g) --volume /your/test/grassdata/:/data --env HOME=/data/ -w /code/grass \
grassgis78 grass /data/nc_basic_spm/PERMANENT --exec \ grassgis78 grass /data/nc_basic_spm_grass7/PERMANENT --exec \
python -m grass.gunittest.main \ python -m grass.gunittest.main \
--location nc_basic_spm --location-type nc --location nc_basic_spm_grass7 --location-type nc
``` ```
Note: If you compiled locally before building the Docker image, you may Note: If you compiled locally before building the Docker image, you may
......
grass (7.8.1-1) unstable; urgency=medium
* New upstream release.
* Move from experimental to unstable.
-- Bas Couwenberg <sebastic@debian.org> Sat, 09 Nov 2019 12:18:45 +0100
grass (7.8.1~rc2-1~exp1) experimental; urgency=medium
* New upstream release candidate.
-- Bas Couwenberg <sebastic@debian.org> Wed, 06 Nov 2019 13:03:34 +0100
grass (7.8.1~rc1-1~exp1) experimental; urgency=medium
* New upstream release candidate.
-- Bas Couwenberg <sebastic@debian.org> Wed, 30 Oct 2019 05:13:19 +0100
grass (7.8.0-2) unstable; urgency=medium grass (7.8.0-2) unstable; urgency=medium
* Bump Standards-Version to 4.4.1, no changes. * Bump Standards-Version to 4.4.1, no changes.
......
...@@ -5,6 +5,7 @@ import tempfile ...@@ -5,6 +5,7 @@ import tempfile
from grass.script import core as grass from grass.script import core as grass
from grass.script import task as gtask from grass.script import task as gtask
from grass.exceptions import CalledModuleError
# read environment variables from file # read environment variables from file
def read_env_file(env_file): def read_env_file(env_file):
...@@ -39,8 +40,8 @@ def render(cmd, mapfile): ...@@ -39,8 +40,8 @@ def render(cmd, mapfile):
env['GRASS_RENDER_FILE'] = mapfile env['GRASS_RENDER_FILE'] = mapfile
try: try:
grass.run_command(cmd[0], env=env, **cmd[1]) grass.run_command(cmd[0], env=env, **cmd[1])
except Exception as e: except CalledModuleError as e:
grass.debug(1, "Unable to render: {0}".format(e)) grass.debug("Unable to render: {0}".format(e), 1)
# update cmd file # update cmd file
def update_cmd_file(cmd_file, cmd, mapfile): def update_cmd_file(cmd_file, cmd, mapfile):
......
...@@ -77,6 +77,7 @@ find . -name '*.rej' | xargs rm ...@@ -77,6 +77,7 @@ find . -name '*.rej' | xargs rm
find . -name '*.o' | xargs rm find . -name '*.o' | xargs rm
find . -name '*.pyc' | xargs rm find . -name '*.pyc' | xargs rm
find . -name 'OBJ.*' | xargs rm -r find . -name 'OBJ.*' | xargs rm -r
find . -name '__pycache__' | xargs rm -r
rm -f gui/wxpython/menustrings.py gui/wxpython/build_ext.pyc gui/wxpython/xml/menudata.xml gui/wxpython/xml/module_tree_menudata.xml rm -f gui/wxpython/menustrings.py gui/wxpython/build_ext.pyc gui/wxpython/xml/menudata.xml gui/wxpython/xml/module_tree_menudata.xml
chmod -R a+r * chmod -R a+r *
``` ```
...@@ -92,7 +93,7 @@ git status ...@@ -92,7 +93,7 @@ git status
### Update VERSION file to release version number ### Update VERSION file to release version number
Directly edit in GH interface: Directly edit VERSION file in GH interface:
https://github.com/OSGeo/grass/blob/releasebranch_7_8/include/VERSION https://github.com/OSGeo/grass/blob/releasebranch_7_8/include/VERSION
...@@ -101,7 +102,7 @@ Example: ...@@ -101,7 +102,7 @@ Example:
```bash ```bash
7 7
8 8
0RC1 1RC1
2019 2019
``` ```
...@@ -112,26 +113,28 @@ Example: ...@@ -112,26 +113,28 @@ Example:
### Create release tag ### Create release tag
See https://help.github.com/en/articles/creating-releases (see https://help.github.com/en/articles/creating-releases)
Preparation: Preparation:
### Changelog and tagging etc ### Changelog and tagging etc
```bash ```bash
# update from GH
# assumptions:
# - own fork as "origin"
# - remote repo as "upstream"
git fetch --all --prune && git checkout releasebranch_7_8 && \
git merge upstream/releasebranch_7_8 && git push origin releasebranch_7_8
# create version env var for convenience: # create version env var for convenience:
MAJOR=`cat include/VERSION | head -1 | tail -1` MAJOR=`cat include/VERSION | head -1 | tail -1`
MINOR=`cat include/VERSION | head -2 | tail -1` MINOR=`cat include/VERSION | head -2 | tail -1`
RELEASE=`cat include/VERSION | head -3 | tail -1` RELEASE=`cat include/VERSION | head -3 | tail -1`
VERSION=${MAJOR}_${MINOR}_${RELEASE} VERSION=${MAJOR}.${MINOR}.${RELEASE}
echo $VERSION echo $VERSION
# Create Changelog file on release branch: # RELEASETAG variable not really needed any more:
python tools/gitlog2changelog.py
mv ChangeLog ChangeLog_$VERSION
head ChangeLog_$VERSION
gzip ChangeLog_$VERSION
TODAY=`date +"%Y%m%d"` TODAY=`date +"%Y%m%d"`
RELEASETAG=release_${TODAY}_grass_${MAJOR}_${MINOR}_${RELEASE} RELEASETAG=release_${TODAY}_grass_${MAJOR}_${MINOR}_${RELEASE}
echo $RELEASETAG echo $RELEASETAG
...@@ -143,23 +146,23 @@ echo $RELEASETAG ...@@ -143,23 +146,23 @@ echo $RELEASETAG
echo "$VERSION" echo "$VERSION"
``` ```
Done in GH interface: To be done in GH interface:
https://github.com/OSGeo/grass/releases/new https://github.com/OSGeo/grass/releases/new
Tag version | target (examples):
7.8.1RC1 | releasebranch_7_8
Add release desciption (re-use existing texts as possible)
If RC, then check
[x] This is a pre-release
### Packaging of source code tarball ### Packaging of source code tarball
TODO: add checkout of code via release tag (?) TODO: add checkout of code via release tag (?)
```bash ```bash
# update from GH
# assumptions:
# - own fork as "origin"
# - remote repo as "upstream"
git fetch --all --prune && git checkout releasebranch_7_8 && \
git merge upstream/releasebranch_7_8 && git push origin releasebranch_7_8
# create source package (in the source directory): # create source package (in the source directory):
echo grass-${VERSION} echo grass-${VERSION}
...@@ -174,9 +177,19 @@ rmdir ./grass-${VERSION} ...@@ -174,9 +177,19 @@ rmdir ./grass-${VERSION}
md5sum grass-${VERSION}.tar.gz > grass-${VERSION}.md5sum md5sum grass-${VERSION}.tar.gz > grass-${VERSION}.md5sum
``` ```
Create Changelog file on release branch:
```bash
python tools/gitlog2changelog.py
mv ChangeLog ChangeLog_$VERSION
head ChangeLog_$VERSION
gzip ChangeLog_$VERSION
```
### Reset include/VERSION file to git version: ### Reset include/VERSION file to git version:
Directly edit in GH interface: Directly edit VERSION file in GH interface:
https://github.com/OSGeo/grass/blob/releasebranch_7_8/include/VERSION https://github.com/OSGeo/grass/blob/releasebranch_7_8/include/VERSION
...@@ -185,10 +198,22 @@ Example: ...@@ -185,10 +198,22 @@ Example:
```bash ```bash
7 7
8 8
0dev 1dev
2019 2019
``` ```
Commit as "back to dev"
Reset local copy to GH:
```bash
# update from GH
# assumptions:
# - own fork as "origin"
# - remote repo as "upstream"
git fetch --all --prune && git checkout releasebranch_7_8 && \
git merge upstream/releasebranch_7_8 && git push origin releasebranch_7_8
```
### Upload source code tarball to OSGeo servers ### Upload source code tarball to OSGeo servers
```bash ```bash
......
How the GRASS Webserver and related infrastructure works How the GRASS Webserver and related infrastructure works
written by M. Neteler written by M. Neteler
Last changed: June 2019 Last changed: Oct 2019
Related Wiki documents: Related Wiki documents:
* https://grass.osgeo.org/wiki/GRASS_Migration_to_OSGeo (historical document) * https://grass.osgeo.org/wiki/GRASS_Migration_to_OSGeo (historical document)
== GRASS Source code repository ==
Maintainer: Markus Neteler, Martin Landa, OSGeo-SAC, http://wiki.osgeo.org/wiki/SAC
Important update April 2019: The source code is now managed on GitHub (rather than in SVN).
The new GitHub repositories are:
* GRASS GIS core (7.x): https://github.com/OSGeo/grass
* GRASS GIS legacy (3.x-6.x): https://github.com/OSGeo/grass-legacy
* GRASS GIS Add-ons: https://github.com/OSGeo/grass-addons
* GRASS GIS promotional material: https://github.com/OSGeo/grass-promo
* GRASS GIS Website (future site): https://github.com/OSGeo/grass-website
* Github mirror at OSGeo: https://git.osgeo.org/gitea/grass_gis/grass
* Git usage: https://trac.osgeo.org/grass/wiki/HowToGit
Still trac at OSGeo is used for tickets: https://trac.osgeo.org/grass
For easier linking in the Trac Wiki, some macro definitions are used for manual page refs (G7:modulename)
* https://trac.osgeo.org/grass/wiki/InterMapTxt
ZIP file download support in trac (was needed for g.extension) - on trac.osgeo.org:
/var/www/trac/grass/conf/trac.ini
[browser]
downloadable_paths = /grass-addons/grass7/*/*,/sandbox/*/*
Statistics:
https://trac.osgeo.org/grass/stats/code
== GRASS Web server == == GRASS Web server ==
Maintainer: M. Neteler Maintainer: M. Neteler
...@@ -138,25 +167,6 @@ Web based client: See http://grasswiki.osgeo.org/wiki/IRC ...@@ -138,25 +167,6 @@ Web based client: See http://grasswiki.osgeo.org/wiki/IRC
- Soeren ("huhabla") - Soeren ("huhabla")
- Brad ("bdouglas") - Brad ("bdouglas")
== GRASS Source code repository ==
Maintainer: Markus Neteler, Martin Landa, OSGeo-SAC, http://wiki.osgeo.org/wiki/SAC
* https://trac.osgeo.org/grass/browser
* SVN: https://trac.osgeo.org/grass/wiki/HowToSVN
Trac Wiki Macro definitions for manual pages G7:modulename
* https://trac.osgeo.org/grass/wiki/InterMapTxt
ZIP file download support in trac (needed for g.extension) - on trac.osgeo.org:
/var/www/trac/grass/conf/trac.ini
[browser]
downloadable_paths = /grass-addons/grass7/*/*,/sandbox/*/*
Statistics:
https://trac.osgeo.org/grass/stats/code
== GRASS Bugtracker == == GRASS Bugtracker ==
Future bugtracker Future bugtracker
......
# Docker GRASS GIS (alpine linux)
Dockerfile with an [Alpine Linux](https://www.alpinelinux.org/) image with [GRASS GIS](https://grass.osgeo.org/) and [grass-session](https://github.com/zarch/grass-session/).
Download size of this image is only approximately 80 MB.
Build the docker with:
```bash
$ sudo docker build --build-arg GRASS_VERSION=7.8 \
--build-arg PYTHON_VERSION=3 \
--build-arg PROJ_VERSION=5.2.0 \
--build-arg PROJ_DATUMGRID_VERSION=1.8 \
.
```
View the images available using `sudo docker images` and open a bash terminal with:
```bash
$ sudo docker run -i -t 15550df91610 /bin/bash
bash-5.0#
```
...@@ -2,11 +2,10 @@ FROM alpine:edge ...@@ -2,11 +2,10 @@ FROM alpine:edge
# Based on: # Based on:
# https://github.com/mundialis/docker-grass-gis/blob/master/Dockerfile # https://github.com/mundialis/docker-grass-gis/blob/master/Dockerfile
LABEL authors="Pietro Zambelli" LABEL authors="Pietro Zambelli,Markus Neteler"
LABEL maintainer="peter.zamb@gmail.com" LABEL maintainer="peter.zamb@gmail.com,neteler@osgeo.org"
# PACKAGES VERSIONS # PACKAGES VERSIONS
ARG GRASS_VERSION=7.8
ARG PYTHON_VERSION=3 ARG PYTHON_VERSION=3
ARG PROJ_VERSION=5.2.0 ARG PROJ_VERSION=5.2.0
ARG PROJ_DATUMGRID_VERSION=1.8 ARG PROJ_DATUMGRID_VERSION=1.8
...@@ -15,12 +14,13 @@ ARG PROJ_DATUMGRID_VERSION=1.8 ...@@ -15,12 +14,13 @@ ARG PROJ_DATUMGRID_VERSION=1.8
# CONFIG VARIABLES # CONFIG VARIABLES
# ================ # ================
# set configuration options # set configuration options, without wxGUI
ENV GRASS_CONFIG="\ ENV GRASS_CONFIG="\
--enable-largefile \ --enable-largefile \
--with-cxx \ --with-cxx \
--with-proj --with-proj-share=/usr/share/proj \ --with-proj --with-proj-share=/usr/share/proj \
--with-gdal \ --with-gdal \
--with-pdal \
--with-python \ --with-python \
--with-geos \ --with-geos \
--with-sqlite \ --with-sqlite \
...@@ -64,6 +64,7 @@ ENV PACKAGES="\ ...@@ -64,6 +64,7 @@ ENV PACKAGES="\
gettext \ gettext \
geos \ geos \
gnutls \ gnutls \
laszip \
libbz2 \ libbz2 \
libjpeg-turbo \ libjpeg-turbo \
libpng \ libpng \
...@@ -72,6 +73,7 @@ ENV PACKAGES="\ ...@@ -72,6 +73,7 @@ ENV PACKAGES="\
ncurses \ ncurses \
openjpeg \ openjpeg \
openblas \ openblas \
pdal \
py3-numpy \ py3-numpy \
py3-pillow \ py3-pillow \
py3-six \ py3-six \
...@@ -94,12 +96,14 @@ ENV PACKAGES="\ ...@@ -94,12 +96,14 @@ ENV PACKAGES="\
gdal-dev \ gdal-dev \
geos-dev \ geos-dev \
gnutls-dev \ gnutls-dev \
laszip-dev \
libc6-compat \ libc6-compat \
libjpeg-turbo-dev \ libjpeg-turbo-dev \
libpng-dev \ libpng-dev \
make \ make \
openjpeg-dev \ openjpeg-dev \
openblas-dev \ openblas-dev \
pdal-dev \
postgresql-dev \ postgresql-dev \
python3-dev \ python3-dev \
py3-numpy-dev \ py3-numpy-dev \
...@@ -144,15 +148,15 @@ RUN echo "Install main packages";\ ...@@ -144,15 +148,15 @@ RUN echo "Install main packages";\
--virtual .build-deps $GRASS_BUILD_PACKAGES; \ --virtual .build-deps $GRASS_BUILD_PACKAGES; \
# echo LANG="en_US.UTF-8" > /etc/default/locale; # echo LANG="en_US.UTF-8" > /etc/default/locale;
# #
# install the latest projection library for GRASS GIS # install the latest (and compatible) projection library for GRASS GIS
# #
echo "Install PROJ-$PROJ_VERSION";\ echo "Install PROJ-$PROJ_VERSION";\
echo " => Dowload proj-$PROJ_VERSION";\ echo " => Downloading proj-$PROJ_VERSION";\
wget http://download.osgeo.org/proj/proj-$PROJ_VERSION.tar.gz && \ wget -q http://download.osgeo.org/proj/proj-$PROJ_VERSION.tar.gz && \
tar xzvf proj-$PROJ_VERSION.tar.gz && \ tar xzvf proj-$PROJ_VERSION.tar.gz && \
cd /src/proj-$PROJ_VERSION/ && \ cd /src/proj-$PROJ_VERSION/ && \
echo " => Dowload datumgrid-$PROJ_DATUMGRID_VERSION" &&\ echo " => Downloading datumgrid-$PROJ_DATUMGRID_VERSION" &&\
wget http://download.osgeo.org/proj/proj-datumgrid-$PROJ_DATUMGRID_VERSION.zip && \ wget -q http://download.osgeo.org/proj/proj-datumgrid-$PROJ_DATUMGRID_VERSION.zip && \
cd nad && \ cd nad && \
unzip ../proj-datumgrid-$PROJ_DATUMGRID_VERSION.zip && \ unzip ../proj-datumgrid-$PROJ_DATUMGRID_VERSION.zip && \
cd .. && \ cd .. && \
...@@ -167,16 +171,12 @@ RUN echo "Install main packages";\ ...@@ -167,16 +171,12 @@ RUN echo "Install main packages";\
# Checkout and install GRASS GIS # Checkout and install GRASS GIS
# #
echo "Install GRASS GIS";\ echo "Install GRASS GIS";\
echo " => Dowload grass-$GRASS_VERSION";\ echo " => Downloading grass"
wget https://grass.osgeo.org/grass`echo $GRASS_VERSION | tr -d .`/source/snapshot/grass-$GRASS_VERSION.git_src_snapshot_latest.tar.gz && \
# unpack source code package and remove tarball archive: COPY . /src/grass_build/
mkdir /src/grass_build && \
tar xfz grass-$GRASS_VERSION.git_src_snapshot_latest.tar.gz --strip=1 -C /src/grass_build && \
rm -f grass-$GRASS_VERSION.git_src_snapshot_latest.tar.gz; \
#
# Configure compile and install GRASS GIS # Configure compile and install GRASS GIS
# RUN echo " => Configure and compile grass";\
echo " => Configure and compile grass";\
cd /src/grass_build && \ cd /src/grass_build && \
/src/grass_build/configure $GRASS_CONFIG && \ /src/grass_build/configure $GRASS_CONFIG && \
make -j $NUMTHREADS && \ make -j $NUMTHREADS && \
...@@ -225,6 +225,18 @@ RUN pip install grass-session ...@@ -225,6 +225,18 @@ RUN pip install grass-session
# set GRASSBIN # set GRASSBIN
ENV GRASSBIN="/usr/local/bin/grass" ENV GRASSBIN="/usr/local/bin/grass"
# ===========================
# TEST grass-session and PDAL
# ===========================
WORKDIR /tmp
COPY docker/testdata/simple.laz .
WORKDIR /scripts
COPY docker/testdata/test_grass_session.py .
## just scan the LAZ file
# TODO: fix test
#RUN /usr/bin/python3 /scripts/test_grass_session.py
# ======== # ========
# FINALIZE # FINALIZE
# ======== # ========
...@@ -238,7 +250,9 @@ VOLUME /grassdb ...@@ -238,7 +250,9 @@ VOLUME /grassdb
ENV GRASS_SKIP_MAPSET_OWNER_CHECK=1 \ ENV GRASS_SKIP_MAPSET_OWNER_CHECK=1 \
LC_ALL="en_US.UTF-8" LC_ALL="en_US.UTF-8"
# debug # show installed version
RUN $GRASSBIN --config svn_revision version RUN grass --tmp-location EPSG:4326 --exec g.version -rge && \
pdal --version && \
python3 --version
CMD [$GRASSBIN, "--version"] CMD [$GRASSBIN, "--version"]
...@@ -21,6 +21,7 @@ ENV GRASS_CONFIG="\ ...@@ -21,6 +21,7 @@ ENV GRASS_CONFIG="\
--with-cxx \ --with-cxx \
--with-proj --with-proj-share=/usr/share/proj \ --with-proj --with-proj-share=/usr/share/proj \
--with-gdal \ --with-gdal \
--with-pdal \
--with-python \ --with-python \
--with-geos \ --with-geos \
--with-sqlite \ --with-sqlite \
...@@ -66,6 +67,7 @@ ENV PACKAGES="\ ...@@ -66,6 +67,7 @@ ENV PACKAGES="\
geos \ geos \
gnutls \ gnutls \
gtk+3.0 \ gtk+3.0 \
laszip \
libbz2 \ libbz2 \
libjpeg-turbo \ libjpeg-turbo \
libpng \ libpng \
...@@ -74,6 +76,7 @@ ENV PACKAGES="\ ...@@ -74,6 +76,7 @@ ENV PACKAGES="\
ncurses \ ncurses \
openjpeg \ openjpeg \
openblas \ openblas \
pdal \
py3-numpy \ py3-numpy \
py3-pillow \ py3-pillow \
py3-six \ py3-six \
...@@ -99,12 +102,14 @@ ENV PACKAGES="\ ...@@ -99,12 +102,14 @@ ENV PACKAGES="\
geos-dev \ geos-dev \
gnutls-dev \ gnutls-dev \
gtk+3.0-dev \ gtk+3.0-dev \
laszip-dev \
libc6-compat \ libc6-compat \
libjpeg-turbo-dev \ libjpeg-turbo-dev \
libpng-dev \ libpng-dev \
make \ make \
openjpeg-dev \ openjpeg-dev \
openblas-dev \ openblas-dev \
pdal-dev \
postgresql-dev \ postgresql-dev \
python3-dev \ python3-dev \
py3-numpy-dev \ py3-numpy-dev \
...@@ -154,15 +159,15 @@ RUN echo "Install main packages";\ ...@@ -154,15 +159,15 @@ RUN echo "Install main packages";\
# compile wxPython, unfortunately there is no Alpine package (yet) - compilation is slow, though! # compile wxPython, unfortunately there is no Alpine package (yet) - compilation is slow, though!
$PYTHONBIN -m pip install -U pathlib2 wxPython && \ $PYTHONBIN -m pip install -U pathlib2 wxPython && \
# #
# install the latest projection library for GRASS GIS # install the latest (and compatible) projection library for GRASS GIS
# #
echo "Install PROJ-$PROJ_VERSION";\ echo "Install PROJ-$PROJ_VERSION";\
echo " => Dowload proj-$PROJ_VERSION";\ echo " => Downloading proj-$PROJ_VERSION";\
wget http://download.osgeo.org/proj/proj-$PROJ_VERSION.tar.gz && \ wget -q http://download.osgeo.org/proj/proj-$PROJ_VERSION.tar.gz && \
tar xzvf proj-$PROJ_VERSION.tar.gz && \ tar xzvf proj-$PROJ_VERSION.tar.gz && \
cd /src/proj-$PROJ_VERSION/ && \ cd /src/proj-$PROJ_VERSION/ && \
echo " => Dowload datumgrid-$PROJ_DATUMGRID_VERSION" &&\ echo " => Downloading datumgrid-$PROJ_DATUMGRID_VERSION" &&\
wget http://download.osgeo.org/proj/proj-datumgrid-$PROJ_DATUMGRID_VERSION.zip && \ wget -q http://download.osgeo.org/proj/proj-datumgrid-$PROJ_DATUMGRID_VERSION.zip && \
cd nad && \ cd nad && \
unzip ../proj-datumgrid-$PROJ_DATUMGRID_VERSION.zip && \ unzip ../proj-datumgrid-$PROJ_DATUMGRID_VERSION.zip && \
cd .. && \ cd .. && \
...@@ -177,16 +182,12 @@ RUN echo "Install main packages";\ ...@@ -177,16 +182,12 @@ RUN echo "Install main packages";\
# Checkout and install GRASS GIS # Checkout and install GRASS GIS
# #
echo "Install GRASS GIS";\ echo "Install GRASS GIS";\
echo " => Dowload grass-$GRASS_VERSION";\ echo " => Downloading grass"
wget https://grass.osgeo.org/grass`echo $GRASS_VERSION | tr -d .`/source/snapshot/grass-$GRASS_VERSION.git_src_snapshot_latest.tar.gz && \
# unpack source code package and remove tarball archive: COPY . /src/grass_build/
mkdir /src/grass_build && \
tar xfz grass-$GRASS_VERSION.git_src_snapshot_latest.tar.gz --strip=1 -C /src/grass_build && \
rm -f grass-$GRASS_VERSION.git_src_snapshot_latest.tar.gz; \
#
# Configure compile and install GRASS GIS # Configure compile and install GRASS GIS
# RUN echo " => Configure and compile grass";\
echo " => Configure and compile grass";\
cd /src/grass_build && \ cd /src/grass_build && \
/src/grass_build/configure $GRASS_CONFIG && \ /src/grass_build/configure $GRASS_CONFIG && \
make -j $NUMTHREADS && \ make -j $NUMTHREADS && \
...@@ -235,6 +236,18 @@ RUN pip install grass-session ...@@ -235,6 +236,18 @@ RUN pip install grass-session
# set GRASSBIN # set GRASSBIN
ENV GRASSBIN="/usr/local/bin/grass" ENV GRASSBIN="/usr/local/bin/grass"
# ===========================
# TEST grass-session and PDAL
# ===========================
WORKDIR /tmp
COPY docker/testdata/simple.laz .
WORKDIR /scripts
COPY docker/testdata/test_grass_session.py .
## just scan the LAZ file
# TODO: fix test
#RUN /usr/bin/python3 /scripts/test_grass_session.py
# ======== # ========
# FINALIZE # FINALIZE
# ======== # ========
...@@ -248,7 +261,9 @@ VOLUME /grassdb ...@@ -248,7 +261,9 @@ VOLUME /grassdb
ENV GRASS_SKIP_MAPSET_OWNER_CHECK=1 \ ENV GRASS_SKIP_MAPSET_OWNER_CHECK=1 \
LC_ALL="en_US.UTF-8" LC_ALL="en_US.UTF-8"
# debug # show installed version
RUN $GRASSBIN --config svn_revision version RUN grass --tmp-location EPSG:4326 --exec g.version -rge && \
pdal --version && \
python3 --version
CMD [$GRASSBIN, "--version"] CMD [$GRASSBIN, "--version"]
# Docker GRASS GIS (alpine linux)
Dockerfile with an [Alpine Linux](https://www.alpinelinux.org/) image with [GRASS GIS](https://grass.osgeo.org/), [PDAL](https://pdal.io) support and [grass-session](https://github.com/zarch/grass-session/).
Download size of this image is only approximately 80 MB.
Clone this repository and change directory:
```bash
$ git clone https://github.com/OSGeo/grass.git
$ cd grass
```
__Build the docker with__:
```bash
$ docker build \
--file docker/alpine/Dockerfile_alpine \
--tag grass-py3-pdal:latest-alpine .
```
View the images available using `sudo docker images` and open a bash terminal with:
```bash
$ docker run -it grass-py3-pdal:latest-alpine /bin/bash
bash-5.0#
```
__To build a stable version__:
change to the releasebranch or tag you want to build:
```bash
$ git checkout remotes/origin/releasebranch_7_8
```
and build and enter with:
```bash
$ docker build \
-f docker/alpine/Dockerfile_alpine \
-t grass-py3-pdal:stable-alpine .
$ docker run -it grass-py3-pdal:stable-alpine /bin/bash
bash-5.0#
```
FROM debian:10.1
LABEL authors="Carmen Tawalika,Markus Neteler,Anika Bettge"
LABEL maintainer="tawalika@mundialis.de,neteler@mundialis.de,bettge@mundialis.de"
ENV DEBIAN_FRONTEND noninteractive
# define versions to be used
ARG PDAL_VERSION=1.8.0
ARG PROJ_VERSION=5.2.0
ARG PROJ_DATUMGRID_VERSION=1.8
ARG LAZ_PERF_VERSION=1.3.0
SHELL ["/bin/bash", "-c"]
WORKDIR /tmp
RUN apt-get update && apt-get upgrade -y && \
apt-get install -y --no-install-recommends --no-install-suggests \
build-essential \
bison \
bzip2 \
cmake \
curl \
flex \
g++ \
gcc \
gdal-bin \
git \
libbz2-dev \
libcairo2 \
libcairo2-dev \
libcurl4-gnutls-dev \
libfftw3-bin \
libfftw3-dev \
libfreetype6-dev \
libgdal-dev \
libgeos-dev \
libgsl0-dev \
libjpeg-dev \
libjsoncpp-dev \
libopenblas-base \
libopenblas-dev \
libnetcdf-dev \
libncurses5-dev \
libopenjp2-7 \
libopenjp2-7-dev \
libpnglite-dev \
libpq-dev \
libpython3-all-dev \
libsqlite3-dev \
libtiff-dev \
libzstd-dev \
locales \
make \
mesa-common-dev \
moreutils \
ncurses-bin \
netcdf-bin \
python3 \
python3-dateutil \
python3-dev \
python3-magic \
python3-numpy \
python3-pil \
python3-pip \
python3-ply \
python3-setuptools \
python3-venv \
software-properties-common \
sqlite3 \
subversion \
unzip \
vim \
wget \
zip \
zlib1g-dev
RUN echo LANG="en_US.UTF-8" > /etc/default/locale
RUN echo en_US.UTF-8 UTF-8 >> /etc/locale.gen && locale-gen
## install the latest projection library for GRASS GIS
WORKDIR /src
RUN wget -q http://download.osgeo.org/proj/proj-${PROJ_VERSION}.tar.gz && \
tar xzf proj-${PROJ_VERSION}.tar.gz && \
cd /src/proj-${PROJ_VERSION}/ && \
wget -q http://download.osgeo.org/proj/proj-datumgrid-${PROJ_DATUMGRID_VERSION}.zip && \
cd nad && \
unzip ../proj-datumgrid-${PROJ_DATUMGRID_VERSION}.zip && \
cd .. && \
./configure --prefix=/usr/ && \
make && \
make install
## install laz-perf
RUN apt-get install cmake
WORKDIR /src
RUN wget -q https://github.com/hobu/laz-perf/archive/${LAZ_PERF_VERSION}.tar.gz -O laz-perf-${LAZ_PERF_VERSION}.tar.gz && \
tar -zxf laz-perf-${LAZ_PERF_VERSION}.tar.gz && \
cd laz-perf-${LAZ_PERF_VERSION} && \
mkdir build && \
cd build && \
cmake .. && \
make && \
make install
## fetch vertical datums and store into PROJ dir
WORKDIR /src
RUN mkdir vdatum && \
cd vdatum && \
wget -q http://download.osgeo.org/proj/vdatum/usa_geoid2012.zip && unzip -j -u usa_geoid2012.zip -d /usr/share/proj; \
wget -q http://download.osgeo.org/proj/vdatum/usa_geoid2009.zip && unzip -j -u usa_geoid2009.zip -d /usr/share/proj; \
wget -q http://download.osgeo.org/proj/vdatum/usa_geoid2003.zip && unzip -j -u usa_geoid2003.zip -d /usr/share/proj; \
wget -q http://download.osgeo.org/proj/vdatum/usa_geoid1999.zip && unzip -j -u usa_geoid1999.zip -d /usr/share/proj; \
wget -q http://download.osgeo.org/proj/vdatum/vertcon/vertconc.gtx && mv vertconc.gtx /usr/share/proj; \
wget -q http://download.osgeo.org/proj/vdatum/vertcon/vertcone.gtx && mv vertcone.gtx /usr/share/proj; \
wget -q http://download.osgeo.org/proj/vdatum/vertcon/vertconw.gtx && mv vertconw.gtx /usr/share/proj; \
wget -q http://download.osgeo.org/proj/vdatum/egm96_15/egm96_15.gtx && mv egm96_15.gtx /usr/share/proj; \
wget -q http://download.osgeo.org/proj/vdatum/egm08_25/egm08_25.gtx && mv egm08_25.gtx /usr/share/proj; \
cd .. && \
rm -rf vdatum
## install pdal
ENV NUMTHREADS=4
WORKDIR /src
RUN wget -q \
https://github.com/PDAL/PDAL/releases/download/${PDAL_VERSION}/PDAL-${PDAL_VERSION}-src.tar.gz && \
tar xfz PDAL-${PDAL_VERSION}-src.tar.gz && \
cd /src/PDAL-${PDAL_VERSION}-src && \
mkdir build && \
cd build && \
cmake .. \
-G "Unix Makefiles" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_C_COMPILER=gcc \
-DCMAKE_CXX_COMPILER=g++ \
-DCMAKE_MAKE_PROGRAM=make \
-DBUILD_PLUGIN_PYTHON=ON \
-DBUILD_PLUGIN_CPD=OFF \
-DBUILD_PLUGIN_GREYHOUND=ON \
-DBUILD_PLUGIN_HEXBIN=ON \
-DHEXER_INCLUDE_DIR=/usr/include/ \
-DBUILD_PLUGIN_NITF=OFF \
-DBUILD_PLUGIN_ICEBRIDGE=ON \
-DBUILD_PLUGIN_PGPOINTCLOUD=ON \
-DBUILD_PGPOINTCLOUD_TESTS=OFF \
-DBUILD_PLUGIN_SQLITE=ON \
-DWITH_LASZIP=ON \
-DWITH_LAZPERF=ON \
-DWITH_TESTS=ON && \
make -j $NUMTHREADS && \
make install
# copy grass gis source
WORKDIR /src
COPY . /src/grass_build/
WORKDIR /src/grass_build
# Set environmental variables for GRASS GIS compilation, without debug symbols
# Set gcc/g++ environmental variables for GRASS GIS compilation, without debug symbols
ENV MYCFLAGS "-O2 -std=gnu99 -m64"
ENV MYLDFLAGS "-s"
# CXX stuff:
ENV LD_LIBRARY_PATH "/usr/local/lib"
ENV LDFLAGS "$MYLDFLAGS"
ENV CFLAGS "$MYCFLAGS"
ENV CXXFLAGS "$MYCXXFLAGS"
# Configure compile and install GRASS GIS
ENV GRASS_PYTHON=/usr/bin/python3
ENV NUMTHREADS=4
RUN make distclean || echo "nothing to clean"
RUN /src/grass_build/configure \
--with-cxx \
--enable-largefile \
--with-proj --with-proj-share=/usr/share/proj \
--with-gdal=/usr/bin/gdal-config \
--with-geos \
--with-sqlite \
--with-cairo --with-cairo-ldflags=-lfontconfig \
--with-freetype --with-freetype-includes="/usr/include/freetype2/" \
--with-fftw \
--with-postgres=yes --with-postgres-includes="/usr/include/postgresql" \
--with-netcdf \
--with-zstd \
--with-bzlib \
--with-pdal \
--without-mysql \
--without-odbc \
--without-openmp \
--without-ffmpeg \
--without-opengl \
&& make -j $NUMTHREADS \
&& make install && ldconfig
# Unset environmental variables to avoid later compilation issues
ENV INTEL ""
ENV MYCFLAGS ""
ENV MYLDFLAGS ""
ENV MYCXXFLAGS ""
ENV LD_LIBRARY_PATH ""
ENV LDFLAGS ""
ENV CFLAGS ""
ENV CXXFLAGS ""
# set SHELL var to avoid /bin/sh fallback in interactive GRASS GIS sessions
ENV SHELL /bin/bash
ENV LC_ALL "en_US.UTF-8"
ENV GRASS_SKIP_MAPSET_OWNER_CHECK 1
# Create generic GRASS GIS binary name regardless of version number
RUN ln -sf `find /usr/local/bin -name "grass??" | sort | tail -n 1` /usr/local/bin/grass
RUN ln -sf `find /usr/local -type d -name "grass??" | sort | tail -n 1` /usr/local/grass
# show GRASS GIS, PROJ, GDAL etc versions
RUN grass --tmp-location EPSG:4326 --exec g.version -rge && \
pdal --version && \
python3 --version
# Reduce the image size
RUN apt-get autoremove -y
RUN apt-get clean -y
WORKDIR /scripts
# install external GRASS GIS session Python API
RUN pip3 install grass-session
# install GRASS GIS extensions
RUN grass --tmp-location EPSG:4326 --exec g.extension extension=r.in.pdal
# add GRASS GIS envs for python usage
ENV GISBASE "/usr/local/grass/"
ENV GRASSBIN "/usr/local/bin/grass"
ENV PYTHONPATH "${PYTHONPATH}:$GISBASE/etc/python/"
ENV LD_LIBRARY_PATH "$LD_LIBRARY_PATH:$GISBASE/lib"
WORKDIR /tmp
COPY docker/testdata/simple.laz .
WORKDIR /scripts
COPY docker/testdata/test_grass_session.py .
## just scan the LAZ file
RUN /usr/bin/python3 /scripts/test_grass_session.py
WORKDIR /grassdb
VOLUME /grassdb
# Docker GRASS GIS (Debian Linux)
Dockerfile with an [Debian Linux](https://www.debian.org/) image with [GRASS GIS](https://grass.osgeo.org/), [PDAL](https://pdal.io) support and [grass-session](https://github.com/zarch/grass-session/).
Download size of this image is of approximately 2.6 GB.
Clone this repository and change directory:
```bash
$ git clone https://github.com/OSGeo/grass.git
$ cd grass
```
__Build the docker with__:
```bash
$ docker build \
--file docker/debian/Dockerfile_debian_pdal \
--tag grass-py3-pdal:latest-debian .
```
View the images available using `sudo docker images` and open a bash terminal with:
```bash
$ docker run -it grass-py3-pdal:latest-debian /bin/bash
bash-5.0#
```
__To build a stable version__:
change to the releasebranch or tag you want to build:
```bash
$ git checkout remotes/origin/releasebranch_7_8
```
and build and enter with:
```bash
$ docker build \
-f docker/debian/Dockerfile_debian_pdal \
-t grass-py3-pdal:stable-debian .
$ docker run -it grass-py3-pdal:stable-debian /bin/bash
bash-5.0#
```
Data source: https://github.com/PDAL/PDAL/tree/master/test/data/laz/
# Import GRASS Python bindings
from grass_session import Session
import grass.script as grass
with Session(gisdb="/grassdata/", location="test", mapset="PERMANENT", create_opts='EPSG:25832'):
print("Tests for PROJ, GDAL, PDAL, GRASS")
# simple test: just scan the LAZ file
grass.run_command('r.in.pdal', input="/tmp/simple.laz", output='count_1', method='n', flags="s", resolution=1, overwrite=True)
FROM ubuntu:18.04
LABEL authors="Carmen Tawalika,Markus Neteler,Anika Bettge"
LABEL maintainer="tawalika@mundialis.de,neteler@mundialis.de,bettge@mundialis.de"
ENV DEBIAN_FRONTEND noninteractive
# define versions to be used
ARG PDAL_VERSION=1.8.0
ARG PROJ_VERSION=4.9.3
ARG PROJ_DATUMGRID_VERSION=1.8
ARG LAZ_PERF_VERSION=1.3.0
SHELL ["/bin/bash", "-c"]
WORKDIR /tmp
RUN apt-get update && apt-get upgrade -y && \
apt-get install -y --no-install-recommends --no-install-suggests \
build-essential \
bison \
bzip2 \
cmake \
curl \
flex \
g++ \
gcc \
gdal-bin \
git \
language-pack-en-base \
libbz2-dev \
libcairo2 \
libcairo2-dev \
libcurl4-gnutls-dev \
libfftw3-bin \
libfftw3-dev \
libfreetype6-dev \
libgdal-dev \
libgeos-dev \
libgsl0-dev \
libjpeg-dev \
libjsoncpp-dev \
libopenblas-base \
libopenblas-dev \
libnetcdf-dev \
libncurses5-dev \
libopenjp2-7 \
libopenjp2-7-dev \
libpnglite-dev \
libpq-dev \
libpython3-all-dev \
libsqlite3-dev \
libtiff-dev \
libzstd-dev \
locales \
make \
mesa-common-dev \
moreutils \
ncurses-bin \
netcdf-bin \
python3 \
python3-dateutil \
python3-dev \
python3-magic \
python3-numpy \
python3-pil \
python3-pip \
python3-ply \
python3-setuptools \
python3-venv \
software-properties-common \
sqlite3 \
subversion \
unzip \
vim \
wget \
zip \
zlib1g-dev
RUN echo LANG="en_US.UTF-8" > /etc/default/locale
RUN echo en_US.UTF-8 UTF-8 >> /etc/locale.gen && locale-gen
## install the latest projection library for GRASS GIS
WORKDIR /src
RUN wget -q http://download.osgeo.org/proj/proj-${PROJ_VERSION}.tar.gz && \
tar xzf proj-${PROJ_VERSION}.tar.gz && \
cd /src/proj-${PROJ_VERSION}/ && \
wget -q http://download.osgeo.org/proj/proj-datumgrid-${PROJ_DATUMGRID_VERSION}.zip && \
cd nad && \
unzip ../proj-datumgrid-${PROJ_DATUMGRID_VERSION}.zip && \
cd .. && \
./configure --prefix=/usr/ && \
make && \
make install
## install laz-perf
RUN apt-get install cmake
WORKDIR /src
RUN wget -q https://github.com/hobu/laz-perf/archive/${LAZ_PERF_VERSION}.tar.gz -O laz-perf-${LAZ_PERF_VERSION}.tar.gz && \
tar -zxf laz-perf-${LAZ_PERF_VERSION}.tar.gz && \
cd laz-perf-${LAZ_PERF_VERSION} && \
mkdir build && \
cd build && \
cmake .. && \
make && \
make install
## fetch vertical datums and store into PROJ dir
WORKDIR /src
RUN mkdir vdatum && \
cd vdatum && \
wget -q http://download.osgeo.org/proj/vdatum/usa_geoid2012.zip && unzip -j -u usa_geoid2012.zip -d /usr/share/proj; \
wget -q http://download.osgeo.org/proj/vdatum/usa_geoid2009.zip && unzip -j -u usa_geoid2009.zip -d /usr/share/proj; \
wget -q http://download.osgeo.org/proj/vdatum/usa_geoid2003.zip && unzip -j -u usa_geoid2003.zip -d /usr/share/proj; \
wget -q http://download.osgeo.org/proj/vdatum/usa_geoid1999.zip && unzip -j -u usa_geoid1999.zip -d /usr/share/proj; \
wget -q http://download.osgeo.org/proj/vdatum/vertcon/vertconc.gtx && mv vertconc.gtx /usr/share/proj; \
wget -q http://download.osgeo.org/proj/vdatum/vertcon/vertcone.gtx && mv vertcone.gtx /usr/share/proj; \
wget -q http://download.osgeo.org/proj/vdatum/vertcon/vertconw.gtx && mv vertconw.gtx /usr/share/proj; \
wget -q http://download.osgeo.org/proj/vdatum/egm96_15/egm96_15.gtx && mv egm96_15.gtx /usr/share/proj; \
wget -q http://download.osgeo.org/proj/vdatum/egm08_25/egm08_25.gtx && mv egm08_25.gtx /usr/share/proj; \
cd .. && \
rm -rf vdatum
## install pdal
ENV NUMTHREADS=4
WORKDIR /src
RUN wget -q \
https://github.com/PDAL/PDAL/releases/download/${PDAL_VERSION}/PDAL-${PDAL_VERSION}-src.tar.gz && \
tar xfz PDAL-${PDAL_VERSION}-src.tar.gz && \
cd /src/PDAL-${PDAL_VERSION}-src && \
mkdir build && \
cd build && \
cmake .. \
-G "Unix Makefiles" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_C_COMPILER=gcc \
-DCMAKE_CXX_COMPILER=g++ \
-DCMAKE_MAKE_PROGRAM=make \
-DBUILD_PLUGIN_PYTHON=ON \
-DBUILD_PLUGIN_CPD=OFF \
-DBUILD_PLUGIN_GREYHOUND=ON \
-DBUILD_PLUGIN_HEXBIN=ON \
-DHEXER_INCLUDE_DIR=/usr/include/ \
-DBUILD_PLUGIN_NITF=OFF \
-DBUILD_PLUGIN_ICEBRIDGE=ON \
-DBUILD_PLUGIN_PGPOINTCLOUD=ON \
-DBUILD_PGPOINTCLOUD_TESTS=OFF \
-DBUILD_PLUGIN_SQLITE=ON \
-DWITH_LASZIP=ON \
-DWITH_LAZPERF=ON \
-DWITH_TESTS=ON && \
make -j $NUMTHREADS && \
make install
# copy grass gis source
WORKDIR /src
COPY . /src/grass_build/
WORKDIR /src/grass_build
# Set environmental variables for GRASS GIS compilation, without debug symbols
# Set gcc/g++ environmental variables for GRASS GIS compilation, without debug symbols
ENV MYCFLAGS "-O2 -std=gnu99 -m64"
ENV MYLDFLAGS "-s"
# CXX stuff:
ENV LD_LIBRARY_PATH "/usr/local/lib"
ENV LDFLAGS "$MYLDFLAGS"
ENV CFLAGS "$MYCFLAGS"
ENV CXXFLAGS "$MYCXXFLAGS"
# Configure compile and install GRASS GIS
ENV GRASS_PYTHON=/usr/bin/python3
ENV NUMTHREADS=4
RUN make distclean || echo "nothing to clean"
RUN /src/grass_build/configure \
--with-cxx \
--enable-largefile \
--with-proj --with-proj-share=/usr/share/proj \
--with-gdal=/usr/bin/gdal-config \
--with-geos \
--with-sqlite \
--with-cairo --with-cairo-ldflags=-lfontconfig \
--with-freetype --with-freetype-includes="/usr/include/freetype2/" \
--with-fftw \
--with-postgres=yes --with-postgres-includes="/usr/include/postgresql" \
--with-netcdf \
--with-zstd \
--with-bzlib \
--with-pdal \
--without-mysql \
--without-odbc \
--without-openmp \
--without-ffmpeg \
--without-opengl \
&& make -j $NUMTHREADS \
&& make install && ldconfig
# Unset environmental variables to avoid later compilation issues
ENV INTEL ""
ENV MYCFLAGS ""
ENV MYLDFLAGS ""
ENV MYCXXFLAGS ""
ENV LD_LIBRARY_PATH ""
ENV LDFLAGS ""
ENV CFLAGS ""
ENV CXXFLAGS ""
# set SHELL var to avoid /bin/sh fallback in interactive GRASS GIS sessions
ENV SHELL /bin/bash
ENV LC_ALL "en_US.UTF-8"
ENV GRASS_SKIP_MAPSET_OWNER_CHECK 1
# Create generic GRASS GIS binary name regardless of version number
RUN ln -sf `find /usr/local/bin -name "grass??" | sort | tail -n 1` /usr/local/bin/grass
RUN ln -sf `find /usr/local -type d -name "grass??" | sort | tail -n 1` /usr/local/grass
# show GRASS GIS, PROJ, GDAL etc versions
RUN grass --tmp-location EPSG:4326 --exec g.version -rge && \
pdal --version && \
python3 --version
# Reduce the image size
RUN apt-get autoremove -y
RUN apt-get clean -y
WORKDIR /scripts
# install external GRASS GIS session Python API
RUN pip3 install grass-session
# install GRASS GIS extensions
RUN grass --tmp-location EPSG:4326 --exec g.extension extension=r.in.pdal
# add GRASS GIS envs for python usage
ENV GISBASE "/usr/local/grass/"
ENV GRASSBIN "/usr/local/bin/grass"
ENV PYTHONPATH "${PYTHONPATH}:$GISBASE/etc/python/"
ENV LD_LIBRARY_PATH "$LD_LIBRARY_PATH:$GISBASE/lib"
WORKDIR /tmp
COPY docker/testdata/simple.laz .
WORKDIR /scripts
COPY docker/testdata/test_grass_session.py .
## just scan the LAZ file
RUN /usr/bin/python3 /scripts/test_grass_session.py
WORKDIR /grassdb
VOLUME /grassdb
# Docker GRASS GIS (Ubuntu Linux)
Dockerfile with an [Ubuntu Linux](https://ubuntu.com/) image with [GRASS GIS](https://grass.osgeo.org/), [PDAL](https://pdal.io) support and [grass-session](https://github.com/zarch/grass-session/).
Download size of this image is of approximately 2.6 GB.
Clone this repository and change directory:
```bash
$ git clone https://github.com/OSGeo/grass.git
$ cd grass
```
__Build the docker with__:
```bash
$ docker build \
--file docker/ubuntu/Dockerfile_ubuntu_pdal \
--tag grass-py3-pdal:latest-ubuntu .
```
View the images available using `sudo docker images` and open a bash terminal with:
```bash
$ docker run -it grass-py3-pdal:latest-ubuntu /bin/bash
bash-5.0#
```
__To build a stable version__:
change to the releasebranch or tag you want to build:
```bash
$ git checkout remotes/origin/releasebranch_7_8
```
and build and enter with:
```bash
$ docker build \
-f docker/ubuntu/Dockerfile_ubuntu_pdal \
-t grass-py3-pdal:stable-ubuntu .
$ docker run -it grass-py3-pdal:stable-ubuntu /bin/bash
bash-5.0#
```
...@@ -61,8 +61,8 @@ revision=d4879d401 ...@@ -61,8 +61,8 @@ revision=d4879d401
build_date=2019-08-04 build_date=2019-08-04
build_platform=x86_64-pc-linux-gnu build_platform=x86_64-pc-linux-gnu
build_off_t_size=8 build_off_t_size=8
libgis_revision=00000 libgis_revision=060163d17
libgis_date="?" libgis_date="2017-04-04 09:43:02 +0200 (Tue, 04 Apr 2017) "
proj4=5.2.0 proj4=5.2.0
gdal=2.3.2 gdal=2.3.2
geos=3.7.1 geos=3.7.1
......
...@@ -99,7 +99,7 @@ int main(int argc, char *argv[]) ...@@ -99,7 +99,7 @@ int main(int argc, char *argv[])
extended = G_define_flag(); extended = G_define_flag();
extended->key = 'e'; extended->key = 'e';
extended->label = _("Print also extended info for additional libraries"); extended->label = _("Print also extended info for additional libraries");
extended->description = _("GDAL/OGR, PROJ.4, GEOS"); extended->description = _("GDAL/OGR, PROJ, GEOS");
extended->guisection = _("Additional info"); extended->guisection = _("Additional info");
shell = G_define_flag(); shell = G_define_flag();
...@@ -200,15 +200,15 @@ int main(int argc, char *argv[]) ...@@ -200,15 +200,15 @@ int main(int argc, char *argv[])
#endif #endif
if (strlen(proj) == 3) { if (strlen(proj) == 3) {
if (shell->answer) if (shell->answer)
fprintf(stdout, "proj4=%c.%c.%c\n", proj[0], proj[1], proj[2]); fprintf(stdout, "proj=%c.%c.%c\n", proj[0], proj[1], proj[2]);
else else
fprintf(stdout, "PROJ.4: %c.%c.%c\n", proj[0], proj[1], proj[2]); fprintf(stdout, "PROJ: %c.%c.%c\n", proj[0], proj[1], proj[2]);
} }
else { else {
if (shell->answer) if (shell->answer)
fprintf(stdout, "proj4=%s\n", proj); fprintf(stdout, "proj=%s\n", proj);
else else
fprintf(stdout, "PROJ.4: %s\n", proj); fprintf(stdout, "PROJ: %s\n", proj);
} }
#ifdef HAVE_GDAL #ifdef HAVE_GDAL
if (shell->answer) if (shell->answer)
......
...@@ -19,6 +19,7 @@ import wx ...@@ -19,6 +19,7 @@ import wx
from core.gcmd import GException, GError, GMessage from core.gcmd import GException, GError, GMessage
from grass.imaging import writeAvi, writeGif, writeIms, writeSwf from grass.imaging import writeAvi, writeGif, writeIms, writeSwf
from core.settings import UserSettings from core.settings import UserSettings
from gui_core.wrap import EmptyImage, ImageFromBitmap
from animation.temporal_manager import TemporalManager from animation.temporal_manager import TemporalManager
from animation.dialogs import InputDialog, EditDialog, ExportDialog from animation.dialogs import InputDialog, EditDialog, ExportDialog
...@@ -43,7 +44,7 @@ class AnimationController(wx.EvtHandler): ...@@ -43,7 +44,7 @@ class AnimationController(wx.EvtHandler):
self.temporalMode = None self.temporalMode = None
self.animationData = [] self.animationData = []
self.timer = wx.Timer(self, id=wx.NewId()) self.timer = wx.Timer(self, id=wx.ID_ANY)
self.animations = animations self.animations = animations
self.bitmapPool = bitmapPool self.bitmapPool = bitmapPool
...@@ -540,7 +541,7 @@ class AnimationController(wx.EvtHandler): ...@@ -540,7 +541,7 @@ class AnimationController(wx.EvtHandler):
busy = wx.BusyInfo( busy = wx.BusyInfo(
_("Preparing export, please wait..."), _("Preparing export, please wait..."),
parent=self.frame) parent=self.frame)
wx.Yield() wx.GetApp().Yield()
lastBitmaps = {} lastBitmaps = {}
fgcolor = UserSettings.Get( fgcolor = UserSettings.Get(
group='animation', group='animation',
...@@ -551,7 +552,7 @@ class AnimationController(wx.EvtHandler): ...@@ -551,7 +552,7 @@ class AnimationController(wx.EvtHandler):
key='font', key='font',
subkey='bgcolor') subkey='bgcolor')
for frameIndex in range(frameCount): for frameIndex in range(frameCount):
image = wx.EmptyImage(*size) image = EmptyImage(*size)
image.Replace(0, 0, 0, 255, 255, 255) image.Replace(0, 0, 0, 255, 255, 255)
# collect bitmaps of all windows and paste them into the one # collect bitmaps of all windows and paste them into the one
for i in animWinIndex: for i in animWinIndex:
...@@ -568,14 +569,14 @@ class AnimationController(wx.EvtHandler): ...@@ -568,14 +569,14 @@ class AnimationController(wx.EvtHandler):
bitmap = self.bitmapProvider.GetBitmap(frameId) bitmap = self.bitmapProvider.GetBitmap(frameId)
lastBitmaps[i] = bitmap lastBitmaps[i] = bitmap
im = wx.ImageFromBitmap(lastBitmaps[i]) im = ImageFromBitmap(lastBitmaps[i])
# add legend if used # add legend if used
legend = legends[i] legend = legends[i]
if legend: if legend:
legendBitmap = self.bitmapProvider.LoadOverlay(legend) legendBitmap = self.bitmapProvider.LoadOverlay(legend)
x, y = self.mapwindows[i].GetOverlayPos() x, y = self.mapwindows[i].GetOverlayPos()
legImage = wx.ImageFromBitmap(legendBitmap) legImage = ImageFromBitmap(legendBitmap)
# not so nice result, can we handle the transparency # not so nice result, can we handle the transparency
# otherwise? # otherwise?
legImage.ConvertAlphaToMask() legImage.ConvertAlphaToMask()
...@@ -622,7 +623,7 @@ class AnimationController(wx.EvtHandler): ...@@ -622,7 +623,7 @@ class AnimationController(wx.EvtHandler):
pilImages = [WxImageToPil(image) for image in images] pilImages = [WxImageToPil(image) for image in images]
busy = wx.BusyInfo(_("Exporting animation, please wait..."), busy = wx.BusyInfo(_("Exporting animation, please wait..."),
parent=self.frame) parent=self.frame)
wx.Yield() wx.GetApp().Yield()
try: try:
if exportInfo['method'] == 'sequence': if exportInfo['method'] == 'sequence':
filename = os.path.join( filename = os.path.join(
......