[GRASS-SVN] r66348 - grass/branches/releasebranch_7_0/temporal/t.remove

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Sep 27 04:11:04 PDT 2015


Author: neteler
Date: 2015-09-27 04:11:04 -0700 (Sun, 27 Sep 2015)
New Revision: 66348

Modified:
   grass/branches/releasebranch_7_0/temporal/t.remove/t.remove.html
   grass/branches/releasebranch_7_0/temporal/t.remove/t.remove.py
Log:
t.remove: msgs added to tell user what it does; enhance manual

Modified: grass/branches/releasebranch_7_0/temporal/t.remove/t.remove.html
===================================================================
--- grass/branches/releasebranch_7_0/temporal/t.remove/t.remove.html	2015-09-27 11:10:53 UTC (rev 66347)
+++ grass/branches/releasebranch_7_0/temporal/t.remove/t.remove.html	2015-09-27 11:11:04 UTC (rev 66348)
@@ -1,22 +1,24 @@
 <h2>DESCRIPTION</h2>
 
 The module <em>t.remove</em> removes space time datasets (STRDS, STR3DS,
-STVDS) from the temporal database. In other words, it deletes the relevant
-database entries and not the maps.
+STVDS) from the temporal database. In other words, by default it deletes
+the relevant database entries but not the maps.
 <p>
 Optionally, also the raster, 3D raster and vector maps of the space time
-datasets can be removed using the <b>-r</b> (recursive) and <b>-f</b>
-(force) flags. Recursive removal works only if both flags are checked
-(use <b>-rf</b>).
+datasets can be removed from the current mapset using the <b>-r</b> (recursive)
+and <b>-f</b> (force) flags. This recursive removal only works if both flags
+are checked together (use <b>-rf</b>).
 
 <h2>EXAMPLE</h2>
 
 In this example a space time raster dataset (STRDS) named
 <b>precip_months_sum</b> will be created using a subset of the monthly
 precipitation raster maps from the North Carolina climate sample data set.
-In order to be able to show case recursive removal without deleting original
-sample data, new data is generated by means of computing yearly precipitation
-sums. Finally, all newly produced data (STRDS and raster maps) is removed again.
+<br>
+In order to be able to show the case of recursive removal without deleting
+the original sample data, we generate new data by means of computing
+yearly precipitation sums. Eventually, all newly produced data (STRDS and
+raster maps) are removed:
 
 <div class="code"><pre>
 #Create new and empty STRDS
@@ -36,7 +38,7 @@
   years" method=sum
 
 #Remove all newly produced data:
-# a) the aggregated STRDS with 1 years granularity together with its raster maps
+# a) the aggregated STRDS with 1 years granularity along with its raster maps
 t.remove -rf type=strds input=precip_years_sum
 
 # b) the STRDS with 1 months granularity, but not the original sample data

Modified: grass/branches/releasebranch_7_0/temporal/t.remove/t.remove.py
===================================================================
--- grass/branches/releasebranch_7_0/temporal/t.remove/t.remove.py	2015-09-27 11:10:53 UTC (rev 66347)
+++ grass/branches/releasebranch_7_0/temporal/t.remove/t.remove.py	2015-09-27 11:11:04 UTC (rev 66348)
@@ -47,7 +47,7 @@
 
 #%flag
 #% key: r
-#% description: Remove all registered maps from the temporal and spatial database
+#% description: Remove all registered maps from the temporal and also from the spatial database
 #%end
 
 #%flag
@@ -115,7 +115,7 @@
         sp = tgis.open_old_stds(name, type, dbif)
 
         if recursive and force:
-            grass.message(_("Removing registered maps"))
+            grass.message(_("Removing registered maps and %s" % type))
             maps = sp.get_registered_maps_as_objects(dbif=dbif)
             map_statement = ""
             count = 1
@@ -151,6 +151,8 @@
                     remove(type="vector", name=name_list, run_=True)
                 if type == "str3ds":
                     remove(type="raster_3d", name=name_list, run_=True)
+        else:
+            grass.message(_("Note: registered maps themselves have not been removed, only the %s" % type))
 
         statement += sp.delete(dbif=dbif, execute=False)
 



More information about the grass-commit mailing list