[GRASS-SVN] r60547 - in grass/trunk: lib/python/temporal temporal/t.create temporal/t.merge temporal/t.rast.aggregate temporal/t.rast.aggregate.ds temporal/t.rast.colors temporal/t.rast.gapfill temporal/t.rast.neighbors temporal/t.rast.out.vtk temporal/t.rast.series temporal/t.rast.to.rast3 temporal/t.remove temporal/t.shift temporal/t.snap temporal/t.support temporal/t.topology temporal/t.unregister temporal/t.vect.db.select temporal/t.vect.observe.strds temporal/t.vect.what.strds
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed May 28 08:35:30 PDT 2014
Author: huhabla
Date: 2014-05-28 08:35:30 -0700 (Wed, 28 May 2014)
New Revision: 60547
Modified:
grass/trunk/lib/python/temporal/extract.py
grass/trunk/lib/python/temporal/list_stds.py
grass/trunk/lib/python/temporal/mapcalc.py
grass/trunk/lib/python/temporal/open_stds.py
grass/trunk/lib/python/temporal/register.py
grass/trunk/lib/python/temporal/stds_export.py
grass/trunk/lib/python/temporal/temporal_algebra.py
grass/trunk/lib/python/temporal/temporal_raster_base_algebra.py
grass/trunk/lib/python/temporal/temporal_vector_algebra.py
grass/trunk/lib/python/temporal/unittests_register.py
grass/trunk/lib/python/temporal/unittests_temporal_raster3d_algebra.py
grass/trunk/lib/python/temporal/unittests_temporal_raster_algebra.py
grass/trunk/lib/python/temporal/univar_statistics.py
grass/trunk/temporal/t.create/t.create.py
grass/trunk/temporal/t.merge/t.merge.py
grass/trunk/temporal/t.rast.aggregate.ds/t.rast.aggregate.ds.py
grass/trunk/temporal/t.rast.aggregate/t.rast.aggregate.py
grass/trunk/temporal/t.rast.colors/t.rast.colors.py
grass/trunk/temporal/t.rast.gapfill/t.rast.gapfill.py
grass/trunk/temporal/t.rast.neighbors/t.rast.neighbors.py
grass/trunk/temporal/t.rast.out.vtk/t.rast.out.vtk.py
grass/trunk/temporal/t.rast.series/t.rast.series.py
grass/trunk/temporal/t.rast.to.rast3/t.rast.to.rast3.py
grass/trunk/temporal/t.remove/t.remove.py
grass/trunk/temporal/t.shift/t.shift.py
grass/trunk/temporal/t.snap/t.snap.py
grass/trunk/temporal/t.support/t.support.py
grass/trunk/temporal/t.topology/t.topology.py
grass/trunk/temporal/t.unregister/t.unregister.py
grass/trunk/temporal/t.vect.db.select/t.vect.db.select.py
grass/trunk/temporal/t.vect.observe.strds/t.vect.observe.strds.py
grass/trunk/temporal/t.vect.what.strds/t.vect.what.strds.py
Log:
Renamed space_time_dataset into stds in several functions
Modified: grass/trunk/lib/python/temporal/extract.py
===================================================================
--- grass/trunk/lib/python/temporal/extract.py 2014-05-28 15:08:20 UTC (rev 60546)
+++ grass/trunk/lib/python/temporal/extract.py 2014-05-28 15:35:30 UTC (rev 60547)
@@ -58,9 +58,9 @@
dbif = SQLDatabaseInterfaceConnection()
dbif.connect()
- sp = open_old_space_time_dataset(input, type, dbif)
+ sp = open_old_stds(input, type, dbif)
# Check the new stds
- new_sp = check_new_space_time_dataset(output, type, dbif,
+ new_sp = check_new_stds(output, type, dbif,
core.overwrite())
if type == "vector":
rows = sp.get_registered_maps(
@@ -165,7 +165,7 @@
msgr.percent(0, num_rows, 1)
temporal_type, semantic_type, title, description = sp.get_initial_values()
- new_sp = open_new_space_time_dataset(output, type,
+ new_sp = open_new_stds(output, type,
sp.get_temporal_type(),
title, description,
semantic_type, dbif,
Modified: grass/trunk/lib/python/temporal/list_stds.py
===================================================================
--- grass/trunk/lib/python/temporal/list_stds.py 2014-05-28 15:08:20 UTC (rev 60546)
+++ grass/trunk/lib/python/temporal/list_stds.py 2014-05-28 15:35:30 UTC (rev 60547)
@@ -47,7 +47,7 @@
>>> import grass.temporal as tgis
>>> tgis.init()
>>> name = "list_stds_test"
- >>> sp = tgis.open_new_space_time_dataset(name=name, type="strds",
+ >>> sp = tgis.open_new_stds(name=name, type="strds",
... temporaltype="absolute", title="title", descr="descr", semantic="mean", dbif=None, overwrite=True)
>>> mapset = tgis.get_current_mapset()
>>> stds_list = tgis.get_dataset_list("strds", "absolute", columns="name")
@@ -135,7 +135,7 @@
dbif, connected = init_dbif(None)
msgr = get_tgis_message_interface()
- sp = open_old_space_time_dataset(input, type, dbif)
+ sp = open_old_stds(input, type, dbif)
if separator is None or separator == "":
separator = "\t"
Modified: grass/trunk/lib/python/temporal/mapcalc.py
===================================================================
--- grass/trunk/lib/python/temporal/mapcalc.py 2014-05-28 15:08:20 UTC (rev 60546)
+++ grass/trunk/lib/python/temporal/mapcalc.py 2014-05-28 15:35:30 UTC (rev 60547)
@@ -84,7 +84,7 @@
input_name_list = inputs.split(",")
- first_input = open_old_space_time_dataset(input_name_list[0], type, dbif)
+ first_input = open_old_stds(input_name_list[0], type, dbif)
# All additional inputs in reverse sorted order to avoid
# wrong name substitution
@@ -94,10 +94,10 @@
input_list = []
for input in input_name_list:
- sp = open_old_space_time_dataset(input, type, dbif)
+ sp = open_old_stds(input, type, dbif)
input_list.append(copy.copy(sp))
- new_sp = check_new_space_time_dataset(output, type, dbif,
+ new_sp = check_new_stds(output, type, dbif,
core.overwrite())
# Sample all inputs by the first input and create a sample matrix
@@ -281,7 +281,7 @@
temporal_type, semantic_type, title, description = first_input.get_initial_values()
- new_sp = open_new_space_time_dataset(output, type,
+ new_sp = open_new_stds(output, type,
temporal_type, title, description,
semantic_type, dbif,
core.overwrite())
Modified: grass/trunk/lib/python/temporal/open_stds.py
===================================================================
--- grass/trunk/lib/python/temporal/open_stds.py 2014-05-28 15:08:20 UTC (rev 60546)
+++ grass/trunk/lib/python/temporal/open_stds.py 2014-05-28 15:35:30 UTC (rev 60547)
@@ -26,7 +26,7 @@
###############################################################################
-def open_old_space_time_dataset(name, type, dbif=None):
+def open_old_stds(name, type, dbif=None):
"""!This function opens an existing space time dataset and return the
created and intialized object of the specified type.
@@ -76,7 +76,7 @@
###############################################################################
-def check_new_space_time_dataset(name, type, dbif=None, overwrite=False):
+def check_new_stds(name, type, dbif=None, overwrite=False):
"""!Check if a new space time dataset of a specific type can be created
@param name The name of the new space time dataset
@@ -129,7 +129,7 @@
###############################################################################
-def open_new_space_time_dataset(name, type, temporaltype, title, descr, semantic,
+def open_new_stds(name, type, temporaltype, title, descr, semantic,
dbif=None, overwrite=False):
"""!Create a new space time dataset of a specific type
@@ -149,7 +149,7 @@
"""
dbif, connected = init_dbif(dbif)
msgr = get_tgis_message_interface()
- sp = check_new_space_time_dataset(name, type, dbif, overwrite)
+ sp = check_new_stds(name, type, dbif, overwrite)
if sp.is_in_db(dbif):
msgr.warning(_("Overwrite space time %(sp)s dataset <%(name)s> and "
Modified: grass/trunk/lib/python/temporal/register.py
===================================================================
--- grass/trunk/lib/python/temporal/register.py 2014-05-28 15:08:20 UTC (rev 60546)
+++ grass/trunk/lib/python/temporal/register.py 2014-05-28 15:35:30 UTC (rev 60547)
@@ -94,7 +94,7 @@
# The name of the space time dataset is optional
if name:
- sp = open_old_space_time_dataset(name, type, dbif)
+ sp = open_old_stds(name, type, dbif)
if sp.is_time_relative() and (start or end) and not unit:
dbif.close()
Modified: grass/trunk/lib/python/temporal/stds_export.py
===================================================================
--- grass/trunk/lib/python/temporal/stds_export.py 2014-05-28 15:08:20 UTC (rev 60546)
+++ grass/trunk/lib/python/temporal/stds_export.py 2014-05-28 15:35:30 UTC (rev 60547)
@@ -261,7 +261,7 @@
else:
columns = "name,start_time,end_time"
- sp = open_old_space_time_dataset(input, type_)
+ sp = open_old_stds(input, type_)
rows = sp.get_registered_maps(columns, where, "start_time", None)
if compression == "gzip":
Modified: grass/trunk/lib/python/temporal/temporal_algebra.py
===================================================================
--- grass/trunk/lib/python/temporal/temporal_algebra.py 2014-05-28 15:08:20 UTC (rev 60546)
+++ grass/trunk/lib/python/temporal/temporal_algebra.py 2014-05-28 15:35:30 UTC (rev 60547)
@@ -1771,7 +1771,7 @@
"""
if self.run:
- resultstds = open_new_space_time_dataset(t[1], self.stdstype, \
+ resultstds = open_new_stds(t[1], self.stdstype, \
self.temporaltype, "", "", \
'mean', dbif=self.dbif, \
overwrite = self.overwrite)
Modified: grass/trunk/lib/python/temporal/temporal_raster_base_algebra.py
===================================================================
--- grass/trunk/lib/python/temporal/temporal_raster_base_algebra.py 2014-05-28 15:08:20 UTC (rev 60546)
+++ grass/trunk/lib/python/temporal/temporal_raster_base_algebra.py 2014-05-28 15:35:30 UTC (rev 60547)
@@ -320,7 +320,7 @@
# Open connection to temporal database.
dbif, connect = init_dbif(self.dbif)
# Create result space time dataset.
- resultstds = open_new_space_time_dataset(t[1], self.stdstype, \
+ resultstds = open_new_stds(t[1], self.stdstype, \
'absolute', t[1], t[1], \
'mean', self.dbif, \
overwrite = self.overwrite)
Modified: grass/trunk/lib/python/temporal/temporal_vector_algebra.py
===================================================================
--- grass/trunk/lib/python/temporal/temporal_vector_algebra.py 2014-05-28 15:08:20 UTC (rev 60546)
+++ grass/trunk/lib/python/temporal/temporal_vector_algebra.py 2014-05-28 15:35:30 UTC (rev 60547)
@@ -704,7 +704,7 @@
# Open connection to temporal database.
dbif, connected = init_dbif(dbif=self.dbif)
# Create result space time dataset.
- resultstds = open_new_space_time_dataset(t[1], self.stdstype, \
+ resultstds = open_new_stds(t[1], self.stdstype, \
'absolute', t[1], t[1], \
"temporal vector algebra", dbif=dbif,
overwrite = self.overwrite)
Modified: grass/trunk/lib/python/temporal/unittests_register.py
===================================================================
--- grass/trunk/lib/python/temporal/unittests_register.py 2014-05-28 15:08:20 UTC (rev 60546)
+++ grass/trunk/lib/python/temporal/unittests_register.py 2014-05-28 15:35:30 UTC (rev 60547)
@@ -37,9 +37,9 @@
self.assertEqual(ret, 0)
- self.strds_abs = tgis.open_new_space_time_dataset(name="register_test_abs", type="strds", temporaltype="absolute",
+ self.strds_abs = tgis.open_new_stds(name="register_test_abs", type="strds", temporaltype="absolute",
title="Test strds", descr="Test strds", semantic="field")
- self.strds_rel = tgis.open_new_space_time_dataset(name="register_test_rel", type="strds", temporaltype="relative",
+ self.strds_rel = tgis.open_new_stds(name="register_test_rel", type="strds", temporaltype="relative",
title="Test strds", descr="Test strds", semantic="field")
def test_absolute_time_strds_1(self):
Modified: grass/trunk/lib/python/temporal/unittests_temporal_raster3d_algebra.py
===================================================================
--- grass/trunk/lib/python/temporal/unittests_temporal_raster3d_algebra.py 2014-05-28 15:08:20 UTC (rev 60546)
+++ grass/trunk/lib/python/temporal/unittests_temporal_raster3d_algebra.py 2014-05-28 15:35:30 UTC (rev 60547)
@@ -32,7 +32,7 @@
ret += grass.script.run_command("r3.mapcalc", overwrite=True, quiet=True, expression="a4 = 4")
- tgis.open_new_space_time_dataset(name="A", type="str3ds", temporaltype="absolute",
+ tgis.open_new_stds(name="A", type="str3ds", temporaltype="absolute",
title="A", descr="A", semantic="field", overwrite=True)
tgis.register_maps_in_space_time_dataset(type="rast3d", name="A", maps="a1,a2,a3,a4",
@@ -44,7 +44,7 @@
tra.parse(expression='D = A[-1] + A[1]',
basename="d", overwrite=True)
- D = tgis.open_old_space_time_dataset("D", type="str3ds")
+ D = tgis.open_old_stds("D", type="str3ds")
D.select()
self.assertEqual(D.metadata.get_number_of_maps(), 2)
self.assertEqual(D.metadata.get_min_min(), 4) # 1 + 3
@@ -59,7 +59,7 @@
tra.parse(expression='D = A[0,0,0,-1] + A[0,0,0,1]',
basename="d", overwrite=True)
- D = tgis.open_old_space_time_dataset("D", type="str3ds")
+ D = tgis.open_old_stds("D", type="str3ds")
D.select()
self.assertEqual(D.metadata.get_number_of_maps(), 2)
self.assertEqual(D.metadata.get_min_min(), 4) # 1 + 3
Modified: grass/trunk/lib/python/temporal/unittests_temporal_raster_algebra.py
===================================================================
--- grass/trunk/lib/python/temporal/unittests_temporal_raster_algebra.py 2014-05-28 15:08:20 UTC (rev 60546)
+++ grass/trunk/lib/python/temporal/unittests_temporal_raster_algebra.py 2014-05-28 15:35:30 UTC (rev 60547)
@@ -35,11 +35,11 @@
ret += grass.script.run_command("r.mapcalc", overwrite=True, quiet=True, expression="c1 = 7")
- tgis.open_new_space_time_dataset(name="A", type="strds", temporaltype="absolute",
+ tgis.open_new_stds(name="A", type="strds", temporaltype="absolute",
title="A", descr="A", semantic="field", overwrite=True)
- tgis.open_new_space_time_dataset(name="B", type="strds", temporaltype="absolute",
+ tgis.open_new_stds(name="B", type="strds", temporaltype="absolute",
title="B", descr="B", semantic="field", overwrite=True)
- tgis.open_new_space_time_dataset(name="C", type="strds", temporaltype="absolute",
+ tgis.open_new_stds(name="C", type="strds", temporaltype="absolute",
title="B", descr="C", semantic="field", overwrite=True)
tgis.register_maps_in_space_time_dataset(type="rast", name="A", maps="a1,a2,a3,a4",
@@ -58,7 +58,7 @@
tra = tgis.TemporalRasterAlgebraParser(run = True, debug = True)
tra.parse(expression="D = if({contains}, B == 5, A - 1, A + 1)", basename="d", overwrite=True)
- D = tgis.open_old_space_time_dataset("D", type="strds")
+ D = tgis.open_old_stds("D", type="strds")
D.select()
self.assertEqual(D.metadata.get_number_of_maps(), 4)
self.assertEqual(D.metadata.get_min_min(), 0) # 1 - 1
@@ -74,7 +74,7 @@
tra = tgis.TemporalRasterAlgebraParser(run = True, debug = True)
tra.parse(expression='D = A + A{equal,=#}A', basename="d", overwrite=True)
- D = tgis.open_old_space_time_dataset("D", type="strds")
+ D = tgis.open_old_stds("D", type="strds")
D.select()
self.assertEqual(D.metadata.get_number_of_maps(), 4)
self.assertEqual(D.metadata.get_min_min(), 2)
@@ -89,7 +89,7 @@
tra = tgis.TemporalRasterAlgebraParser(run = True, debug = True)
tra.parse(expression='D = A + td(A)', basename="d", overwrite=True)
- D = tgis.open_old_space_time_dataset("D", type="strds")
+ D = tgis.open_old_stds("D", type="strds")
D.select()
self.assertEqual(D.metadata.get_number_of_maps(), 4)
self.assertEqual(D.metadata.get_min_min(), 2)
@@ -103,7 +103,7 @@
tra = tgis.TemporalRasterAlgebraParser(run = True, debug = True)
tra.parse(expression='D = A / td(A)', basename="d", overwrite=True)
- D = tgis.open_old_space_time_dataset("D", type="strds")
+ D = tgis.open_old_stds("D", type="strds")
D.select()
self.assertEqual(D.metadata.get_number_of_maps(), 4)
self.assertEqual(D.metadata.get_min_min(), 1)
@@ -117,7 +117,7 @@
tra = tgis.TemporalRasterAlgebraParser(run = True, debug = True)
tra.parse(expression='D = A {equal,+} td(A)', basename="d", overwrite=True)
- D = tgis.open_old_space_time_dataset("D", type="strds")
+ D = tgis.open_old_stds("D", type="strds")
D.select()
self.assertEqual(D.metadata.get_number_of_maps(), 4)
self.assertEqual(D.metadata.get_min_min(), 2)
@@ -132,7 +132,7 @@
tra = tgis.TemporalRasterAlgebraParser(run = True, debug = True)
tra.parse(expression='D = A {equal,/} td(A)', basename="d", overwrite=True)
- D = tgis.open_old_space_time_dataset("D", type="strds")
+ D = tgis.open_old_stds("D", type="strds")
D.select()
self.assertEqual(D.metadata.get_number_of_maps(), 4)
self.assertEqual(D.metadata.get_min_min(), 1)
@@ -147,7 +147,7 @@
tra = tgis.TemporalRasterAlgebraParser(run = True, debug = True)
tra.parse(expression='D = if({equal}, start_date() >= "2001-01-02", A + A)', basename="d", overwrite=True)
- D = tgis.open_old_space_time_dataset("D", type="strds")
+ D = tgis.open_old_stds("D", type="strds")
D.select()
self.assertEqual(D.metadata.get_number_of_maps(), 3)
self.assertEqual(D.metadata.get_min_min(), 4)
@@ -161,7 +161,7 @@
tra = tgis.TemporalRasterAlgebraParser(run = True, debug = True)
tra.parse(expression='D = if({equal}, A#A == 1, A - A)', basename="d", overwrite=True)
- D = tgis.open_old_space_time_dataset("D", type="strds")
+ D = tgis.open_old_stds("D", type="strds")
D.select()
self.assertEqual(D.metadata.get_number_of_maps(), 4)
self.assertEqual(D.metadata.get_min_min(), 0)
@@ -176,7 +176,7 @@
tra.parse(expression='D = if(start_date() < "2001-01-03" && A#A == 1, A{starts,=+}C, A{finishes,=+}C)', \
basename="d", overwrite=True)
- D = tgis.open_old_space_time_dataset("D", type="strds")
+ D = tgis.open_old_stds("D", type="strds")
D.select()
self.assertEqual(D.metadata.get_number_of_maps(), 2)
self.assertEqual(D.metadata.get_min_min(), 9) # 2 + 7 a2 + c1
@@ -190,7 +190,7 @@
tra = tgis.TemporalRasterAlgebraParser(run = True, debug = True)
tra.parse(expression="D = A {equal,*} A {equal,+} A", basename="d", overwrite=True)
- D = tgis.open_old_space_time_dataset("D", type="strds")
+ D = tgis.open_old_stds("D", type="strds")
D.select()
self.assertEqual(D.metadata.get_number_of_maps(), 4)
self.assertEqual(D.metadata.get_min_min(), 2) # 1*1 + 1
@@ -203,7 +203,7 @@
"""Simple arithmetic test that creates an empty strds"""
tra = tgis.TemporalRasterAlgebraParser(run = True, debug = True)
tra.parse(expression="D = A {during,*} A {during,+} A", basename="d", overwrite=True)
- D = tgis.open_old_space_time_dataset("D", type="strds")
+ D = tgis.open_old_stds("D", type="strds")
D.select()
self.assertEqual(D.metadata.get_number_of_maps(), 0)
@@ -212,7 +212,7 @@
tra = tgis.TemporalRasterAlgebraParser(run = True, debug = True)
tra.parse(expression="D = A / A + A*A/A", basename="d", overwrite=True)
- D = tgis.open_old_space_time_dataset("D", type="strds")
+ D = tgis.open_old_stds("D", type="strds")
D.select()
self.assertEqual(D.metadata.get_number_of_maps(), 4)
self.assertEqual(D.metadata.get_min_min(), 2) # 1/1 + 1*1/1
@@ -225,7 +225,7 @@
"""Simple temporal intersection test"""
tra = tgis.TemporalRasterAlgebraParser(run = True, debug = True)
tra.parse(expression="D = A {equal,&+} B", basename="d", overwrite=True)
- D = tgis.open_old_space_time_dataset("D", type="strds")
+ D = tgis.open_old_stds("D", type="strds")
D.select()
self.assertEqual(D.metadata.get_number_of_maps(), 0)
@@ -234,7 +234,7 @@
tra = tgis.TemporalRasterAlgebraParser(run = True, debug = True)
tra.parse(expression="D = A {during,&+} B", basename="d", overwrite=True)
- D = tgis.open_old_space_time_dataset("D", type="strds")
+ D = tgis.open_old_stds("D", type="strds")
D.select()
self.assertEqual(D.metadata.get_number_of_maps(), 4)
self.assertEqual(D.metadata.get_min_min(), 6) # 1 + 5
@@ -248,7 +248,7 @@
tra = tgis.TemporalRasterAlgebraParser(run = True, debug = True)
tra.parse(expression="D = A {starts,&+} B", basename="d", overwrite=True)
- D = tgis.open_old_space_time_dataset("D", type="strds")
+ D = tgis.open_old_stds("D", type="strds")
D.select()
self.assertEqual(D.metadata.get_number_of_maps(), 2)
self.assertEqual(D.metadata.get_min_min(), 6) # 1 + 5
@@ -262,7 +262,7 @@
tra = tgis.TemporalRasterAlgebraParser(run = True, debug = True)
tra.parse(expression="D = A {finishes,&+} B", basename="d", overwrite=True)
- D = tgis.open_old_space_time_dataset("D", type="strds")
+ D = tgis.open_old_stds("D", type="strds")
D.select()
self.assertEqual(D.metadata.get_number_of_maps(), 2)
self.assertEqual(D.metadata.get_min_min(), 7) # 2 + 5
@@ -276,7 +276,7 @@
tra = tgis.TemporalRasterAlgebraParser(run = True, debug = True)
tra.parse(expression="D = A {starts|finishes,&+} B", basename="d", overwrite=True)
- D = tgis.open_old_space_time_dataset("D", type="strds")
+ D = tgis.open_old_stds("D", type="strds")
D.select()
self.assertEqual(D.metadata.get_number_of_maps(), 4)
self.assertEqual(D.metadata.get_min_min(), 6) # 1 + 5
@@ -290,7 +290,7 @@
tra = tgis.TemporalRasterAlgebraParser(run = True, debug = True)
tra.parse(expression="D = B {overlaps,|+} C", basename="d", overwrite=True)
- D = tgis.open_old_space_time_dataset("D", type="strds")
+ D = tgis.open_old_stds("D", type="strds")
D.select()
self.assertEqual(D.metadata.get_number_of_maps(), 1)
self.assertEqual(D.metadata.get_min_min(), 12) # 5 + 7
@@ -304,7 +304,7 @@
tra = tgis.TemporalRasterAlgebraParser(run = True, debug = True)
tra.parse(expression="D = B {overlapped,|+} C", basename="d", overwrite=True)
- D = tgis.open_old_space_time_dataset("D", type="strds")
+ D = tgis.open_old_stds("D", type="strds")
D.select()
self.assertEqual(D.metadata.get_number_of_maps(), 1)
self.assertEqual(D.metadata.get_min_min(), 13) # 6 + 7
@@ -319,7 +319,7 @@
tra.parse(expression='D = A {during,=+} buff_t(C, "1 day") ',
basename="d", overwrite=True)
- D = tgis.open_old_space_time_dataset("D", type="strds")
+ D = tgis.open_old_stds("D", type="strds")
D.select()
self.assertEqual(D.metadata.get_number_of_maps(), 4)
self.assertEqual(D.metadata.get_min_min(), 8) # 1 + 7 a1 + c1
@@ -334,7 +334,7 @@
tra.parse(expression='D = A[-1] + A[1]',
basename="d", overwrite=True)
- D = tgis.open_old_space_time_dataset("D", type="strds")
+ D = tgis.open_old_stds("D", type="strds")
D.select()
self.assertEqual(D.metadata.get_number_of_maps(), 2)
self.assertEqual(D.metadata.get_min_min(), 4) # 1 + 3
@@ -349,7 +349,7 @@
tra.parse(expression='D = A[0,0,-1] + A[0,0,1]',
basename="d", overwrite=True)
- D = tgis.open_old_space_time_dataset("D", type="strds")
+ D = tgis.open_old_stds("D", type="strds")
D.select()
self.assertEqual(D.metadata.get_number_of_maps(), 2)
self.assertEqual(D.metadata.get_min_min(), 4) # 1 + 3
Modified: grass/trunk/lib/python/temporal/univar_statistics.py
===================================================================
--- grass/trunk/lib/python/temporal/univar_statistics.py 2014-05-28 15:08:20 UTC (rev 60546)
+++ grass/trunk/lib/python/temporal/univar_statistics.py 2014-05-28 15:35:30 UTC (rev 60547)
@@ -44,7 +44,7 @@
dbif = SQLDatabaseInterfaceConnection()
dbif.connect()
- sp = open_old_space_time_dataset(input, type, dbif)
+ sp = open_old_stds(input, type, dbif)
rows = sp.get_registered_maps(
"id,start_time,end_time", where, "start_time", dbif)
Modified: grass/trunk/temporal/t.create/t.create.py
===================================================================
--- grass/trunk/temporal/t.create/t.create.py 2014-05-28 15:08:20 UTC (rev 60546)
+++ grass/trunk/temporal/t.create/t.create.py 2014-05-28 15:35:30 UTC (rev 60547)
@@ -75,7 +75,7 @@
tgis.init()
- tgis.open_new_space_time_dataset(name, type, temporaltype, title, descr,
+ tgis.open_new_stds(name, type, temporaltype, title, descr,
semantic, None, grass.overwrite())
if __name__ == "__main__":
Modified: grass/trunk/temporal/t.merge/t.merge.py
===================================================================
--- grass/trunk/temporal/t.merge/t.merge.py 2014-05-28 15:08:20 UTC (rev 60546)
+++ grass/trunk/temporal/t.merge/t.merge.py 2014-05-28 15:35:30 UTC (rev 60547)
@@ -74,7 +74,7 @@
first = None
for id in input_ids:
- stds = tgis.open_old_space_time_dataset(id, type, dbif)
+ stds = tgis.open_old_stds(id, type, dbif)
if first is None:
first = stds
@@ -100,7 +100,7 @@
(stds.get_new_map_instance(None).get_type(), output_id))
if not output_exists:
- output_stds = tgis.open_new_space_time_dataset(output, type,
+ output_stds = tgis.open_new_stds(output, type,
first.get_temporal_type(),
"Merged space time dataset",
"Merged space time dataset",
Modified: grass/trunk/temporal/t.rast.aggregate/t.rast.aggregate.py
===================================================================
--- grass/trunk/temporal/t.rast.aggregate/t.rast.aggregate.py 2014-05-28 15:08:20 UTC (rev 60546)
+++ grass/trunk/temporal/t.rast.aggregate/t.rast.aggregate.py 2014-05-28 15:35:30 UTC (rev 60547)
@@ -99,9 +99,9 @@
dbif = tgis.SQLDatabaseInterfaceConnection()
dbif.connect()
- sp = tgis.open_old_space_time_dataset(input, "strds", dbif)
+ sp = tgis.open_old_stds(input, "strds", dbif)
temporal_type, semantic_type, title, description = sp.get_initial_values()
- new_sp = tgis.open_new_space_time_dataset(output, "strds", temporal_type,
+ new_sp = tgis.open_new_stds(output, "strds", temporal_type,
title, description, semantic_type,
dbif, grass.overwrite())
Modified: grass/trunk/temporal/t.rast.aggregate.ds/t.rast.aggregate.ds.py
===================================================================
--- grass/trunk/temporal/t.rast.aggregate.ds/t.rast.aggregate.ds.py 2014-05-28 15:08:20 UTC (rev 60546)
+++ grass/trunk/temporal/t.rast.aggregate.ds/t.rast.aggregate.ds.py 2014-05-28 15:35:30 UTC (rev 60547)
@@ -97,8 +97,8 @@
dbif = tgis.SQLDatabaseInterfaceConnection()
dbif.connect()
- sp = tgis.open_old_space_time_dataset(input, "strds", dbif)
- sampler_sp = tgis.open_old_space_time_dataset(sampler, type, dbif)
+ sp = tgis.open_old_stds(input, "strds", dbif)
+ sampler_sp = tgis.open_old_stds(sampler, type, dbif)
if sampler_sp.get_temporal_type() != sp.get_temporal_type():
dbif.close()
@@ -112,7 +112,7 @@
"must have time intervals"))
temporal_type, semantic_type, title, description = sp.get_initial_values()
- new_sp = tgis.open_new_space_time_dataset(output, "strds", temporal_type,
+ new_sp = tgis.open_new_stds(output, "strds", temporal_type,
title, description, semantic_type,
dbif, grass.overwrite())
Modified: grass/trunk/temporal/t.rast.colors/t.rast.colors.py
===================================================================
--- grass/trunk/temporal/t.rast.colors/t.rast.colors.py 2014-05-28 15:08:20 UTC (rev 60546)
+++ grass/trunk/temporal/t.rast.colors/t.rast.colors.py 2014-05-28 15:35:30 UTC (rev 60547)
@@ -131,7 +131,7 @@
# Make sure the temporal database exists
tgis.init()
- sp = tgis.open_old_space_time_dataset(input, "strds")
+ sp = tgis.open_old_stds(input, "strds")
rows = sp.get_registered_maps("id", None, None, None)
Modified: grass/trunk/temporal/t.rast.gapfill/t.rast.gapfill.py
===================================================================
--- grass/trunk/temporal/t.rast.gapfill/t.rast.gapfill.py 2014-05-28 15:08:20 UTC (rev 60546)
+++ grass/trunk/temporal/t.rast.gapfill/t.rast.gapfill.py 2014-05-28 15:35:30 UTC (rev 60547)
@@ -74,7 +74,7 @@
dbif = tgis.SQLDatabaseInterfaceConnection()
dbif.connect()
- sp = tgis.open_old_space_time_dataset(input, "strds")
+ sp = tgis.open_old_stds(input, "strds")
maps = sp.get_registered_maps_as_objects_with_gaps(where, dbif)
Modified: grass/trunk/temporal/t.rast.neighbors/t.rast.neighbors.py
===================================================================
--- grass/trunk/temporal/t.rast.neighbors/t.rast.neighbors.py 2014-05-28 15:08:20 UTC (rev 60546)
+++ grass/trunk/temporal/t.rast.neighbors/t.rast.neighbors.py 2014-05-28 15:35:30 UTC (rev 60547)
@@ -101,7 +101,7 @@
overwrite = grass.overwrite()
- sp = tgis.open_old_space_time_dataset(input, "strds", dbif)
+ sp = tgis.open_old_stds(input, "strds", dbif)
maps = sp.get_registered_maps_as_objects(where=where, dbif=dbif)
if not maps:
@@ -109,7 +109,7 @@
grass.warning(_("Space time raster dataset <%s> is empty") % sp.get_id())
return
- new_sp = tgis.check_new_space_time_dataset(input, "strds", dbif=dbif,
+ new_sp = tgis.check_new_stds(input, "strds", dbif=dbif,
overwrite=overwrite)
# Configure the r.neighbor module
neighbor_module = pymod.Module("r.neighbors", input="dummy",
@@ -144,7 +144,7 @@
# Open the new space time raster dataset
ttype, stype, title, descr = sp.get_initial_values()
- new_sp = tgis.open_new_space_time_dataset(output, "strds", ttype, title,
+ new_sp = tgis.open_new_stds(output, "strds", ttype, title,
descr, stype, dbif, overwrite)
num_maps = len(new_maps)
# collect empty maps to remove them
Modified: grass/trunk/temporal/t.rast.out.vtk/t.rast.out.vtk.py
===================================================================
--- grass/trunk/temporal/t.rast.out.vtk/t.rast.out.vtk.py 2014-05-28 15:08:20 UTC (rev 60546)
+++ grass/trunk/temporal/t.rast.out.vtk/t.rast.out.vtk.py 2014-05-28 15:35:30 UTC (rev 60547)
@@ -91,7 +91,7 @@
os.chdir(expdir)
- sp = tgis.open_old_space_time_dataset(input, "strds")
+ sp = tgis.open_old_stds(input, "strds")
if use_granularity:
# Attention: A list of lists of maps will be returned
Modified: grass/trunk/temporal/t.rast.series/t.rast.series.py
===================================================================
--- grass/trunk/temporal/t.rast.series/t.rast.series.py 2014-05-28 15:08:20 UTC (rev 60546)
+++ grass/trunk/temporal/t.rast.series/t.rast.series.py 2014-05-28 15:35:30 UTC (rev 60547)
@@ -81,7 +81,7 @@
# Make sure the temporal database exists
tgis.init()
- sp = tgis.open_old_space_time_dataset(input, "strds")
+ sp = tgis.open_old_stds(input, "strds")
rows = sp.get_registered_maps("id", where, order, None)
Modified: grass/trunk/temporal/t.rast.to.rast3/t.rast.to.rast3.py
===================================================================
--- grass/trunk/temporal/t.rast.to.rast3/t.rast.to.rast3.py 2014-05-28 15:08:20 UTC (rev 60546)
+++ grass/trunk/temporal/t.rast.to.rast3/t.rast.to.rast3.py 2014-05-28 15:35:30 UTC (rev 60547)
@@ -46,7 +46,7 @@
mapset = grass.gisenv()["MAPSET"]
- sp = tgis.open_old_space_time_dataset(input, "strds")
+ sp = tgis.open_old_stds(input, "strds")
grass.use_temp_region()
Modified: grass/trunk/temporal/t.remove/t.remove.py
===================================================================
--- grass/trunk/temporal/t.remove/t.remove.py 2014-05-28 15:08:20 UTC (rev 60546)
+++ grass/trunk/temporal/t.remove/t.remove.py 2014-05-28 15:35:30 UTC (rev 60547)
@@ -111,7 +111,7 @@
for name in dataset_list:
name = name.strip()
- sp = tgis.open_old_space_time_dataset(name, type, dbif)
+ sp = tgis.open_old_stds(name, type, dbif)
if recursive and force:
grass.message(_("Removing registered maps"))
Modified: grass/trunk/temporal/t.shift/t.shift.py
===================================================================
--- grass/trunk/temporal/t.shift/t.shift.py 2014-05-28 15:08:20 UTC (rev 60546)
+++ grass/trunk/temporal/t.shift/t.shift.py 2014-05-28 15:35:30 UTC (rev 60547)
@@ -61,7 +61,7 @@
dbif = tgis.SQLDatabaseInterfaceConnection()
dbif.connect()
- stds = tgis.open_old_space_time_dataset(name, type, dbif)
+ stds = tgis.open_old_stds(name, type, dbif)
check = stds.shift(gran=gran, dbif=dbif)
if check == False:
Modified: grass/trunk/temporal/t.snap/t.snap.py
===================================================================
--- grass/trunk/temporal/t.snap/t.snap.py 2014-05-28 15:08:20 UTC (rev 60546)
+++ grass/trunk/temporal/t.snap/t.snap.py 2014-05-28 15:35:30 UTC (rev 60547)
@@ -52,7 +52,7 @@
dbif = tgis.SQLDatabaseInterfaceConnection()
dbif.connect()
- stds = tgis.open_old_space_time_dataset(name, type, dbif)
+ stds = tgis.open_old_stds(name, type, dbif)
stds.snap(dbif=dbif)
stds.update_command_string(dbif=dbif)
Modified: grass/trunk/temporal/t.support/t.support.py
===================================================================
--- grass/trunk/temporal/t.support/t.support.py 2014-05-28 15:08:20 UTC (rev 60546)
+++ grass/trunk/temporal/t.support/t.support.py 2014-05-28 15:35:30 UTC (rev 60547)
@@ -86,7 +86,7 @@
dbif = tgis.SQLDatabaseInterfaceConnection()
dbif.connect()
- stds = tgis.open_old_space_time_dataset(name, type, dbif)
+ stds = tgis.open_old_stds(name, type, dbif)
update = False
if title:
Modified: grass/trunk/temporal/t.topology/t.topology.py
===================================================================
--- grass/trunk/temporal/t.topology/t.topology.py 2014-05-28 15:08:20 UTC (rev 60546)
+++ grass/trunk/temporal/t.topology/t.topology.py 2014-05-28 15:35:30 UTC (rev 60547)
@@ -59,7 +59,7 @@
# Make sure the temporal database exists
tgis.init()
- sp = tgis.open_old_space_time_dataset(name, type)
+ sp = tgis.open_old_stds(name, type)
# Get ordered map list
maps = sp.get_registered_maps_as_objects(
Modified: grass/trunk/temporal/t.unregister/t.unregister.py
===================================================================
--- grass/trunk/temporal/t.unregister/t.unregister.py 2014-05-28 15:08:20 UTC (rev 60546)
+++ grass/trunk/temporal/t.unregister/t.unregister.py 2014-05-28 15:35:30 UTC (rev 60547)
@@ -72,7 +72,7 @@
# In case a space time dataset is specified
if input:
- sp = tgis.open_old_space_time_dataset(input, type, dbif)
+ sp = tgis.open_old_stds(input, type, dbif)
maplist = []
@@ -159,7 +159,7 @@
count = 0
for key in update_dict.keys():
id = update_dict[key]
- sp = tgis.open_old_space_time_dataset(id, type, dbif)
+ sp = tgis.open_old_stds(id, type, dbif)
sp.update_from_registered_maps(dbif)
grass.percent(count, len(update_dict), 1)
count += 1
Modified: grass/trunk/temporal/t.vect.db.select/t.vect.db.select.py
===================================================================
--- grass/trunk/temporal/t.vect.db.select/t.vect.db.select.py 2014-05-28 15:08:20 UTC (rev 60546)
+++ grass/trunk/temporal/t.vect.db.select/t.vect.db.select.py 2014-05-28 15:35:30 UTC (rev 60547)
@@ -68,7 +68,7 @@
# Make sure the temporal database exists
tgis.init()
- sp = tgis.open_old_space_time_dataset(input, "stvds")
+ sp = tgis.open_old_stds(input, "stvds")
rows = sp.get_registered_maps("name,layer,mapset,start_time,end_time",
tempwhere, "start_time", None)
Modified: grass/trunk/temporal/t.vect.observe.strds/t.vect.observe.strds.py
===================================================================
--- grass/trunk/temporal/t.vect.observe.strds/t.vect.observe.strds.py 2014-05-28 15:08:20 UTC (rev 60546)
+++ grass/trunk/temporal/t.vect.observe.strds/t.vect.observe.strds.py 2014-05-28 15:35:30 UTC (rev 60547)
@@ -101,11 +101,11 @@
mapset = grass.gisenv()["MAPSET"]
- out_sp = tgis.check_new_space_time_dataset(output, "stvds", dbif, overwrite)
+ out_sp = tgis.check_new_stds(output, "stvds", dbif, overwrite)
samples = []
- first_strds = tgis.open_old_space_time_dataset(strds_names[0], "strds", dbif)
+ first_strds = tgis.open_old_stds(strds_names[0], "strds", dbif)
# Single space time raster dataset
if len(strds_names) == 1:
@@ -127,7 +127,7 @@
else:
# Multiple space time raster datasets
for name in strds_names[1:]:
- dataset = tgis.open_old_space_time_dataset(name, "strds", dbif)
+ dataset = tgis.open_old_stds(name, "strds", dbif)
if dataset.get_temporal_type() != first_strds.get_temporal_type():
grass.fatal(_("Temporal type of space time raster datasets must be equal\n"
"<%(a)s> of type %(type_a)s do not match <%(b)s> of type %(type_b)s"%\
@@ -203,7 +203,7 @@
" with vector map <%s>") % (strds, input)
# Create the output space time vector dataset
- out_sp = tgis.open_new_space_time_dataset(output, "stvds",
+ out_sp = tgis.open_new_stds(output, "stvds",
first_strds.get_temporal_type(),
title, description,
first_strds.get_semantic_type(),
Modified: grass/trunk/temporal/t.vect.what.strds/t.vect.what.strds.py
===================================================================
--- grass/trunk/temporal/t.vect.what.strds/t.vect.what.strds.py 2014-05-28 15:08:20 UTC (rev 60546)
+++ grass/trunk/temporal/t.vect.what.strds/t.vect.what.strds.py 2014-05-28 15:35:30 UTC (rev 60547)
@@ -84,8 +84,8 @@
dbif = tgis.SQLDatabaseInterfaceConnection()
dbif.connect()
- sp = tgis.open_old_space_time_dataset(input, "stvds", dbif)
- strds_sp = tgis.open_old_space_time_dataset(strds, "strds", dbif)
+ sp = tgis.open_old_stds(input, "stvds", dbif)
+ strds_sp = tgis.open_old_stds(strds, "strds", dbif)
if strds_sp.get_temporal_type() != sp.get_temporal_type():
dbif.close()
More information about the grass-commit
mailing list