Przeglądaj źródła

t.remove: msgs added to tell user what it does; enhance manual

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@66348 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Neteler 9 lat temu
rodzic
commit
8efd3db667
2 zmienionych plików z 15 dodań i 11 usunięć
  1. 11 9
      temporal/t.remove/t.remove.html
  2. 4 2
      temporal/t.remove/t.remove.py

+ 11 - 9
temporal/t.remove/t.remove.html

@@ -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 @@ t.rast.aggregate input=precip_months_sum \
   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

+ 4 - 2
temporal/t.remove/t.remove.py

@@ -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 @@ def main():
         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 @@ def main():
                     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)