[GRASS-SVN] r66458 - grass/trunk/lib/python/temporal
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Oct 9 15:09:49 PDT 2015
Author: huhabla
Date: 2015-10-09 15:09:49 -0700 (Fri, 09 Oct 2015)
New Revision: 66458
Modified:
grass/trunk/lib/python/temporal/space_time_datasets.py
Log:
temporal framework: Added relative time stamp doc-tests
Modified: grass/trunk/lib/python/temporal/space_time_datasets.py
===================================================================
--- grass/trunk/lib/python/temporal/space_time_datasets.py 2015-10-09 21:47:54 UTC (rev 66457)
+++ grass/trunk/lib/python/temporal/space_time_datasets.py 2015-10-09 22:09:49 UTC (rev 66458)
@@ -73,6 +73,16 @@
| Minimum value:.............. 1.0
| Maximum value:.............. 1.0
+ >>> grass.run_command("r.timestamp", map="strds_map_test_case",
+ ... date="2 years", quiet=True)
+ 0
+ >>> rmap.read_timestamp_from_grass()
+ True
+ >>> rmap.get_temporal_extent_as_tuple()
+ (2, None)
+ >>> rmap.get_relative_time_unit()
+ 'years'
+
>>> newmap = rmap.get_new_instance("new at PERMANENT")
>>> isinstance(newmap, RasterDataset)
True
@@ -392,6 +402,16 @@
| Number of depths:........... 10
| Top-Bottom resolution:...... 10.0
+ >>> grass.run_command("r3.timestamp", map="str3ds_map_test_case",
+ ... date="2 years", quiet=True)
+ 0
+ >>> r3map.read_timestamp_from_grass()
+ True
+ >>> r3map.get_temporal_extent_as_tuple()
+ (2, None)
+ >>> r3map.get_relative_time_unit()
+ 'years'
+
>>> newmap = r3map.get_new_instance("new at PERMANENT")
>>> isinstance(newmap, Raster3DDataset)
True
@@ -722,6 +742,17 @@
| Number of islands .......... 0
| Number of holes ............ 0
| Number of volumes .......... 0
+
+ >>> grass.run_command("v.timestamp", map="stvds_map_test_case",
+ ... date="2 years", quiet=True)
+ 0
+ >>> vmap.read_timestamp_from_grass()
+ True
+ >>> vmap.get_temporal_extent_as_tuple()
+ (2, None)
+ >>> vmap.get_relative_time_unit()
+ 'years'
+
>>> newmap = vmap.get_new_instance("new at PERMANENT")
>>> isinstance(newmap, VectorDataset)
True
More information about the grass-commit
mailing list