[Git][debian-gis-team/grass][upstream] New upstream version 7.6.0

Bas Couwenberg gitlab at salsa.debian.org
Thu Jan 17 09:47:36 GMT 2019


Bas Couwenberg pushed to branch upstream at Debian GIS Project / grass


Commits:
8c4209d4 by Bas Couwenberg at 2019-01-17T09:22:58Z
New upstream version 7.6.0
- - - - -


30 changed files:

- + ChangeLog_7.6.0.gz
- − ChangeLog_7.6.0RC1.gz
- INSTALL
- REQUIREMENTS.html
- doc/howto_release.txt
- grasslib.dox
- gui/wxpython/mapwin/buffered.py
- gui/wxpython/modules/extensions.py
- gui/wxpython/wxplot/profile.py
- gui/wxpython/xml/toolboxes.xml
- gui/wxpython/xml/wxgui_items.xml
- imagery/i.atcorr/i.atcorr.html
- include/VERSION
- lib/gis/gislib_cmdline_parsing.dox
- lib/init/grass.py
- lib/vector/Vlib/intersect.c
- man/build_rest.py
- raster/r.buildvrt/r.buildvrt.html
- raster/r.horizon/testsuite/test_r_horizon.py
- raster/r.out.gdal/r.out.gdal.html
- raster/r.reclass/testsuite/test_r_reclass.py
- scripts/g.search.modules/testsuite/test_g_search_modules.py
- scripts/r.drain/r.drain.html
- temporal/t.rast3d.univar/testsuite/test_univar.py
- testsuite/README
- + testsuite/test_framework_GRASS_GIS_with_NC.sh
- vector/v.overlay/area_area.c
- vector/v.select/testsuite/test_v_select.py
- vector/v.type/v.type.html
- vector/v.vol.rst/main.c


Changes:

=====================================
ChangeLog_7.6.0.gz
=====================================
Binary files /dev/null and b/ChangeLog_7.6.0.gz differ


=====================================
ChangeLog_7.6.0RC1.gz deleted
=====================================
Binary files a/ChangeLog_7.6.0RC1.gz and /dev/null differ


=====================================
INSTALL
=====================================
@@ -314,6 +314,6 @@ https://trac.osgeo.org/grass/wiki/Submitting
 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) $


=====================================
REQUIREMENTS.html
=====================================
@@ -212,11 +212,11 @@ MacOSX users may go here to download precompiled libraries etc.:
 <p>
 
 <hr width="100%">
-<i>© GRASS Development Team 1997-2018</i>
+<i>© GRASS Development Team 1997-2019</i>
 <p>Please report bugs here:
 <br><a href="https://grass.osgeo.org/development/bug-tracking/">https://grass.osgeo.org/development/bug-tracking/</a>
 
 <p>
-<i>Last changed: $Date: 2018-03-25 15:24:28 +0200 (Sun, 25 Mar 2018) $</i>
+<i>Last changed: $Date: 2019-01-01 19:22:26 +0100 (Tue, 01 Jan 2019) $</i>
 </body>
 </html>


=====================================
doc/howto_release.txt
=====================================
@@ -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 @@ vim include/VERSION
 
 #example:
 7
-4
+6
 1RC1
 2018
 
@@ -124,7 +124,7 @@ RELEASETAG=release_${TODAY}_grass_${MAJOR}_${MINOR}_${RELEASE}
 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 @@ vim include/VERSION
 
 #example
 7
-4
+6
 1svn
 2018
 
@@ -222,7 +222,7 @@ vim grass-addons/tools/wingrass-packager/grass_copy_wwwroot.sh
   - 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.


=====================================
grasslib.dox
=====================================
@@ -1,7 +1,7 @@
 /*! \mainpage GRASS GIS 7 Programmer's Manual
 <!-- * doxygenized from "GRASS 5 Programmer's Manual"
        by M. Neteler 2/2004
-     * updated 8/2005, 2006-2008, 2010-2011, 2017, 2018
+     * updated 8/2005, 2006-2008, 2010-2011, 2017, 2018, 2019
   -->
 
 <a href="https://grass.osgeo.org">GRASS GIS</a> (<b>Geographic
@@ -23,7 +23,7 @@ Team</a>, an international team of programmers, GRASS module authors
 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 <a
 href="http://www.fsf.org/copyleft/fdl.html">GNU Free Documentation


=====================================
gui/wxpython/mapwin/buffered.py
=====================================
@@ -1009,16 +1009,7 @@ class BufferedMapWindow(MapWindowBase, Window):
         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 @@ class BufferedMapWindow(MapWindowBase, Window):
             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):


=====================================
gui/wxpython/modules/extensions.py
=====================================
@@ -53,14 +53,14 @@ class InstallExtensionWindow(wx.Frame):
 
         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 @@ class InstallExtensionWindow(wx.Frame):
                 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 @@ class InstallExtensionWindow(wx.Frame):
         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 @@ class InstallExtensionWindow(wx.Frame):
     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 @@ class InstallExtensionWindow(wx.Frame):
                      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 @@ class InstallExtensionWindow(wx.Frame):
                 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 @@ class InstallExtensionWindow(wx.Frame):
         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()


=====================================
gui/wxpython/wxplot/profile.py
=====================================
@@ -99,6 +99,8 @@ class ProfileFrame(BasePlotFrame):
         # Bind events
         self.Bind(wx.EVT_CLOSE, self.OnCloseWindow)
 
+        self.SetGraphStyle()
+
     def _initOpts(self):
         """Initialize plot options
         """


=====================================
gui/wxpython/xml/toolboxes.xml
=====================================
@@ -70,7 +70,7 @@
       <module-item name="r.mask">
         <label>Mask</label>
       </module-item>
-      <wxgui-item name="RasterMapCalculator"/>
+      <subtoolbox name="RasterMapCalculator"/>
       <subtoolbox name="NeighborhoodAnalysis"/>
       <subtoolbox name="OverlayRasters"/>
       <subtoolbox name="SolarRadianceAndShadows"/>
@@ -575,6 +575,18 @@
       </module-item>
     </items>
   </toolbox>
+  <toolbox name="RasterMapCalculator">
+    <label>Raster map calculator</label>
+    <items>
+      <module-item name="r.mapcalc.simple">
+        <label>Simplified raster map calculator</label>
+      </module-item>
+      <module-item name="r.mapcalc">
+        <label>Raster map calculator</label>
+        <handler>OnMapCalculator</handler>
+      </module-item>
+    </items>
+  </toolbox>
   <toolbox name="GRASSWorkingEnvironment">
     <label>GRASS working environment</label>
     <items>


=====================================
gui/wxpython/xml/wxgui_items.xml
=====================================
@@ -85,13 +85,6 @@
     <description>User GUI preferences (display font, commands, digitizer, etc.)</description>
     <wx-id>ID_PREFERENCES</wx-id>
   </wxgui-item>
-  <wxgui-item name="RasterMapCalculator">
-    <label>Raster map calculator</label>
-    <handler>OnMapCalculator</handler>
-    <related-module>r.mapcalc</related-module>
-    <description>Raster map calculator</description>
-    <keywords>raster,algebra</keywords>
-  </wxgui-item>
   <wxgui-item name="Histogram">
     <label>Histogram</label>
     <handler>OnHistogram</handler>


=====================================
imagery/i.atcorr/i.atcorr.html
=====================================
@@ -241,7 +241,7 @@ the ascendant node at equator</td>
 </tr>
 
 <tr>
-<td>28</td>
+<td>29</td>
 <td><b>PlanetScope 0f 10</b></td>
 <td>enter month,day,hh.ddd,long.,lat. *</td>
 </tr>
@@ -1122,5 +1122,5 @@ land imager: spectral response and spectral uniformity., Proc. SPIE 8153,
 <br>Stefan Blumentrath, Zofie Cimburova, Norwegian Institute for Nature Research, NINA, Oslo, Norway
 
 <p>
-<i>Last changed: $Date: 2018-08-24 15:55:21 +0200 (Fri, 24 Aug 2018) $</i>
+<i>Last changed: $Date: 2018-12-27 18:44:04 +0100 (Thu, 27 Dec 2018) $</i>
 


=====================================
include/VERSION
=====================================
@@ -1,4 +1,4 @@
 7
 6
-0RC1
-2018
+0
+2019


=====================================
lib/gis/gislib_cmdline_parsing.dox
=====================================
@@ -4,7 +4,7 @@
 <!--
 extracted form gislib.dox and improved by Vaclav Petras, 2013
 
-Copyright 2004-2018 by the GRASS Development Team
+Copyright 2004-2019 by the GRASS Development Team
 
 Published under GNU Free Documentation License
 -->


=====================================
lib/init/grass.py
=====================================
@@ -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 @@ Geographic Resources Analysis Support System (GRASS GIS).
     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 @@ def print_params():
             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:


=====================================
lib/vector/Vlib/intersect.c
=====================================
@@ -115,6 +115,7 @@ int Vect_segment_intersection(double ax1, double ay1, double az1, double ax2,
     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 @@ int Vect_segment_intersection(double ax1, double ay1, double az1, double ax2,
 	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 @@ int Vect_segment_intersection(double ax1, double ay1, double az1, double ax2,
     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 @@ int Vect_segment_intersection(double ax1, double ay1, double az1, double ax2,
 	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 @@ int Vect_segment_intersection(double ax1, double ay1, double az1, double ax2,
 
     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 */


=====================================
man/build_rest.py
=====================================
@@ -167,7 +167,7 @@ r"""
 --------------
 
 :doc:`Manual main page <index>` \| :doc:`Full Index <full_index>`
- 2003-2018 `GRASS Development Team <https://grass.osgeo.org>`_, GRASS GIS ${grass_version} Reference Manual
+ 2003-2019 `GRASS Development Team <https://grass.osgeo.org>`_, GRASS GIS ${grass_version} Reference Manual
 """)
 
 cmd1_tmpl = string.Template(\


=====================================
raster/r.buildvrt/r.buildvrt.html
=====================================
@@ -8,7 +8,7 @@ read requests.
 <h2>NOTES</h2>
 
 <em>r.buildvrt</em> 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 <em>r.external</em>.
@@ -62,4 +62,4 @@ The equivalent GDAL utility
 Markus Metz
 
 <p>
-<i>Last changed: $Date: 2018-10-14 21:07:26 +0200 (Sun, 14 Oct 2018) $</i>
+<i>Last changed: $Date: 2018-12-26 17:29:08 +0100 (Wed, 26 Dec 2018) $</i>


=====================================
raster/r.horizon/testsuite/test_r_horizon.py
=====================================
@@ -30,7 +30,7 @@ ref2 = """azimuth,horizon_height
 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 @@ ref3 = """azimuth,horizon_height
 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 @@ class TestHorizon(TestCase):
         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):


=====================================
raster/r.out.gdal/r.out.gdal.html
=====================================
@@ -111,6 +111,16 @@ possible values which is very large for e.g. Int32 or Float32. E.g.
 stretching the color table to actual min/max would help (sometimes under
 symbology).
 
+<h3>Adding overviews to speed up map display in other software</h3>
+
+Adding overviews with <tt><a href="https://www.gdal.org/gdaladdo.html">gdaladdo</a></tt>
+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 <b>overviews</b> 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.
+
 <h3>GeoTIFF caveats</h3>
 
 GeoTIFF exports can only be displayed by standard image viewers
@@ -125,7 +135,7 @@ ImageMagick, the interleaving mode should be set to "pixel" using
 efficient, but not supported by some applications.
 <!-- GDAL switched default from BAND to PIXEL interleave on 08/01/07 (r11823) -->
 This issue only arises when writing out multi-band imagery groups.
-<p>
+
 <h3>Improving GeoTIFF compatibility</h3>
 
 To create a GeoTIFF that is highly compatible with various other GIS
@@ -156,10 +166,6 @@ a method to reset the color table and assign a new color table
 <li>Keep metadata simple with <tt>createopt="PROFILE=GeoTIFF"</tt> or 
 <tt>createopt="PROFILE=BASELINE"</tt>. With BASELINE no GDAL or GeoTIFF
 tags will be written and a World file is required (<em>createopt="TFW=YES"</em>).
-
-<li>Adding overviews with <tt>gdaladdo</tt> after exporting can speed up display.
-Note that other software might create their own overviews, ignoring existing
-overviews.
 </ul>
 
 <p>
@@ -192,6 +198,14 @@ g.region raster=elevation -p
 r.out.gdal in=elevation output=elevation.tif createopt="COMPRESS=DEFLATE"
 </pre></div>
 
+<h3>Export a raster map with internal overview in "Deflate" compressed GeoTIFF format</h3>
+
+<div class="code"><pre>
+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
+</pre></div>
+
 
 <h3>Export R,G,B imagery bands in GeoTIFF format suitable for ESRI software</h3>
 
@@ -319,4 +333,4 @@ GDAL Pages: <a href="http://www.gdal.org">http://www.gdal.org</a>
 Vytautas Vebra (oliver4grass at gmail.com)<br>
 Markus Metz (improved nodata logic)
 
-<p><i>Last changed: $Date: 2017-10-12 20:47:34 +0200 (Thu, 12 Oct 2017) $</i>
+<p><i>Last changed: $Date: 2019-01-15 10:57:42 +0100 (Tue, 15 Jan 2019) $</i>


=====================================
raster/r.reclass/testsuite/test_r_reclass.py
=====================================
@@ -37,7 +37,7 @@ class Testrr(TestCase):
     @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 @@ class Testrr(TestCase):
 
     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__':


=====================================
scripts/g.search.modules/testsuite/test_g_search_modules.py
=====================================
@@ -5,7 +5,7 @@ AUTHOR(S): Jachym Cepicky <jachym.cepicky gmail com>
 
 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.case import TestCase
 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 @@ class TestSearchModule(TestCase):
         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)


=====================================
scripts/r.drain/r.drain.html
=====================================
@@ -33,7 +33,7 @@ incompatible.
 
 <p>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 <em><a href="r.walk.html">r.walk</a></em> or
@@ -313,4 +313,4 @@ Matteo Franchi (Liceo Leonardo Da Vinci, Trento) and
 Roberto Flor (ITC-irst, Trento, Italy)
 
 <p>
-<i>Last changed: $Date: 2017-11-23 04:15:34 +0100 (Thu, 23 Nov 2017) $</i>
+<i>Last changed: $Date: 2018-12-26 17:29:08 +0100 (Wed, 26 Dec 2018) $</i>


=====================================
temporal/t.rast3d.univar/testsuite/test_univar.py
=====================================
@@ -48,11 +48,11 @@ class TestRasterUnivar(TestCase):
                                                           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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 @@ a_4 at testing|2001-10-01 00:00:00|2002-01-01 00:00:00|400|400|400|400|0|0|0|192000
                                                           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 at 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 at 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 at 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 at 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 at 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 at 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 @@ a_4 at testing|2001-10-01 00:00:00|2002-01-01 00:00:00|400|400|400|400|0|0|0|192000
                                              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 at 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 at 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 at 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 at 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 at 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 at 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 @@ a_4 at testing|2001-10-01 00:00:00|2002-01-01 00:00:00|400|400|400|400|0|0|0|192000
                                              where="start_time >= '2001-03-01'",
                                              overwrite=True, verbose=True)
 
-        univar_text="""a_2 at 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 at 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 at 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 at 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 at 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 at 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()
 


=====================================
testsuite/README
=====================================
@@ -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/
 


=====================================
testsuite/test_framework_GRASS_GIS_with_NC.sh
=====================================
@@ -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
+


=====================================
vector/v.overlay/area_area.c
=====================================
@@ -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 @@ int area_area(struct Map_info *In, int *field, struct Map_info *Tmp,
     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 @@ int area_area(struct Map_info *In, int *field, struct Map_info *Tmp,
     /* 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 @@ int area_area(struct Map_info *In, int *field, struct Map_info *Tmp,
 	}
     }
 
+    /* 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;
+	    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);
-		    /* Add all cats with original field number */
-		    for (i = 0; i < Cats->n_cats; i++) {
-			if (Cats->field[i] == field[input]) {
-			    ATTR *at;
+		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);
 
-			    Vect_cat_set(Centr[area].cat[input], field[input],
-					 Cats->cat[i]);
+		    Vect_get_isle_points(&(In[input]), isle_id, IPoints[isle]);
+		}
 
-			    /* Mark as used */
-			    at = find_attr(&(attr[input]), Cats->cat[i]);
-			    if (!at)
-				G_fatal_error(_("Attribute not found"));
+		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]);
 
-			    at->used = 1;
+				/* 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 @@ int area_area(struct Map_info *In, int *field, struct Map_info *Tmp,
     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++) {


=====================================
vector/v.select/testsuite/test_v_select.py
=====================================
@@ -30,8 +30,8 @@ class TestRasterReport(TestCase):
     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"""


=====================================
vector/v.type/v.type.html
=====================================
@@ -9,11 +9,17 @@
 v.type input=map_l output=map_b from_type=line to_type=boundary
 </pre></div>
 
+In order to create areas, centroids must be added with <b>v.centroids</b>.
+
 <h2>SEE ALSO</h2>
-<em><a href="v.to.points.html">v.to.points</a></em>
+
+<em>
+<a href="v.centroids.html">v.centroids</a>,
+<a href="v.to.points.html">v.to.points</a>
+</em>
 
 <h2>AUTHOR</h2>
 
 Radim Blazek, ITC-Irst, Trento, Italy
 
-<p><i>Last changed: $Date: 2012-05-17 22:28:13 +0200 (Thu, 17 May 2012) $</i>
+<p><i>Last changed: $Date: 2019-01-14 12:13:25 +0100 (Mon, 14 Jan 2019) $</i>


=====================================
vector/v.vol.rst/main.c
=====================================
@@ -639,7 +639,7 @@ int main(int argc, char *argv[])
 		}
 	    }
 	} 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)



View it on GitLab: https://salsa.debian.org/debian-gis-team/grass/commit/8c4209d4c0c2302d7380236ac42c1d4c18517d02

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/grass/commit/8c4209d4c0c2302d7380236ac42c1d4c18517d02
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20190117/cec5265f/attachment-0001.html>


More information about the Pkg-grass-devel mailing list