Skip to content
Commits on Source (14)
FROM ubuntu:16.04
FROM ubuntu:18.04
MAINTAINER Vaclav Petras <wenzeslaus@gmail.com>
LABEL authors="Vaclav Petras,Markus Neteler"
LABEL maintainer="wenzeslaus@gmail.com,neteler@osgeo.org"
# system environment
ENV DEBIAN_FRONTEND noninteractive
......@@ -10,13 +11,8 @@ ENV DATA_DIR /data
# GRASS GIS compile dependencies
RUN apt-get update \
&& apt-get install -y --install-recommends \
autoconf2.13 \
autotools-dev \
bison \
flex \
g++ \
gettext \
&& apt-get install -y --no-install-recommends --no-install-suggests \
build-essential \
libblas-dev \
libbz2-dev \
libcairo2-dev \
......@@ -25,11 +21,15 @@ RUN apt-get update \
libgdal-dev \
libgeos-dev \
libglu1-mesa-dev \
libgsl0-dev \
libjpeg-dev \
liblapack-dev \
liblas-dev \
liblas-c-dev \
libncurses5-dev \
libnetcdf-dev \
libopenjp2-7 \
libopenjp2-7-dev \
libpng-dev \
libpq-dev \
libproj-dev \
......@@ -37,20 +37,34 @@ RUN apt-get update \
libsqlite3-dev \
libtiff-dev \
libxmu-dev \
bison \
flex \
g++ \
gettext \
gdal-bin \
libfftw3-bin \
make \
ncurses-bin \
netcdf-bin \
proj-bin \
proj-data \
python \
python-dev \
python-numpy \
python-pil \
python-ply \
sqlite3 \
subversion \
unixodbc-dev \
zlib1g-dev \
&& apt-get autoremove \
&& apt-get clean && \
mkdir -p $DATA_DIR
RUN echo LANG="en_US.UTF-8" > /etc/default/locale
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
RUN mkdir /code
RUN mkdir /code/grass
......@@ -59,36 +73,58 @@ COPY . /code/grass
WORKDIR /code/grass
# install GRASS GIS
# Set gcc/g++ environmental variables for GRASS GIS compilation, without debug symbols
ENV MYCFLAGS "-O2 -march=native -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 NUMTHREADS=2
RUN ./configure \
--enable-largefile=yes \
--with-nls \
--enable-largefile \
--with-cxx \
--with-nls \
--with-readline \
--with-sqlite \
--with-bzlib \
--with-pthread \
--with-proj-share=/usr/share/proj \
--with-cairo --with-cairo-ldflags=-lfontconfig \
--with-freetype --with-freetype-includes="/usr/include/freetype2/" \
--with-fftw \
--with-netcdf \
--with-liblas --with-liblas-config=/usr/bin/liblas-config \
--with-proj --with-proj-share=/usr/share/proj \
--with-geos=/usr/bin/geos-config \
--with-cairo \
--with-postgres --with-postgres-includes="/usr/include/postgresql" \
--with-opengl-libs=/usr/include/GL \
--with-freetype=yes --with-freetype-includes="/usr/include/freetype2/" \
--with-sqlite=yes \
--with-liblas=yes --with-liblas-config=/usr/bin/liblas-config \
&& make -j2 && make install && ldconfig
&& make -j $NUMTHREADS && make install && ldconfig
# enable simple grass command regardless of version number
RUN ln -s /usr/local/bin/grass* /usr/local/bin/grass
# Reduce the image size
RUN apt-get autoremove -y
RUN apt-get clean -y
# set SHELL var to avoid /bin/sh fallback in interactive GRASS GIS sessions in docker
ENV SHELL /bin/bash
# Fix permissions
RUN chmod -R a+rwx $DATA_DIR
# create a user
RUN useradd -m -U grass
# declare volume late so permissions apply
# declare data volume late so permissions apply
VOLUME $DATA_DIR
WORKDIR $DATA_DIR
# Further reduce the docker image size
RUN rm -rf /code/grass
# switch the user
USER grass
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -69,17 +69,28 @@ int main(int argc, char *argv[])
def->description = _("Overwrite current settings if already initialized");
def->guisection = _("Set");
/* the default answers below are GRASS default settings,
* not current settings */
driver = G_define_standard_option(G_OPT_DB_DRIVER);
driver->options = db_list_drivers();
driver->answer = (char *) db_get_default_driver_name();
if (strcmp(DB_DEFAULT_DRIVER, "sqlite") == 0) {
driver->answer = "sqlite";
}
else {
driver->answer = "dbf";
}
driver->guisection = _("Set");
database = G_define_standard_option(G_OPT_DB_DATABASE);
database->answer = (char *) db_get_default_database_name();
if (strcmp(DB_DEFAULT_DRIVER, "sqlite") == 0) {
database->answer = "$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db";
}
else {
database->answer = "$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/";
}
database->guisection = _("Set");
schema = G_define_standard_option(G_OPT_DB_SCHEMA);
schema->answer = (char *) db_get_default_schema_name();
schema->guisection = _("Set");
group = G_define_option();
......@@ -87,7 +98,6 @@ int main(int argc, char *argv[])
group->type = TYPE_STRING;
group->required = NO;
group->multiple = NO;
group->answer = (char*) db_get_default_group_name();
group->description = _("Default group of database users to which "
"select privilege is granted");
group->guisection = _("Set");
......@@ -179,7 +189,6 @@ int main(int argc, char *argv[])
exit(EXIT_SUCCESS);
}
if (def->answer) {
db_set_default_connection();
db_get_connection(&conn);
......@@ -191,8 +200,8 @@ int main(int argc, char *argv[])
exit(EXIT_SUCCESS);
}
/* set connection */
db_get_connection(&conn); /* read current */
/* do not read current, set new connection from options */
G_zero(&conn, sizeof(dbConnection));
if (driver->answer)
conn.driverName = driver->answer;
......@@ -207,7 +216,12 @@ int main(int argc, char *argv[])
conn.group = group->answer;
db_set_connection(&conn);
/* check */
if (db_get_connection(&conn) != DB_OK) {
G_fatal_error(_("Unable to set default database connection"));
exit(EXIT_FAILURE);
}
exit(EXIT_SUCCESS);
}
......
......@@ -80,6 +80,18 @@ int main(int argc, char **argv)
/* parms.sql */
db_set_string(&stmt, parms.sql);
ret = db_execute_immediate(driver, &stmt);
if (ret != DB_OK) {
if (parms.i) { /* ignore SQL errors */
G_warning(_("Error while executing: '%s'"),
db_get_string(&stmt));
error++;
}
else {
G_fatal_error(_("Error while executing: '%s'"),
db_get_string(&stmt));
}
}
}
else { /* parms.input */
while (get_stmt(fd, &stmt)) {
......
......@@ -19,6 +19,23 @@ db.connect -p
db.tables -p
</pre></div>
<h3>Username and password</h3>
From the <a href="https://www.postgresql.org/docs/10/static/libpq-pgpass.html">PostgresQL manual</a>:
<p>
The file <em>.pgpass</em> in a user's home directory can contain
passwords to be used if the connection requires a password (and no
password has been specified otherwise). On Microsoft Windows the file
is named <em>%APPDATA%\postgresql\pgpass.conf</em> (where
<em>%APPDATA%</em> refers to the Application Data subdirectory in the
user's profile). Alternatively, a password file can be specified using
the connection parameter passfile or the environment variable
PGPASSFILE.
This file should contain lines of the following format:
<div class="code"><pre>
hostname:port:database:username:password
</pre></div>
<h2>Supported SQL commands</h2>
......@@ -132,4 +149,4 @@ driver documentation</a></li>
</ul>
<p>
<i>Last changed: $Date: 2017-11-12 13:26:52 +0100 (Sun, 12 Nov 2017) $</i>
<i>Last changed: $Date: 2018-07-15 20:38:37 +0200 (Sun, 15 Jul 2018) $</i>
grass (7.4.1-4) UNRELEASED; urgency=medium
grass (7.4.2-1) unstable; urgency=medium
* New upstream release.
* Move from experimental to unstable.
-- Bas Couwenberg <sebastic@debian.org> Tue, 23 Oct 2018 07:19:09 +0200
grass (7.4.2~rc2-1~exp1) experimental; urgency=medium
* New upstream release candidate.
-- Bas Couwenberg <sebastic@debian.org> Mon, 15 Oct 2018 07:21:11 +0200
grass (7.4.2~rc1-1~exp1) experimental; urgency=medium
* New upstream release candidate.
* Bump Standards-Version to 4.2.1, no changes.
* Enable OpenMP support.
-- Bas Couwenberg <sebastic@debian.org> Sat, 04 Aug 2018 12:10:18 +0200
-- Bas Couwenberg <sebastic@debian.org> Sat, 29 Sep 2018 09:02:45 +0200
grass (7.4.1-3) unstable; urgency=medium
......
......@@ -81,7 +81,8 @@ d.vect -c map=soils attribute_column=label
d.vect -c map=soils where="label='VBF'" display=shape attribute_column=label
</pre></div>
<p>3D points, 3D lines and 3D polygons colorized according to z height:
<p>3D points, 3D lines and 3D polygons colorized according to z height
(for 3D lines and polygons a z height is defined by a first vertex):
<div class="code"><pre>
g.region raster=elevation.10m
r.random input=elevation.10m n=5000 vector=random3d -d
......@@ -123,4 +124,4 @@ Radim Blazek, ITC-Irst, Trento, Italy<br>
Support for color tables by Martin Landa, Czech Technical University in Prague (8/2011)<br>
and many other GRASS developers
<p><i>Last changed: $Date: 2014-12-19 22:17:36 +0100 (Fri, 19 Dec 2014) $</i>
<p><i>Last changed: $Date: 2018-08-25 18:54:22 +0200 (Sat, 25 Aug 2018) $</i>
This diff is collapsed.
This diff is collapsed.
......@@ -195,7 +195,7 @@ static int compare_fonts(const void *a, const void *b)
/* Sort first by type, then by name */
if (aa->type != bb->type)
return (aa->type > bb->type);
return (aa->type > bb->type ? 1 : -1);
else {
const char *na = aa->name;
const char *nb = bb->name;
......
<!-- meta page description: wxGUI Interactive Scatter Plot Tool-->
<!-- meta page index: wxGUI -->
<h2>KEYWORDS</h2>
<a href="display.html">display</a>, <a href="topic_GUI.html">GUI</a>, <a href="keywords.html#imagery">imagery</a>, <a href="keywords.html#scatter plot">scatter plot</a>
<h2>DESCRIPTION</h2>
<b>Interactive Scatter Plot Tool</b> allows analyzing group of raster
......@@ -82,4 +86,4 @@ Turek, <a href="http://grasswiki.osgeo.org/wiki/GRASS_GSoC_2013_GRASS_GIS_Intera
Summer of Code 2013</a> (mentor: Martin Landa)
<p>
<i>$Date: 2015-10-22 00:30:01 +0200 (Thu, 22 Oct 2015) $</i>
<i>$Date: 2018-10-14 21:39:52 +0200 (Sun, 14 Oct 2018) $</i>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.