Binary files /tmp/tmp5Ib1By/6Bw9jTmdkV/grass-7.6.0~rc1/ChangeLog_7.6.0.gz and /tmp/tmp5Ib1By/ga5Wii7HoD/grass-7.6.0/ChangeLog_7.6.0.gz differ Binary files /tmp/tmp5Ib1By/6Bw9jTmdkV/grass-7.6.0~rc1/ChangeLog_7.6.0RC1.gz and /tmp/tmp5Ib1By/ga5Wii7HoD/grass-7.6.0/ChangeLog_7.6.0RC1.gz differ diff -Nru grass-7.6.0~rc1/debian/changelog grass-7.6.0/debian/changelog --- grass-7.6.0~rc1/debian/changelog 2018-12-28 09:15:14.000000000 +0000 +++ grass-7.6.0/debian/changelog 2019-01-18 16:23:41.000000000 +0000 @@ -1,3 +1,18 @@ +grass (7.6.0-1~xenial1) xenial; urgency=medium + + * Rebuild for xenial. + + -- Martin Landa Fri, 18 Jan 2019 17:23:41 +0100 + +grass (7.6.0-1~exp1) experimental; urgency=medium + + * New upstream release. + * Use grass-gui.maintscript for dpkg-maintscript-helper commands. + * Update copyright years for GRASS Development Team & Markus Neteler. + * Drop spelling-errors.patch, applied upstream. + + -- Bas Couwenberg Thu, 17 Jan 2019 10:25:55 +0100 + grass (7.6.0~rc1-1~exp1~xenial2) xenial; urgency=medium * Rebuild for xenial. diff -Nru grass-7.6.0~rc1/debian/copyright grass-7.6.0/debian/copyright --- grass-7.6.0~rc1/debian/copyright 2018-12-26 16:15:07.000000000 +0000 +++ grass-7.6.0/debian/copyright 2019-01-18 16:21:46.000000000 +0000 @@ -4,8 +4,8 @@ Source: http://grass.osgeo.org/ Files: * -Copyright: 1989-2018, GRASS Development Team - 2003-2018, Markus Neteler +Copyright: 1989-2019, GRASS Development Team + 2003-2019, Markus Neteler 2011-2018, Vaclav Petras 2014-2018, Tereza Fiedlerova 2018, Supreet Singh diff -Nru grass-7.6.0~rc1/debian/grass-gui.lintian-overrides grass-7.6.0/debian/grass-gui.lintian-overrides --- grass-7.6.0~rc1/debian/grass-gui.lintian-overrides 2018-12-26 16:14:58.000000000 +0000 +++ grass-7.6.0/debian/grass-gui.lintian-overrides 2019-01-18 16:21:46.000000000 +0000 @@ -4,3 +4,6 @@ # Not a problem grass-gui: package-contains-documentation-outside-usr-share-doc usr/lib/grass*/gui/wxpython/README +# grass-gui.maintscript is used as recommended +grass-gui: maintainer-script-should-not-use-dpkg-maintscript-helper * + diff -Nru grass-7.6.0~rc1/debian/grass-gui.maintscript grass-7.6.0/debian/grass-gui.maintscript --- grass-7.6.0~rc1/debian/grass-gui.maintscript 1970-01-01 00:00:00.000000000 +0000 +++ grass-7.6.0/debian/grass-gui.maintscript 2019-01-18 16:21:46.000000000 +0000 @@ -0,0 +1,4 @@ +# Switch directories to symlinks (#776349) +dir_to_symlink /usr/lib/grass64/etc/gui/icons /usr/share/grass64/etc/gui/icons 7.0.0~rc1-1~exp1~ +dir_to_symlink /usr/lib/grass64/etc/gui/images /usr/share/grass64/etc/gui/images 7.0.0~rc1-1~exp1~ +dir_to_symlink /usr/lib/grass64/bwidget/images /usr/share/grass64/bwidget/images 7.0.0~rc1-1~exp1~ diff -Nru grass-7.6.0~rc1/debian/grass-gui.postinst grass-7.6.0/debian/grass-gui.postinst --- grass-7.6.0~rc1/debian/grass-gui.postinst 2018-12-26 16:14:58.000000000 +0000 +++ grass-7.6.0/debian/grass-gui.postinst 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -#!/bin/sh -set -e - -#DEBHELPER# - -# Switch directories to symlinks (#776349) -if dpkg-maintscript-helper supports dir_to_symlink 2>/dev/null; then - dpkg-maintscript-helper dir_to_symlink \ - /usr/lib/grass64/etc/gui/icons /usr/share/grass64/etc/gui/icons 7.0.0~rc1-1~exp1~ -- "$@" - - dpkg-maintscript-helper dir_to_symlink \ - /usr/lib/grass64/etc/gui/images /usr/share/grass64/etc/gui/images 7.0.0~rc1-1~exp1~ -- "$@" - - dpkg-maintscript-helper dir_to_symlink \ - /usr/lib/grass64/bwidget/images /usr/share/grass64/bwidget/images 7.0.0~rc1-1~exp1~ -- "$@" -fi diff -Nru grass-7.6.0~rc1/debian/grass-gui.postrm grass-7.6.0/debian/grass-gui.postrm --- grass-7.6.0~rc1/debian/grass-gui.postrm 2018-12-26 16:14:58.000000000 +0000 +++ grass-7.6.0/debian/grass-gui.postrm 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -#!/bin/sh -set -e - -#DEBHELPER# - -# Switch directories to symlinks (#776349) -if dpkg-maintscript-helper supports dir_to_symlink 2>/dev/null; then - dpkg-maintscript-helper dir_to_symlink \ - /usr/lib/grass64/etc/gui/icons /usr/share/grass64/etc/gui/icons 7.0.0~rc1-1~exp1~ -- "$@" - - dpkg-maintscript-helper dir_to_symlink \ - /usr/lib/grass64/etc/gui/images /usr/share/grass64/etc/gui/images 7.0.0~rc1-1~exp1~ -- "$@" - - dpkg-maintscript-helper dir_to_symlink \ - /usr/lib/grass64/bwidget/images /usr/share/grass64/bwidget/images 7.0.0~rc1-1~exp1~ -- "$@" -fi diff -Nru grass-7.6.0~rc1/debian/grass-gui.preinst grass-7.6.0/debian/grass-gui.preinst --- grass-7.6.0~rc1/debian/grass-gui.preinst 2018-12-26 16:14:58.000000000 +0000 +++ grass-7.6.0/debian/grass-gui.preinst 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -#!/bin/sh -set -e - -#DEBHELPER# - -# Switch directories to symlinks (#776349) -if dpkg-maintscript-helper supports dir_to_symlink 2>/dev/null; then - dpkg-maintscript-helper dir_to_symlink \ - /usr/lib/grass64/etc/gui/icons /usr/share/grass64/etc/gui/icons 7.0.0~rc1-1~exp1~ -- "$@" - - dpkg-maintscript-helper dir_to_symlink \ - /usr/lib/grass64/etc/gui/images /usr/share/grass64/etc/gui/images 7.0.0~rc1-1~exp1~ -- "$@" - - dpkg-maintscript-helper dir_to_symlink \ - /usr/lib/grass64/bwidget/images /usr/share/grass64/bwidget/images 7.0.0~rc1-1~exp1~ -- "$@" -fi diff -Nru grass-7.6.0~rc1/debian/patches/series grass-7.6.0/debian/patches/series --- grass-7.6.0~rc1/debian/patches/series 2018-12-26 16:15:07.000000000 +0000 +++ grass-7.6.0/debian/patches/series 2019-01-18 16:21:46.000000000 +0000 @@ -2,4 +2,3 @@ instdir no-fail-html.patch jquery.patch -spelling-errors.patch diff -Nru grass-7.6.0~rc1/debian/patches/spelling-errors.patch grass-7.6.0/debian/patches/spelling-errors.patch --- grass-7.6.0~rc1/debian/patches/spelling-errors.patch 2018-12-26 16:15:07.000000000 +0000 +++ grass-7.6.0/debian/patches/spelling-errors.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ -Description: Fix spelling errors. - * ouput -> output - * acounts -> accounts -Author: Bas Couwenberg -Forwarded: https://trac.osgeo.org/grass/ticket/3717 - ---- a/raster/r.buildvrt/r.buildvrt.html -+++ b/raster/r.buildvrt/r.buildvrt.html -@@ -8,7 +8,7 @@ read requests. -

NOTES

- - r.buildvrt creates a list of raster maps that can be --located in different mapsets. The ouput is a read-only link to -+located in different mapsets. The output is a read-only link to - the original raster maps which is only valid if the original raster - maps remain in the originally indicated mapset. A VRT can also be built - from raster maps registered with r.external. ---- a/scripts/r.drain/r.drain.html -+++ b/scripts/r.drain/r.drain.html -@@ -33,7 +33,7 @@ incompatible. - -

For an elevation surface, the path is calculated by choosing the - steeper "slope" between adjacent cells. The slope calculation --accurately acounts for the variable scale in lat-lon projections. For -+accurately accounts for the variable scale in lat-lon projections. For - a cost surface, the path is calculated by following the movement - direction surface back to the start point given - in r.walk or diff -Nru grass-7.6.0~rc1/doc/howto_release.txt grass-7.6.0/doc/howto_release.txt --- grass-7.6.0~rc1/doc/howto_release.txt 2018-12-05 11:05:44.000000000 +0000 +++ grass-7.6.0/doc/howto_release.txt 2018-12-26 12:20:10.000000000 +0000 @@ -1,6 +1,6 @@ How to release GRASS GIS binaries and source code -$Date: 2018-12-05 12:05:09 +0100 (Wed, 05 Dec 2018) $ +$Date: 2018-12-26 13:19:54 +0100 (Wed, 26 Dec 2018) $ Note: This text contains *some* rules only applicable to the development coordinator (currently Markus Neteler, PSC Chair). @@ -85,7 +85,7 @@ #example: 7 -4 +6 1RC1 2018 @@ -124,7 +124,7 @@ echo $RELEASETAG URL=https://svn.osgeo.org/grass -svn copy $URL/grass/branches/releasebranch_7_4 \ +svn copy $URL/grass/branches/releasebranch_7_6 \ $URL/grass/tags/$RELEASETAG \ -m "Tagging release grass_${MAJOR}_${MINOR}_${RELEASE}" @@ -147,7 +147,7 @@ #example 7 -4 +6 1svn 2018 @@ -222,7 +222,7 @@ - Update grass_packager_release.bat, eg. set MAJOR=7 - set MINOR=4 + set MINOR=6 set PATCH=1RC1 - Update addons (grass_addons.sh) rules, eg. diff -Nru grass-7.6.0~rc1/grasslib.dox grass-7.6.0/grasslib.dox --- grass-7.6.0~rc1/grasslib.dox 2018-08-31 15:00:43.000000000 +0000 +++ grass-7.6.0/grasslib.dox 2019-01-01 18:59:11.000000000 +0000 @@ -1,7 +1,7 @@ /*! \mainpage GRASS GIS 7 Programmer's Manual GRASS GIS (Geographic @@ -23,7 +23,7 @@ are cited within their module's source code and the contributed manual pages. -© 2000-2018 by the GRASS Development Team +© 2000-2019 by the GRASS Development Team This manual is published under GNU Free Documentation diff -Nru grass-7.6.0~rc1/gui/wxpython/mapwin/buffered.py grass-7.6.0/gui/wxpython/mapwin/buffered.py --- grass-7.6.0~rc1/gui/wxpython/mapwin/buffered.py 2018-09-16 20:55:58.000000000 +0000 +++ grass-7.6.0/gui/wxpython/mapwin/buffered.py 2019-01-01 18:11:38.000000000 +0000 @@ -1009,16 +1009,7 @@ if self._properties.showRegion: compReg = self.Map.GetRegion() dispReg = self.Map.GetCurrentRegion() - reg = None - if utils.isInRegion(dispReg, compReg): - self.polypen = wx.Pen( - colour=wx.Colour(0, 0, 255, 128), - width=3, style=wx.SOLID) - reg = dispReg - else: - self.polypen = wx.Pen(colour=wx.Colour(255, 0, 0, 128), - width=3, style=wx.SOLID) - reg = compReg + reg = dispReg if utils.isInRegion(dispReg, compReg) else compReg regionCoords = [] regionCoords.append((reg['w'], reg['n'])) @@ -1026,7 +1017,10 @@ regionCoords.append((reg['e'], reg['s'])) regionCoords.append((reg['w'], reg['s'])) regionCoords.append((reg['w'], reg['n'])) + # draw region extent + self.polypen = wx.Pen(colour=wx.Colour(255, 0, 0, 128), + width=3, style=wx.SOLID) self.DrawLines(pdc=self.pdcTransparent, polycoords=regionCoords) def EraseMap(self): diff -Nru grass-7.6.0~rc1/gui/wxpython/modules/extensions.py grass-7.6.0/gui/wxpython/modules/extensions.py --- grass-7.6.0~rc1/gui/wxpython/modules/extensions.py 2017-01-02 10:57:00.000000000 +0000 +++ grass-7.6.0/gui/wxpython/modules/extensions.py 2019-01-01 18:11:38.000000000 +0000 @@ -53,14 +53,14 @@ self.panel = wx.Panel(parent=self, id=wx.ID_ANY) - self.repoBox = wx.StaticBox( - parent=self.panel, id=wx.ID_ANY, label=" %s " % - _("Repository (leave empty to use the official one)")) + # self.repoBox = wx.StaticBox( + # parent=self.panel, id=wx.ID_ANY, label=" %s " % + # _("Repository (leave empty to use the official one)")) self.treeBox = wx.StaticBox( parent=self.panel, id=wx.ID_ANY, label=" %s " % _("List of extensions - double-click to install")) - self.repo = wx.TextCtrl(parent=self.panel, id=wx.ID_ANY) + # self.repo = wx.TextCtrl(parent=self.panel, id=wx.ID_ANY) # modelBuilder loads data into tree model self.modelBuilder = ExtensionTreeModelBuilder() @@ -100,19 +100,19 @@ continue self.options[name] = wx.CheckBox(parent=self.panel, id=wx.ID_ANY, label=desc) - defaultUrl = '' # default/official one will be used when option empty - self.repo.SetValue( - task.get_param( - value='url').get( - 'default', - defaultUrl)) + # defaultUrl = '' # default/official one will be used when option empty + # self.repo.SetValue( + # task.get_param( + # value='url').get( + # 'default', + # defaultUrl)) self.statusbar = self.CreateStatusBar(number=1) - self.btnFetch = wx.Button(parent=self.panel, id=wx.ID_ANY, - label=_("&Fetch")) - self.btnFetch.SetToolTipString(_("Fetch list of available modules " - "from GRASS Addons SVN repository")) + # self.btnFetch = wx.Button(parent=self.panel, id=wx.ID_ANY, + # label=_("&Fetch")) + # self.btnFetch.SetToolTipString(_("Fetch list of available modules " + # "from GRASS Addons SVN repository")) self.btnClose = wx.Button(parent=self.panel, id=wx.ID_CLOSE) self.btnInstall = wx.Button(parent=self.panel, id=wx.ID_ANY, label=_("&Install")) @@ -123,7 +123,7 @@ self.btnHelp.SetToolTipString(_("Show g.extension manual page")) self.btnClose.Bind(wx.EVT_BUTTON, lambda evt: self.Close()) - self.btnFetch.Bind(wx.EVT_BUTTON, self.OnFetch) + # self.btnFetch.Bind(wx.EVT_BUTTON, self.OnFetch) self.btnInstall.Bind(wx.EVT_BUTTON, self.OnInstall) self.btnHelp.Bind(wx.EVT_BUTTON, self.OnHelp) self.tree.selectionChanged.connect(self.OnItemSelected) @@ -137,14 +137,14 @@ def _layout(self): """Do layout""" sizer = wx.BoxSizer(wx.VERTICAL) - repoSizer = wx.StaticBoxSizer(self.repoBox, wx.VERTICAL) - repo1Sizer = wx.BoxSizer(wx.HORIZONTAL) - repo1Sizer.Add(self.repo, proportion=1, - flag=wx.ALL | wx.ALIGN_CENTER_VERTICAL, border=1) - repo1Sizer.Add(self.btnFetch, proportion=0, - flag=wx.ALL | wx.ALIGN_CENTER_VERTICAL, border=1) - repoSizer.Add(repo1Sizer, - flag=wx.EXPAND) + # repoSizer = wx.StaticBoxSizer(self.repoBox, wx.VERTICAL) + # repo1Sizer = wx.BoxSizer(wx.HORIZONTAL) + # repo1Sizer.Add(self.repo, proportion=1, + # flag=wx.ALL | wx.ALIGN_CENTER_VERTICAL, border=1) + # repo1Sizer.Add(self.btnFetch, proportion=0, + # flag=wx.ALL | wx.ALIGN_CENTER_VERTICAL, border=1) + # repoSizer.Add(repo1Sizer, + # flag=wx.EXPAND) findSizer = wx.BoxSizer(wx.HORIZONTAL) findSizer.Add(self.search, proportion=1) @@ -165,10 +165,10 @@ flag=wx.RIGHT, border=5) btnSizer.Add(self.btnInstall, proportion=0) - sizer.Add(repoSizer, proportion=0, - flag=wx.ALL | wx.EXPAND, border=3) + # sizer.Add(repoSizer, proportion=0, + # flag=wx.ALL | wx.EXPAND, border=3) sizer.Add(findSizer, proportion=0, - flag=wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.EXPAND, border=3) + flag=wx.ALL | wx.EXPAND, border=3) sizer.Add(treeSizer, proportion=1, flag=wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.EXPAND, border=3) sizer.Add(optionSizer, proportion=0, @@ -197,8 +197,8 @@ else: flags.append('--%s' % key) - return ['g.extension'] + flags + ['extension=' + name, - 'url=' + self.repo.GetValue().strip()] + # 'url=' + self.repo.GetValue().strip()] + return ['g.extension'] + flags + ['extension={}'.format(name) ] def OnFetch(self, event): """Fetch list of available extensions""" @@ -212,7 +212,7 @@ try: self.thread.Run( callable=self.modelBuilder.Load, - url=self.repo.GetValue().strip(), + url='', # self.repo.GetValue().strip(), ondone=lambda event: self._fetchDone()) except GException as e: self._fetchDone() diff -Nru grass-7.6.0~rc1/gui/wxpython/wxplot/profile.py grass-7.6.0/gui/wxpython/wxplot/profile.py --- grass-7.6.0~rc1/gui/wxpython/wxplot/profile.py 2016-11-14 07:42:40.000000000 +0000 +++ grass-7.6.0/gui/wxpython/wxplot/profile.py 2019-01-01 18:11:38.000000000 +0000 @@ -99,6 +99,8 @@ # Bind events self.Bind(wx.EVT_CLOSE, self.OnCloseWindow) + self.SetGraphStyle() + def _initOpts(self): """Initialize plot options """ diff -Nru grass-7.6.0~rc1/gui/wxpython/xml/toolboxes.xml grass-7.6.0/gui/wxpython/xml/toolboxes.xml --- grass-7.6.0~rc1/gui/wxpython/xml/toolboxes.xml 2017-11-22 22:05:34.000000000 +0000 +++ grass-7.6.0/gui/wxpython/xml/toolboxes.xml 2019-01-01 18:11:38.000000000 +0000 @@ -70,7 +70,7 @@ - + @@ -575,6 +575,18 @@ + + + + + + + + + OnMapCalculator + + + diff -Nru grass-7.6.0~rc1/gui/wxpython/xml/wxgui_items.xml grass-7.6.0/gui/wxpython/xml/wxgui_items.xml --- grass-7.6.0~rc1/gui/wxpython/xml/wxgui_items.xml 2017-11-22 22:05:34.000000000 +0000 +++ grass-7.6.0/gui/wxpython/xml/wxgui_items.xml 2019-01-01 18:11:38.000000000 +0000 @@ -85,13 +85,6 @@ User GUI preferences (display font, commands, digitizer, etc.) ID_PREFERENCES - - - OnMapCalculator - r.mapcalc - Raster map calculator - raster,algebra - OnHistogram diff -Nru grass-7.6.0~rc1/imagery/i.atcorr/i.atcorr.html grass-7.6.0/imagery/i.atcorr/i.atcorr.html --- grass-7.6.0~rc1/imagery/i.atcorr/i.atcorr.html 2018-08-31 15:00:18.000000000 +0000 +++ grass-7.6.0/imagery/i.atcorr/i.atcorr.html 2018-12-27 22:26:21.000000000 +0000 @@ -241,7 +241,7 @@ -28 +29 PlanetScope 0f 10 enter month,day,hh.ddd,long.,lat. * @@ -1122,5 +1122,5 @@
Stefan Blumentrath, Zofie Cimburova, Norwegian Institute for Nature Research, NINA, Oslo, Norway

-Last changed: $Date: 2018-08-24 15:55:21 +0200 (Fri, 24 Aug 2018) $ +Last changed: $Date: 2018-12-27 18:44:04 +0100 (Thu, 27 Dec 2018) $ diff -Nru grass-7.6.0~rc1/include/VERSION grass-7.6.0/include/VERSION --- grass-7.6.0~rc1/include/VERSION 2018-12-26 12:11:26.000000000 +0000 +++ grass-7.6.0/include/VERSION 2019-01-17 08:05:05.000000000 +0000 @@ -1,4 +1,4 @@ 7 6 -0RC1 -2018 +0 +2019 diff -Nru grass-7.6.0~rc1/INSTALL grass-7.6.0/INSTALL --- grass-7.6.0~rc1/INSTALL 2018-08-31 15:01:16.000000000 +0000 +++ grass-7.6.0/INSTALL 2019-01-01 18:59:11.000000000 +0000 @@ -314,6 +314,6 @@ https://grass.osgeo.org/documentation/first-time-users/ ------------------ -(C) 1999-2018 by The GRASS Development Team +(C) 1999-2019 by The GRASS Development Team -Last changed: $Date: 2018-08-31 17:01:15 +0200 (Fri, 31 Aug 2018) $ +Last changed: $Date: 2019-01-01 19:22:26 +0100 (Tue, 01 Jan 2019) $ diff -Nru grass-7.6.0~rc1/lib/gis/gislib_cmdline_parsing.dox grass-7.6.0/lib/gis/gislib_cmdline_parsing.dox --- grass-7.6.0~rc1/lib/gis/gislib_cmdline_parsing.dox 2018-08-31 15:00:18.000000000 +0000 +++ grass-7.6.0/lib/gis/gislib_cmdline_parsing.dox 2019-01-01 18:59:11.000000000 +0000 @@ -4,7 +4,7 @@ diff -Nru grass-7.6.0~rc1/lib/init/grass.py grass-7.6.0/lib/init/grass.py --- grass-7.6.0~rc1/lib/init/grass.py 2018-12-25 22:43:25.000000000 +0000 +++ grass-7.6.0/lib/init/grass.py 2019-01-10 12:41:18.000000000 +0000 @@ -18,7 +18,7 @@ # command line options for setting the GISDBASE, LOCATION, # and/or MAPSET. Finally it starts GRASS with the appropriate # user interface and cleans up after it is finished. -# COPYRIGHT: (C) 2000-2018 by the GRASS Development Team +# COPYRIGHT: (C) 2000-2019 by the GRASS Development Team # # This program is free software under the GNU General # Public License (>=v2). Read the file COPYING that @@ -347,7 +347,7 @@ gui=_("use $DEFAULT_GUI graphical user interface"), gui_detail=_("and set as default"), config=_("print GRASS configuration parameters"), - config_detail=_("options: arch,build,compiler,path,revision,version"), + config_detail=_("options: arch,build,compiler,path,revision,svn_revision,version"), params=_("Parameters"), gisdbase=_("initial GRASS GIS database directory"), gisdbase_detail=_("directory containing Locations"), @@ -1842,6 +1842,15 @@ filerev.close() sys.stdout.write( "%s\n" % val[0].split(':')[1].rstrip('$"\n').strip()) + elif arg == 'svn_revision': + filerev = open(gpath('etc', 'VERSIONNUMBER')) + linerev = filerev.readline().rstrip('\n') + filerev.close() + try: + revision = linerev.split(' ')[1] + sys.stdout.write("%s\n" % revision[1:]) + except: + sys.stdout.write("No SVN revision defined\n") elif arg == 'version': sys.stdout.write("%s\n" % grass_version) else: diff -Nru grass-7.6.0~rc1/lib/vector/Vlib/intersect.c grass-7.6.0/lib/vector/Vlib/intersect.c --- grass-7.6.0~rc1/lib/vector/Vlib/intersect.c 2018-08-31 15:00:18.000000000 +0000 +++ grass-7.6.0/lib/vector/Vlib/intersect.c 2019-01-17 08:02:14.000000000 +0000 @@ -115,6 +115,7 @@ static int first_3d = 1; double d, d1, d2, r1, dtol, t; int switched; + int end_points; /* TODO: Works for points ? */ @@ -128,6 +129,13 @@ first_3d = 0; } + *x1 = 0; + *y1 = 0; + *z1 = 0; + *x2 = 0; + *y2 = 0; + *z2 = 0; + /* 'Sort' each segment by x, y * MUST happen before D, D1, D2 are calculated */ switched = 0; @@ -230,6 +238,28 @@ G_debug(2, "Vect_segment_intersection(): d = %f, d1 = %f, d2 = %f", d, d1, d2); + end_points = 0; + if (ax1 == bx1 && ay1 == by1) { + end_points = 1; + *x1 = ax1; + *y1 = ay1; + } + if (ax1 == bx2 && ay1 == by2) { + end_points = 1; + *x1 = ax1; + *y1 = ay1; + } + if (ax2 == bx1 && ay2 == by1) { + end_points = 2; + *x1 = ax2; + *y1 = ay2; + } + if (ax2 == bx2 && ay2 == by2) { + end_points = 2; + *x1 = ax2; + *y1 = ay2; + } + /* TODO: dtol was originally set to 1.0e-10, which was usually working but not always. * Can it be a problem to set the tolerance to 0.0 ? */ dtol = 0.0; @@ -238,14 +268,30 @@ G_debug(2, " -> not parallel/collinear: d1 = %f, d2 = %f", d1, d2); if (d > 0) { if (d1 < 0 || d1 > d || d2 < 0 || d2 > d) { - G_debug(2, " -> no intersection"); - return 0; + if (end_points) { + G_debug(2, " -> fp error, but intersection at end points %f, %f", *x1, *y1); + + return 1; + } + else { + G_debug(2, " -> no intersection"); + + return 0; + } } } else { if (d1 < d || d1 > 0 || d2 < d || d2 > 0) { - G_debug(2, " -> no intersection"); - return 0; + if (end_points) { + G_debug(2, " -> fp error, but intersection at end points %f, %f", *x1, *y1); + + return 1; + } + else { + G_debug(2, " -> no intersection"); + + return 0; + } } } @@ -264,7 +310,10 @@ if (d1 || d2) { /* lines are parallel */ G_debug(2, " -> parallel"); - return 0; + if (end_points) + G_debug(2, "Segments are apparently parallel, but connected at end points -> collinear"); + else + return 0; } /* segments are colinear. check for overlap */ diff -Nru grass-7.6.0~rc1/man/build_rest.py grass-7.6.0/man/build_rest.py --- grass-7.6.0~rc1/man/build_rest.py 2018-01-01 22:35:22.000000000 +0000 +++ grass-7.6.0/man/build_rest.py 2019-01-01 18:59:11.000000000 +0000 @@ -167,7 +167,7 @@ -------------- :doc:`Manual main page ` \| :doc:`Full Index ` - 2003-2018 `GRASS Development Team `_, GRASS GIS ${grass_version} Reference Manual + 2003-2019 `GRASS Development Team `_, GRASS GIS ${grass_version} Reference Manual """) cmd1_tmpl = string.Template(\ diff -Nru grass-7.6.0~rc1/raster/r.buildvrt/r.buildvrt.html grass-7.6.0/raster/r.buildvrt/r.buildvrt.html --- grass-7.6.0~rc1/raster/r.buildvrt/r.buildvrt.html 2018-10-15 16:09:12.000000000 +0000 +++ grass-7.6.0/raster/r.buildvrt/r.buildvrt.html 2018-12-26 16:32:05.000000000 +0000 @@ -8,7 +8,7 @@

NOTES

r.buildvrt creates a list of raster maps that can be -located in different mapsets. The ouput is a read-only link to +located in different mapsets. The output is a read-only link to the original raster maps which is only valid if the original raster maps remain in the originally indicated mapset. A VRT can also be built from raster maps registered with r.external. @@ -62,4 +62,4 @@ Markus Metz

-Last changed: $Date: 2018-10-14 21:07:26 +0200 (Sun, 14 Oct 2018) $ +Last changed: $Date: 2018-12-26 17:29:08 +0100 (Wed, 26 Dec 2018) $ diff -Nru grass-7.6.0~rc1/raster/r.horizon/testsuite/test_r_horizon.py grass-7.6.0/raster/r.horizon/testsuite/test_r_horizon.py --- grass-7.6.0~rc1/raster/r.horizon/testsuite/test_r_horizon.py 2015-09-07 21:08:11.000000000 +0000 +++ grass-7.6.0/raster/r.horizon/testsuite/test_r_horizon.py 2019-01-16 14:34:13.000000000 +0000 @@ -30,7 +30,7 @@ 280.000000,0.039774 300.000000,0.032360 320.000000,0.014804 -340.000000,0.000000 +340.000000,-0.001438 360.000000,0.004724 20.000000,0.012612 40.000000,0.015207 @@ -51,7 +51,7 @@ 280.000000,0.039774 300.000000,0.032360 320.000000,0.014804 -340.000000,0.000000 +340.000000,-0.001438 360.000000,0.004724 20.000000,0.012612 40.000000,0.015207 @@ -106,7 +106,7 @@ module = SimpleModule('r.horizon', elevation='elevation', output=self.horizon_output, direction=50) self.assertModule(module) - ref = {'min': 0, 'max': 0.70678365230560, 'stddev': 0.0360724286360789} + ref = {'min': -1.57079637050629, 'max': 0.70678365230560, 'stddev': 0.0708080140468585} self.assertRasterFitsUnivar(raster='test_horizon_output_from_elevation_050', reference=ref, precision=1e6) def test_raster_mode_multiple_direction(self): diff -Nru grass-7.6.0~rc1/raster/r.out.gdal/r.out.gdal.html grass-7.6.0/raster/r.out.gdal/r.out.gdal.html --- grass-7.6.0~rc1/raster/r.out.gdal/r.out.gdal.html 2018-08-31 15:00:19.000000000 +0000 +++ grass-7.6.0/raster/r.out.gdal/r.out.gdal.html 2019-01-15 09:57:43.000000000 +0000 @@ -111,6 +111,16 @@ stretching the color table to actual min/max would help (sometimes under symbology). +

Adding overviews to speed up map display in other software

+ +Adding overviews with
gdaladdo +after exporting can speed up display. The overviews are created internally +within the exported file. The amount of levels (power-of-two factors) are +controlled with the overviews parameter. The higher the overview level +defined by the user the more lower resolution internal overviews are added +Note that other software might create their own overviews, ignoring existing +overviews. +

GeoTIFF caveats

GeoTIFF exports can only be displayed by standard image viewers @@ -125,7 +135,7 @@ efficient, but not supported by some applications. This issue only arises when writing out multi-band imagery groups. -

+

Improving GeoTIFF compatibility

To create a GeoTIFF that is highly compatible with various other GIS @@ -156,10 +166,6 @@
  • Keep metadata simple with createopt="PROFILE=GeoTIFF" or createopt="PROFILE=BASELINE". With BASELINE no GDAL or GeoTIFF tags will be written and a World file is required (createopt="TFW=YES"). - -
  • Adding overviews with gdaladdo after exporting can speed up display. -Note that other software might create their own overviews, ignoring existing -overviews.

    @@ -192,6 +198,14 @@ r.out.gdal in=elevation output=elevation.tif createopt="COMPRESS=DEFLATE" +

    Export a raster map with internal overview in "Deflate" compressed GeoTIFF format

    + +
    +g.region raster=elevation -p
    +# overviews=5 corresponds to 'gdaladdo ... 2 4 8 16 32'
    +r.out.gdal in=elevation output=elevation.tif createopt="COMPRESS=DEFLATE" overviews=5
    +
    +

    Export R,G,B imagery bands in GeoTIFF format suitable for ESRI software

    @@ -319,4 +333,4 @@ Vytautas Vebra (oliver4grass at gmail.com)
    Markus Metz (improved nodata logic) -

    Last changed: $Date: 2017-10-12 20:47:34 +0200 (Thu, 12 Oct 2017) $ +

    Last changed: $Date: 2019-01-15 10:57:42 +0100 (Tue, 15 Jan 2019) $ diff -Nru grass-7.6.0~rc1/raster/r.reclass/testsuite/test_r_reclass.py grass-7.6.0/raster/r.reclass/testsuite/test_r_reclass.py --- grass-7.6.0~rc1/raster/r.reclass/testsuite/test_r_reclass.py 2018-01-15 19:01:17.000000000 +0000 +++ grass-7.6.0/raster/r.reclass/testsuite/test_r_reclass.py 2019-01-05 00:08:24.000000000 +0000 @@ -37,7 +37,7 @@ @classmethod def setUpClass(cls): cls.use_temp_region() - cls.runModule('g.region', raster=cls.input) + cls.runModule('g.region', raster=cls.input) @classmethod def tearDownClass(cls): @@ -48,37 +48,37 @@ def test_rules1(self): """Testing rules 1 """ - reclass = SimpleModule('r.reclass', input=self.input, output=self.output, + reclass = SimpleModule('r.reclass', input=self.input, output=self.output, rules='-') reclass.inputs.stdin = rules1 self.assertModule(reclass) - info = 'min=1\nmax=2\ndatatype=CELL' + info = 'min=1\nmax=2\ndatatype=CELL' self.assertRasterFitsInfo(raster='reclass', reference=info) def test_rules2(self): """Testing Rules2""" - reclass = SimpleModule('r.reclass', input=self.input, output=self.output, + reclass = SimpleModule('r.reclass', input=self.input, output=self.output, rules='-') reclass.inputs.stdin = rules2 self.assertModule(reclass) - info = 'min=1\nmax=2\ndatatype=CELL' + info = 'min=1\nmax=2\ndatatype=CELL' self.assertRasterFitsInfo(raster='reclass', reference=info) def test_rules3(self): """Testing rules3""" - reclass = SimpleModule('r.reclass', input=self.input, output=self.output, + reclass = SimpleModule('r.reclass', input=self.input, output=self.output, rules='-') reclass.inputs.stdin = rules3 self.assertModule(reclass) - info = 'min=1\nmax=3\ndatatype=CELL' + info = 'min=1\nmax=3\ndatatype=CELL' self.assertRasterFitsInfo(raster='reclass', reference=info) def test_rules4(self): """Testing rules with external file""" - reclass = SimpleModule('r.reclass', input=self.input, output=self.output, + reclass = SimpleModule('r.reclass', input=self.input, output=self.output, rules='data/rules.txt') self.assertModule(reclass) - info = 'min=1\nmax=3\ndatatype=CELL' + info = 'min=1\nmax=3\ndatatype=CELL' self.assertRasterFitsInfo(raster='reclass', reference=info) if __name__ == '__main__': diff -Nru grass-7.6.0~rc1/REQUIREMENTS.html grass-7.6.0/REQUIREMENTS.html --- grass-7.6.0~rc1/REQUIREMENTS.html 2018-08-31 15:00:18.000000000 +0000 +++ grass-7.6.0/REQUIREMENTS.html 2019-01-01 18:59:11.000000000 +0000 @@ -212,11 +212,11 @@


    -© GRASS Development Team 1997-2018 +© GRASS Development Team 1997-2019

    Please report bugs here:
    https://grass.osgeo.org/development/bug-tracking/

    -Last changed: $Date: 2018-03-25 15:24:28 +0200 (Sun, 25 Mar 2018) $ +Last changed: $Date: 2019-01-01 19:22:26 +0100 (Tue, 01 Jan 2019) $ diff -Nru grass-7.6.0~rc1/scripts/g.search.modules/testsuite/test_g_search_modules.py grass-7.6.0/scripts/g.search.modules/testsuite/test_g_search_modules.py --- grass-7.6.0~rc1/scripts/g.search.modules/testsuite/test_g_search_modules.py 2017-11-29 13:19:14.000000000 +0000 +++ grass-7.6.0/scripts/g.search.modules/testsuite/test_g_search_modules.py 2019-01-16 14:39:36.000000000 +0000 @@ -5,7 +5,7 @@ PURPOSE: Test g.search.modules script outputs -COPYRIGHT: (C) 2015 Jachym Ceppicky, and by the GRASS Development Team +COPYRIGHT: (C) 2015 Jachym Cepicky, and by the GRASS Development Team This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS @@ -16,7 +16,13 @@ from grass.gunittest.main import test from grass.gunittest.gmodules import SimpleModule -import termcolor +import unittest + +try: + has_termcolor = True + import termcolor +except ImportError: + has_termcolor = False class TestSearchModule(TestCase): @@ -44,6 +50,8 @@ self.assertEqual(len(stdout), 6) self.assertEqual(stdout[3], 'r.water.outlet') + @unittest.skipUnless(has_termcolor, + "not supported in this library version") def test_colored_terminal(self): module = SimpleModule('g.search.modules', keyword="water", flags="c") self.assertModule(module) diff -Nru grass-7.6.0~rc1/scripts/r.drain/r.drain.html grass-7.6.0/scripts/r.drain/r.drain.html --- grass-7.6.0~rc1/scripts/r.drain/r.drain.html 2018-08-31 15:00:19.000000000 +0000 +++ grass-7.6.0/scripts/r.drain/r.drain.html 2018-12-26 16:32:05.000000000 +0000 @@ -33,7 +33,7 @@

    For an elevation surface, the path is calculated by choosing the steeper "slope" between adjacent cells. The slope calculation -accurately acounts for the variable scale in lat-lon projections. For +accurately accounts for the variable scale in lat-lon projections. For a cost surface, the path is calculated by following the movement direction surface back to the start point given in r.walk or @@ -313,4 +313,4 @@ Roberto Flor (ITC-irst, Trento, Italy)

    -Last changed: $Date: 2017-11-23 04:15:34 +0100 (Thu, 23 Nov 2017) $ +Last changed: $Date: 2018-12-26 17:29:08 +0100 (Wed, 26 Dec 2018) $ diff -Nru grass-7.6.0~rc1/temporal/t.rast3d.univar/testsuite/test_univar.py grass-7.6.0/temporal/t.rast3d.univar/testsuite/test_univar.py --- grass-7.6.0~rc1/temporal/t.rast3d.univar/testsuite/test_univar.py 2015-12-19 20:02:11.000000000 +0000 +++ grass-7.6.0/temporal/t.rast3d.univar/testsuite/test_univar.py 2019-01-16 14:39:36.000000000 +0000 @@ -48,11 +48,11 @@ overwrite=True, verbose=True) self.assertModule(t_rast3d_univar) - univar_text="""id|start|end|mean|min|max|mean_of_abs|stddev|variance|coeff_var|sum|null_cells|cells -a_1@testing|2001-01-01 00:00:00|2001-04-01 00:00:00|100|100|100|100|0|0|0|48000000|0|480000 -a_2@testing|2001-04-01 00:00:00|2001-07-01 00:00:00|200|200|200|200|0|0|0|96000000|0|480000 -a_3@testing|2001-07-01 00:00:00|2001-10-01 00:00:00|300|300|300|300|0|0|0|144000000|0|480000 -a_4@testing|2001-10-01 00:00:00|2002-01-01 00:00:00|400|400|400|400|0|0|0|192000000|0|480000 + univar_text="""id|start|end|mean|min|max|mean_of_abs|stddev|variance|coeff_var|sum|null_cells|cells|non_null_cells +a_1@testing|2001-01-01 00:00:00|2001-04-01 00:00:00|100|100|100|100|0|0|0|48000000|0|480000|480000 +a_2@testing|2001-04-01 00:00:00|2001-07-01 00:00:00|200|200|200|200|0|0|0|96000000|0|480000|480000 +a_3@testing|2001-07-01 00:00:00|2001-10-01 00:00:00|300|300|300|300|0|0|0|144000000|0|480000|480000 +a_4@testing|2001-10-01 00:00:00|2002-01-01 00:00:00|400|400|400|400|0|0|0|192000000|0|480000|480000 """ for ref, res in zip(univar_text.split("\n"), t_rast3d_univar.outputs.stdout.split("\n")): if ref and res: @@ -67,10 +67,10 @@ overwrite=True, verbose=True) self.assertModule(t_rast3d_univar) - univar_text="""id|start|end|mean|min|max|mean_of_abs|stddev|variance|coeff_var|sum|null_cells|cells -a_2@testing|2001-04-01 00:00:00|2001-07-01 00:00:00|200|200|200|200|0|0|0|96000000|0|480000 -a_3@testing|2001-07-01 00:00:00|2001-10-01 00:00:00|300|300|300|300|0|0|0|144000000|0|480000 -a_4@testing|2001-10-01 00:00:00|2002-01-01 00:00:00|400|400|400|400|0|0|0|192000000|0|480000 + univar_text="""id|start|end|mean|min|max|mean_of_abs|stddev|variance|coeff_var|sum|null_cells|cells|non_null_cells +a_2@testing|2001-04-01 00:00:00|2001-07-01 00:00:00|200|200|200|200|0|0|0|96000000|0|480000|480000 +a_3@testing|2001-07-01 00:00:00|2001-10-01 00:00:00|300|300|300|300|0|0|0|144000000|0|480000|480000 +a_4@testing|2001-10-01 00:00:00|2002-01-01 00:00:00|400|400|400|400|0|0|0|192000000|0|480000|480000 """ for ref, res in zip(univar_text.split("\n"), t_rast3d_univar.outputs.stdout.split("\n")): if ref and res: @@ -85,10 +85,10 @@ where="start_time >= '2001-03-01'", overwrite=True, verbose=True) - univar_text="""id|start|end|mean|min|max|mean_of_abs|stddev|variance|coeff_var|sum|null_cells|cells -a_2@testing|2001-04-01 00:00:00|2001-07-01 00:00:00|200|200|200|200|0|0|0|96000000|0|480000 -a_3@testing|2001-07-01 00:00:00|2001-10-01 00:00:00|300|300|300|300|0|0|0|144000000|0|480000 -a_4@testing|2001-10-01 00:00:00|2002-01-01 00:00:00|400|400|400|400|0|0|0|192000000|0|480000 + univar_text="""id|start|end|mean|min|max|mean_of_abs|stddev|variance|coeff_var|sum|null_cells|cells|non_null_cells +a_2@testing|2001-04-01 00:00:00|2001-07-01 00:00:00|200|200|200|200|0|0|0|96000000|0|480000|480000 +a_3@testing|2001-07-01 00:00:00|2001-10-01 00:00:00|300|300|300|300|0|0|0|144000000|0|480000|480000 +a_4@testing|2001-10-01 00:00:00|2002-01-01 00:00:00|400|400|400|400|0|0|0|192000000|0|480000|480000 """ univar_output = open("univar_output.txt", "r").read() @@ -105,9 +105,9 @@ where="start_time >= '2001-03-01'", overwrite=True, verbose=True) - univar_text="""a_2@testing|2001-04-01 00:00:00|2001-07-01 00:00:00|200|200|200|200|0|0|0|96000000|0|480000 -a_3@testing|2001-07-01 00:00:00|2001-10-01 00:00:00|300|300|300|300|0|0|0|144000000|0|480000 -a_4@testing|2001-10-01 00:00:00|2002-01-01 00:00:00|400|400|400|400|0|0|0|192000000|0|480000 + univar_text="""a_2@testing|2001-04-01 00:00:00|2001-07-01 00:00:00|200|200|200|200|0|0|0|96000000|0|480000|480000 +a_3@testing|2001-07-01 00:00:00|2001-10-01 00:00:00|300|300|300|300|0|0|0|144000000|0|480000|480000 +a_4@testing|2001-10-01 00:00:00|2002-01-01 00:00:00|400|400|400|400|0|0|0|192000000|0|480000|480000 """ univar_output = open("univar_output.txt", "r").read() diff -Nru grass-7.6.0~rc1/testsuite/README grass-7.6.0/testsuite/README --- grass-7.6.0~rc1/testsuite/README 2018-08-31 15:00:19.000000000 +0000 +++ grass-7.6.0/testsuite/README 2019-01-16 16:16:28.000000000 +0000 @@ -1,8 +1,11 @@ -This directory contains scripts to check the functionality -of GRASS. -They may be launched in ../demolocation/ +This directory contains scripts to check the functionality of GRASS GIS. + +Some tests may be launched in ../demolocation/ . + +Most test require the North Carolina Sample dataset, available from +https://grass.osgeo.org/sampledata/north_carolina/ ############# For a more advanced test suite, see - http://www-pool.math.tu-berlin.de/~soeren/grass/GRASS_TestSuite/?C=M;O=D + http://fatra.cnr.ncsu.edu/grassgistests/summary_report/ diff -Nru grass-7.6.0~rc1/testsuite/test_framework_GRASS_GIS_with_NC.sh grass-7.6.0/testsuite/test_framework_GRASS_GIS_with_NC.sh --- grass-7.6.0~rc1/testsuite/test_framework_GRASS_GIS_with_NC.sh 1970-01-01 00:00:00.000000000 +0000 +++ grass-7.6.0/testsuite/test_framework_GRASS_GIS_with_NC.sh 2019-01-16 16:16:28.000000000 +0000 @@ -0,0 +1,146 @@ +#!/bin/bash +############################################################################ +# +# MODULE: r.drain +# AUTHOR(S): Markus Neteler, Sören Gebbert, Vaclav Petras +# PURPOSE: Test GRASS GIS using the test framework +# Documentation: +# https://trac.osgeo.org/grass/wiki/GSoC/2014/TestingFrameworkForGRASS +# https://grass.osgeo.org/grass76/manuals/libpython/gunittest_running_tests.html#example-bash-script-to-run-be-used-as-a-cron-job +# +# Data: +# Since we use the full NC dataset (nc_spm_08_grass7.tar.gz) here, we need to generate +# some simplified names as used in NC basic for some test cases. This happens automatically below. +# +# COPYRIGHT: (C) 2019 by Markus Neteler, and the GRASS Development Team +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +############################################################################ + +### CONFIGURATION +# +# computer architecture: +ARCH=x86_64-pc-linux-gnu +# name of binary: +GRASSBIN=grass76 +# source code directory as full path: +GRASSSRC="$HOME/software/grass76" +# temporary grassdata directory +GRASSDATA="$HOME/grassdata/tests-grassdata" + +# Python binary to be used (python|python3) +PYTHON=python + +# here we suppose default compilation settings of GRASS GIS and no 'make install' +# may be no|yes +COMPILE="no" +# configure metascript with compiler flags: +CONFIGURE="${GRASSSRC}/conf_grass7.sh" + +# directory to store reports, e.g. in a subdirectory +REPORTS="testreports" + +# publish report on WWW Server (not needed for local tests) +# may be no|yes +PUBLISH="no" +# upload WWW dir on server for report publication (not used for local tests) +SERVERDIR="/var/www/html/grassgistestreports" + +######### nothing to change below + +set -e # fail fast + +# here we suppose default compilation settings of GRASS GIS and no make install +GRASSBIN="$GRASSSRC/bin.${ARCH}/${GRASSBIN}" +GRASSDIST="$GRASSSRC/dist.${ARCH}" + +# necessary hardcoded GRASS paths +GRASSDIST_PYTHON="$GRASSDIST/etc/python" +GRASS_MULTI_RUNNER="$GRASSSRC/lib/python/gunittest/multirunner.py" +GRASS_MULTI_REPORTER="$GRASSSRC/lib/python/gunittest/multireport.py" + +DATE_FLAGS="--utc +%Y-%m-%d-%H-%M" +NOW=$(date $DATE_FLAGS) + +# get number of processors of current machine +MYNPROC=`getconf _NPROCESSORS_ONLN` +# leave one PROC free for other tasks +GCCTHREADS=`expr $MYNPROC - 1` + +# contains last executed command stdout and stderr +# here were rely on reports being absolute +OUTPUT_LOGFILE="$REPORTS/output-$NOW.txt" + +# these are relative to REPORTS +CURRENT_REPORT_BASENAME="reports_for_date-" +FINAL_REPORT_DIR="summary_report" +CURRENT_REPORTS_DIR="$CURRENT_REPORT_BASENAME$NOW" +LOGFILE="$REPORTS/runs.log" + +mkdir -p $REPORTS/$CURRENT_REPORTS_DIR +mkdir -p $GRASSDATA + +# fetch sample data +SAMPLEDATA=nc_spm_08_grass7.tar.gz +(cd $GRASSDATA ; wget -c https://grass.osgeo.org/sampledata/north_carolina/$SAMPLEDATA ; tar xfz $SAMPLEDATA ) + +echo "Nightly GRASS GIS test started: $NOW" >> ${LOGFILE} + +# Preparation: Since we use the full NC dataset, we need to generate some simplified names as used in NC basic for some test cases +echo " +g.copy raster=basin_50K,basin +g.copy raster=boundary_county_500m,boundary +g.copy raster=landcover_1m,landcover +g.copy raster=geology_30m,geology +g.copy raster=landuse96,landuse +g.copy raster=soilsID,soils +g.copy vector=zipcodes_wake,zipcodes +g.copy vector=schools_wake,schools +" > $GRASSDATA/tmp_rename.sh +$GRASSBIN $GRASSDATA/nc_spm_08_grass7/PERMANENT --exec sh $GRASSDATA/tmp_rename.sh +rm -f $GRASSDATA/tmp_rename.sh + +if [ "$COMPILE" = "yes" ] ; then + ## compile current source code from scratch + cd $GRASSSRC + make distclean -j$GCCTHREADS + svn update + ./$CONFIGURE ... # configure meta script containing all the compiler flags + make -j$GCCTHREADS +fi + +# run tests for the current source code +cd $REPORTS/$CURRENT_REPORTS_DIR +$PYTHON $GRASS_MULTI_RUNNER \ + --grassbin $GRASSBIN \ + --grasssrc $GRASSSRC \ + --grassdata $GRASSDATA \ + --location nc_spm_08_grass7 --location-type nc \ + --location other_location --location-type other_type + +# create overall report of all so far executed tests +# the script depends on GRASS but just Python part is enough +export PYTHONPATH="$GRASSDIST_PYTHON:$PYTHONPATH" +$PYTHON $GRASS_MULTI_REPORTER --output $FINAL_REPORT_DIR \ + $CURRENT_REPORT_BASENAME*/* + +# publish on Web site +if [ "$PUBLISH" = "yes" ] ; then + ## although we cannot be sure the tests were executed was successfully + ## so publish or archive results + rsync -rtvu --delete $REPORTS/ $SERVERDIR +fi + +echo "Nightly ($NOW) GRASS GIS test finished: $(date $DATE_FLAGS)" >> ${LOGFILE} + +exit 0 + diff -Nru grass-7.6.0~rc1/vector/v.overlay/area_area.c grass-7.6.0/vector/v.overlay/area_area.c --- grass-7.6.0~rc1/vector/v.overlay/area_area.c 2018-08-31 15:00:19.000000000 +0000 +++ grass-7.6.0/vector/v.overlay/area_area.c 2019-01-02 21:34:32.000000000 +0000 @@ -18,7 +18,10 @@ /* for ilist qsort'ing and bsearch'ing */ static int cmp_int(const void *a, const void *b) { - return (*(int *)a - *(int *)b); + if (*(int *)a < *(int *)b) + return -1; + + return (*(int *)a > *(int *)b); } int area_area(struct Map_info *In, int *field, struct Map_info *Tmp, @@ -35,6 +38,12 @@ dbString stmt; int nmodif; int verbose; + struct bound_box box; + struct spatial_index si; + int ocentr, ncentr; + int isle, nisles_alloc; + struct line_pnts *APoints, **IPoints; + struct ilist *List; verbose = G_verbose(); @@ -44,7 +53,6 @@ /* optional snap */ if (snap > 0) { int i, j, snapped_lines = 0; - struct bound_box box; struct boxlist *boxlist = Vect_new_boxlist(0); struct ilist *reflist = Vect_new_list(); @@ -176,44 +184,106 @@ } } + /* build a spatial index for new centroids */ + Vect_spatial_index_init(&si, 0); + ncentr = nareas; + for (ocentr = 1; ocentr <= ncentr; ocentr++) { + box.N = box.S = Centr[ocentr].y; + box.E = box.W = Centr[ocentr].x; + box.T = box.B = 0; + Vect_spatial_index_add_item(&si, ocentr, &box); + + Centr[ocentr].cat[0] = Vect_new_cats_struct(); + Centr[ocentr].cat[1] = Vect_new_cats_struct(); + } + + nisles_alloc = 10; + IPoints = G_malloc(nisles_alloc * sizeof(struct line_pnts *)); + for (isle = 0; isle < nisles_alloc; isle++) + IPoints[isle] = Vect_new_line_struct(); + APoints = Vect_new_line_struct(); + + List = Vect_new_list(); + /* Query input maps */ for (input = 0; input < 2; input++) { G_message(_("Querying vector map <%s>..."), Vect_get_full_name(&(In[input]))); + nareas = Vect_get_num_areas(&(In[input])); + G_percent(0, nareas, 1); for (area = 1; area <= nareas; area++) { - Centr[area].cat[input] = Vect_new_cats_struct(); G_percent(area, nareas, 1); - in_area = - Vect_find_area(&(In[input]), Centr[area].x, Centr[area].y); - if (in_area > 0) { - in_centr = Vect_get_area_centroid(&(In[input]), in_area); - if (in_centr > 0) { - int i; - - Vect_read_line(&(In[input]), NULL, Cats, in_centr); - /* Add all cats with original field number */ - for (i = 0; i < Cats->n_cats; i++) { - if (Cats->field[i] == field[input]) { - ATTR *at; - - Vect_cat_set(Centr[area].cat[input], field[input], - Cats->cat[i]); - - /* Mark as used */ - at = find_attr(&(attr[input]), Cats->cat[i]); - if (!at) - G_fatal_error(_("Attribute not found")); + in_centr = Vect_get_area_centroid(&(In[input]), area); + if (in_centr > 0) { + int i, j; + int nisles; + + + Vect_read_line(&(In[input]), NULL, Cats, in_centr); + Vect_get_area_points(&(In[input]), area, APoints); + nisles = Vect_get_area_num_isles(&(In[input]), area); + if (nisles > nisles_alloc) { + IPoints = G_realloc(IPoints, (nisles + 10) * sizeof(struct line_pnts *)); + for (isle = nisles_alloc; isle < nisles + 10; isle++) + IPoints[isle] = Vect_new_line_struct(); + nisles_alloc = nisles + 10; + } + for (isle = 0; isle < nisles; isle++) { + int isle_id = Vect_get_area_isle(&(In[input]), area, isle); - at->used = 1; + Vect_get_isle_points(&(In[input]), isle_id, IPoints[isle]); + } + + Vect_line_box(APoints, &box); + /* centroid's z is set to zero */ + box.T = box.B = 0; + + Vect_spatial_index_select(&si, &box, List); + for (j = 0; j < List->n_values; j++) { + int centr_in_area; + + ocentr = List->value[j]; + centr_in_area = Vect_point_in_poly(Centr[ocentr].x, + Centr[ocentr].y, + APoints); + if (centr_in_area == 1) { + for (isle = 0; isle < nisles; isle++) { + if (Vect_point_in_poly(Centr[ocentr].x, + Centr[ocentr].y, + IPoints[isle]) > 0) { + centr_in_area = 0; + break; + } + } + } + + if (centr_in_area > 0) { + /* Add all cats with original field number */ + for (i = 0; i < Cats->n_cats; i++) { + if (Cats->field[i] == field[input]) { + ATTR *at; + + Vect_cat_set(Centr[ocentr].cat[input], field[input], + Cats->cat[i]); + + /* Mark as used */ + at = find_attr(&(attr[input]), Cats->cat[i]); + if (!at) + G_fatal_error(_("Attribute not found")); + + at->used = 1; + } } } } } } } + Vect_spatial_index_destroy(&si); + nareas = Vect_get_num_areas(Tmp); G_message(_("Writing centroids...")); @@ -374,6 +444,8 @@ Vect_build_partial(Tmp, GV_BUILD_CENTROIDS); G_set_verbose(verbose); /* Copy valid boundaries to final output */ + G_message(_("Copying results to final output map...")); + nlines = Vect_get_num_lines(Tmp); for (line = 1; line <= nlines; line++) { diff -Nru grass-7.6.0~rc1/vector/v.select/testsuite/test_v_select.py grass-7.6.0/vector/v.select/testsuite/test_v_select.py --- grass-7.6.0~rc1/vector/v.select/testsuite/test_v_select.py 2018-03-01 23:18:29.000000000 +0000 +++ grass-7.6.0/vector/v.select/testsuite/test_v_select.py 2019-01-16 14:51:31.000000000 +0000 @@ -30,8 +30,8 @@ def tearDownClass(cls): cls.del_temp_region() - def tearDown(self): - self.runModule('g.remove', type='vector', flags='f', name=cls.output) + def tearDown(cls): + cls.runModule('g.remove', type='vector', flags='f', name=cls.output) def test_opo(self): """Testing operator overlap""" diff -Nru grass-7.6.0~rc1/vector/v.type/v.type.html grass-7.6.0/vector/v.type/v.type.html --- grass-7.6.0~rc1/vector/v.type/v.type.html 2018-08-31 15:00:19.000000000 +0000 +++ grass-7.6.0/vector/v.type/v.type.html 2019-01-14 11:13:26.000000000 +0000 @@ -9,11 +9,17 @@ v.type input=map_l output=map_b from_type=line to_type=boundary +In order to create areas, centroids must be added with v.centroids. +

    SEE ALSO

    -v.to.points + + +v.centroids, +v.to.points +

    AUTHOR

    Radim Blazek, ITC-Irst, Trento, Italy -

    Last changed: $Date: 2012-05-17 22:28:13 +0200 (Thu, 17 May 2012) $ +

    Last changed: $Date: 2019-01-14 12:13:25 +0100 (Mon, 14 Jan 2019) $ diff -Nru grass-7.6.0~rc1/vector/v.vol.rst/main.c grass-7.6.0/vector/v.vol.rst/main.c --- grass-7.6.0~rc1/vector/v.vol.rst/main.c 2018-09-19 12:27:28.000000000 +0000 +++ grass-7.6.0/vector/v.vol.rst/main.c 2018-12-27 12:30:35.000000000 +0000 @@ -639,7 +639,7 @@ } } } else - G_warning(_("Unable to create <%s> raster map without cross_input raster map being specified"), cellout); + G_warning(_("Unable to create 'cross_output' raster map without 'cross_input' raster map being specified")); ertot = 0.; out_cond1 = (outz != NULL) || (gradient != NULL) || (aspect1 != NULL)