[GRASS-SVN] r58386 - grass/trunk/lib/python/temporal
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Dec 4 09:14:27 PST 2013
Author: huhabla
Date: 2013-12-04 09:14:27 -0800 (Wed, 04 Dec 2013)
New Revision: 58386
Modified:
grass/trunk/lib/python/temporal/abstract_dataset.py
grass/trunk/lib/python/temporal/abstract_map_dataset.py
grass/trunk/lib/python/temporal/abstract_space_time_dataset.py
grass/trunk/lib/python/temporal/aggregation.py
grass/trunk/lib/python/temporal/base.py
grass/trunk/lib/python/temporal/core.py
grass/trunk/lib/python/temporal/datetime_math.py
grass/trunk/lib/python/temporal/extract.py
grass/trunk/lib/python/temporal/factory.py
grass/trunk/lib/python/temporal/list_stds.py
grass/trunk/lib/python/temporal/mapcalc.py
grass/trunk/lib/python/temporal/metadata.py
grass/trunk/lib/python/temporal/open_stds.py
grass/trunk/lib/python/temporal/register.py
grass/trunk/lib/python/temporal/sampling.py
grass/trunk/lib/python/temporal/space_time_datasets.py
grass/trunk/lib/python/temporal/spatial_extent.py
grass/trunk/lib/python/temporal/spatial_topology_dataset_connector.py
grass/trunk/lib/python/temporal/spatio_temporal_relationships.py
grass/trunk/lib/python/temporal/stds_export.py
grass/trunk/lib/python/temporal/stds_import.py
grass/trunk/lib/python/temporal/temporal_extent.py
grass/trunk/lib/python/temporal/temporal_granularity.py
grass/trunk/lib/python/temporal/temporal_topology_dataset_connector.py
grass/trunk/lib/python/temporal/univar_statistics.py
Log:
Using the PyGRASS message interface for all API functions.
Modified: grass/trunk/lib/python/temporal/abstract_dataset.py
===================================================================
--- grass/trunk/lib/python/temporal/abstract_dataset.py 2013-12-04 15:19:34 UTC (rev 58385)
+++ grass/trunk/lib/python/temporal/abstract_dataset.py 2013-12-04 17:14:27 UTC (rev 58386)
@@ -6,7 +6,7 @@
Temporal GIS related functions to be used in temporal GIS Python library package.
-(C) 2011-2012 by the GRASS Development Team
+(C) 2011-2013 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
for details.
@@ -380,7 +380,7 @@
"""
if self.get_mapset() != get_current_mapset():
- core.fatal(_("Unable to insert dataset <%(ds)s> of type %(type)s in the temporal database."
+ self.msgr.fatal(_("Unable to insert dataset <%(ds)s> of type %(type)s in the temporal database."
" The mapset of the dataset does not match the current mapset")%\
{"ds":self.get_id(), "type":self.get_type()})
@@ -415,7 +415,7 @@
"""
if self.get_mapset() != get_current_mapset():
- core.fatal(_("Unable to update dataset <%(ds)s> of type %(type)s in the temporal database."
+ self.msgr.fatal(_("Unable to update dataset <%(ds)s> of type %(type)s in the temporal database."
" The mapset of the dataset does not match the current mapset")%\
{"ds":self.get_id(), "type":self.get_type()})
@@ -453,7 +453,7 @@
"""
if self.get_mapset() != get_current_mapset():
- core.fatal(_("Unable to update dataset <%(ds)s> of type %(type)s in the temporal database."
+ self.msgr.fatal(_("Unable to update dataset <%(ds)s> of type %(type)s in the temporal database."
" The mapset of the dataset does not match the current mapset")%\
{"ds":self.get_id(), "type":self.get_type()})
Modified: grass/trunk/lib/python/temporal/abstract_map_dataset.py
===================================================================
--- grass/trunk/lib/python/temporal/abstract_map_dataset.py 2013-12-04 15:19:34 UTC (rev 58385)
+++ grass/trunk/lib/python/temporal/abstract_map_dataset.py 2013-12-04 17:14:27 UTC (rev 58386)
@@ -5,7 +5,7 @@
Temporal GIS related functions to be used in temporal GIS Python library package.
-(C) 2008-2011 by the GRASS Development Team
+(C) 2011-2013 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
for details.
@@ -425,7 +425,7 @@
"""
if self.get_mapset() != get_current_mapset():
- core.fatal(_("Unable to update dataset <%(ds)s> of type %(type)s in the temporal database."
+ self.msgr.fatal(_("Unable to update dataset <%(ds)s> of type %(type)s in the temporal database."
" The mapset of the dataset does not match the current mapset")%\
{"ds":self.get_id(), "type":self.get_type()})
@@ -515,7 +515,7 @@
@param dbif The database interface to be used
"""
if self.get_mapset() != get_current_mapset():
- core.fatal(_("Unable to update dataset <%(ds)s> of type %(type)s in the temporal database."
+ self.msgr.fatal(_("Unable to update dataset <%(ds)s> of type %(type)s in the temporal database."
" The mapset of the dataset does not match the current mapset")%\
{"ds":self.get_id(), "type":self.get_type()})
@@ -821,7 +821,7 @@
None in case of a failure
"""
if self.get_mapset() != get_current_mapset():
- core.fatal(_("Unable to delete dataset <%(ds)s> of type %(type)s from the temporal database."
+ self.msgr.fatal(_("Unable to delete dataset <%(ds)s> of type %(type)s from the temporal database."
" The mapset of the dataset does not match the current mapset")%\
{"ds":self.get_id(), "type":self.get_type()})
@@ -883,17 +883,17 @@
if self.get_layer() is not None:
- self.msgr.verbose(_("Unregister %(type)s map <%(map)s> with "
+ self.msgr.debug(1, _("Unregister %(type)s map <%(map)s> with "
"layer %(layer)s from space time datasets" % \
{'type':self.get_type(), 'map':self.get_map_id(),
'layer':self.get_layer()}))
else:
- self.msgr.verbose(_("Unregister %(type)s map <%(map)s> "
+ self.msgr.debug(1, _("Unregister %(type)s map <%(map)s> "
"from space time datasets"
% {'type':self.get_type(), 'map':self.get_map_id()}))
if self.get_mapset() != get_current_mapset():
- core.fatal(_("Unable to unregister dataset <%(ds)s> of type %(type)s from the temporal database."
+ self.msgr.fatal(_("Unable to unregister dataset <%(ds)s> of type %(type)s from the temporal database."
" The mapset of the dataset does not match the current mapset")%\
{"ds":self.get_id(), "type":self.get_type()})
Modified: grass/trunk/lib/python/temporal/abstract_space_time_dataset.py
===================================================================
--- grass/trunk/lib/python/temporal/abstract_space_time_dataset.py 2013-12-04 15:19:34 UTC (rev 58385)
+++ grass/trunk/lib/python/temporal/abstract_space_time_dataset.py 2013-12-04 17:14:27 UTC (rev 58386)
@@ -6,7 +6,7 @@
Temporal GIS related functions to be used in temporal GIS Python
library package.
-(C) 2011-2012 by the GRASS Development Team
+(C) 2011-2013 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
for details.
@@ -20,7 +20,6 @@
###############################################################################
-
class AbstractSpaceTimeDataset(AbstractDataset):
"""!Abstract space time dataset class
@@ -151,7 +150,7 @@
elif temporal_type == "relative":
self.base.set_ttype("relative")
else:
- core.fatal(_("Unknown temporal type \"%s\"") % (temporal_type))
+ self.msgr.fatal(_("Unknown temporal type \"%s\"") % (temporal_type))
self.base.set_semantic_type(semantic_type)
self.metadata.set_title(title)
@@ -266,14 +265,14 @@
check = check_granularity_string(granularity, temporal_type)
if not check:
- core.fatal(_("Wrong granularity: \"%s\"") % str(granularity))
+ self.msgr.fatal(_("Wrong granularity: \"%s\"") % str(granularity))
if temporal_type == "absolute":
self.base.set_ttype("absolute")
elif temporal_type == "relative":
self.base.set_ttype("relative")
else:
- core.fatal(_("Unknown temporal type \"%s\"") % (temporal_type))
+ self.msgr.fatal(_("Unknown temporal type \"%s\"") % (temporal_type))
self.temporal_extent.set_granularity(granularity)
@@ -294,7 +293,7 @@
if temporal_type == "relative":
if not self.check_relative_time_unit(unit):
- core.fatal(_("Unsupported temporal unit: %s") % (unit))
+ self.msgr.fatal(_("Unsupported temporal unit: %s") % (unit))
self.relative_time.set_unit(unit)
def get_map_time(self):
@@ -977,7 +976,7 @@
check = check_granularity_string(gran, self.get_temporal_type())
if not check:
- core.fatal(_("Wrong granularity: \"%s\"") % str(gran))
+ self.msgr.fatal(_("Wrong granularity: \"%s\"") % str(gran))
start, end = self.get_temporal_extent_as_tuple()
@@ -1469,7 +1468,7 @@
return None
if not check_granularity_string(gran, maps[-1].get_temporal_type()):
- core.error(_("Wrong granularity format: %s" % (gran)))
+ self.msgr.error(_("Wrong granularity format: %s" % (gran)))
return None
for map in maps:
@@ -1497,7 +1496,7 @@
"""
if self.get_mapset() != get_current_mapset():
- core.fatal(_("Unable to shift dataset <%(ds)s> of type %(type)s in the temporal database."
+ self.msgr.fatal(_("Unable to shift dataset <%(ds)s> of type %(type)s in the temporal database."
" The mapset of the dataset does not match the current mapset")%\
({"ds":self.get_id()}, {"type":self.get_type()}))
@@ -1664,7 +1663,7 @@
"""
if self.get_mapset() != get_current_mapset():
- core.fatal(_("Unable to snap dataset <%(ds)s> of type %(type)s in the temporal database."
+ self.msgr.fatal(_("Unable to snap dataset <%(ds)s> of type %(type)s in the temporal database."
" The mapset of the dataset does not match the current mapset")%\
({"ds":self.get_id()}, {"type":self.get_type()}))
@@ -1764,7 +1763,7 @@
"""
if self.get_mapset() != get_current_mapset():
- core.fatal(_("Unable to rename dataset <%(ds)s> of type %(type)s in the temporal database."
+ self.msgr.fatal(_("Unable to rename dataset <%(ds)s> of type %(type)s in the temporal database."
" The mapset of the dataset does not match the current mapset")%\
({"ds":self.get_id()}, {"type":self.get_type()}))
@@ -1831,7 +1830,7 @@
self.get_id()))
if self.get_mapset() != get_current_mapset():
- core.fatal(_("Unable to delete dataset <%(ds)s> of type %(type)s from the temporal database."
+ self.msgr.fatal(_("Unable to delete dataset <%(ds)s> of type %(type)s from the temporal database."
" The mapset of the dataset does not match the current mapset")%\
{"ds":self.get_id(), "type":self.get_type()})
@@ -1842,7 +1841,7 @@
self.metadata.select(dbif)
if self.get_map_register() is not None:
- self.msgr.verbose(_("Drop map register table: %s") % (
+ self.msgr.debug(1, _("Drop map register table: %s") % (
self.get_map_register()))
rows = self.get_registered_maps("id", None, None, dbif)
# Unregister each registered map in the table
@@ -1889,7 +1888,7 @@
"""
if self.get_mapset() != get_current_mapset():
- core.fatal(_("Unable to register map in dataset <%(ds)s> of type %(type)s."
+ self.msgr.fatal(_("Unable to register map in dataset <%(ds)s> of type %(type)s."
" The mapset of the dataset does not match the current mapset")%\
{"ds":self.get_id(), "type":self.get_type()})
@@ -1897,7 +1896,7 @@
if map.is_in_db(dbif) == False:
dbif.close()
- core.fatal(_("Only maps with absolute or relative valid time can "
+ self.msgr.fatal(_("Only maps with absolute or relative valid time can "
"be registered"))
if map.get_layer():
@@ -1917,10 +1916,10 @@
if not map.check_for_correct_time():
if map.get_layer():
- core.fatal(_("Map <%(id)s> with layer %(l)s has invalid time")
+ self.msgr.fatal(_("Map <%(id)s> with layer %(l)s has invalid time")
% {'id': map.get_map_id(), 'l': map.get_layer()})
else:
- core.fatal(_("Map <%s> has invalid time") % (map.get_map_id()))
+ self.msgr.fatal(_("Map <%s> has invalid time") % (map.get_map_id()))
map_id = map.base.get_id()
map_name = map.base.get_name()
@@ -1943,12 +1942,12 @@
# Check temporal types
if stds_ttype != map_ttype:
if map.get_layer():
- core.fatal(_("Temporal type of space time dataset <%(id)s> and"
+ self.msgr.fatal(_("Temporal type of space time dataset <%(id)s> and"
" map <%(map)s> with layer %(l)s are different") \
% {'id': self.get_id(), 'map': map.get_map_id(),
'l': map.get_layer()})
else:
- core.fatal(_("Temporal type of space time dataset <%(id)s> and"
+ self.msgr.fatal(_("Temporal type of space time dataset <%(id)s> and"
" map <%(map)s> are different") % {
'id': self.get_id(), 'map': map.get_map_id()})
@@ -1962,7 +1961,7 @@
statement += self.relative_time.get_update_all_statement_mogrified(
dbif)
- self.msgr.verbose(_("Set temporal unit for space time %s dataset "
+ self.msgr.debug(1, _("Set temporal unit for space time %s dataset "
"<%s> to %s") % (map.get_type(), self.get_id(),
map_rel_time_unit))
@@ -1971,19 +1970,19 @@
# Check the relative time unit
if self.is_time_relative() and (stds_rel_time_unit != map_rel_time_unit):
if map.get_layer():
- core.fatal(_("Relative time units of space time dataset "
+ self.msgr.fatal(_("Relative time units of space time dataset "
"<%(id)s> and map <%(map)s> with layer %(l)s are"
" different") % {'id': self.get_id(),
'map': map.get_map_id(),
'l': map.get_layer()})
else:
- core.fatal(_("Relative time units of space time dataset "
+ self.msgr.fatal(_("Relative time units of space time dataset "
"<%(id)s> and map <%(map)s> are different") % \
{'id': self.get_id(), 'map': map.get_map_id()})
if stds_mapset != map_mapset:
dbif.close()
- core.fatal(_("Only maps from the same mapset can be registered"))
+ self.msgr.fatal(_("Only maps from the same mapset can be registered"))
# Check if map is already registered
if stds_register_table is not None:
@@ -2043,12 +2042,12 @@
statement += map.metadata.get_update_statement_mogrified(dbif)
if map.get_layer():
- self.msgr.verbose(_("Created register table <%s> for "
+ self.msgr.debug(1, _("Created register table <%s> for "
"%s map <%s> with layer %s") %
(map_register_table, map.get_type(),
map.get_map_id(), map.get_layer()))
else:
- self.msgr.verbose(_("Created register table <%s> for %s map <%s>") %
+ self.msgr.debug(1, _("Created register table <%s> for %s map <%s>") %
(map_register_table, map.get_type(),
map.get_map_id()))
@@ -2074,7 +2073,7 @@
self.set_map_register(stds_register_table)
statement += self.metadata.get_update_statement_mogrified(dbif)
- self.msgr.verbose(_("Created register table <%s> for space "
+ self.msgr.debug(1, _("Created register table <%s> for space "
"time %s dataset <%s>") %
(stds_register_table, map.get_type(), self.get_id()))
@@ -2147,7 +2146,7 @@
"""
if self.get_mapset() != get_current_mapset():
- core.fatal(_("Unable to unregister map from dataset <%(ds)s> of type %(type)s in the temporal database."
+ self.msgr.fatal(_("Unable to unregister map from dataset <%(ds)s> of type %(type)s in the temporal database."
" The mapset of the dataset does not match the current mapset")%\
{"ds":self.get_id(), "type":self.get_type()})
@@ -2245,7 +2244,7 @@
"""
if self.get_mapset() != get_current_mapset():
- core.fatal(_("Unable to update dataset <%(ds)s> of type %(type)s in the temporal database."
+ self.msgr.fatal(_("Unable to update dataset <%(ds)s> of type %(type)s in the temporal database."
" The mapset of the dataset does not match the current mapset")%\
{"ds":self.get_id(), "type":self.get_type()})
Modified: grass/trunk/lib/python/temporal/aggregation.py
===================================================================
--- grass/trunk/lib/python/temporal/aggregation.py 2013-12-04 15:19:34 UTC (rev 58385)
+++ grass/trunk/lib/python/temporal/aggregation.py 2013-12-04 17:14:27 UTC (rev 58386)
@@ -15,7 +15,7 @@
...
@endcode
-(C) 2008-2011 by the GRASS Development Team
+(C) 2012-2013 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
for details.
@@ -158,7 +158,7 @@
if ret != 0:
dbif.close()
- core.fatal(_("Error while r.series computation"))
+ msgr.fatal(_("Error while r.series computation"))
# Read the raster map data
new_map.load()
Modified: grass/trunk/lib/python/temporal/base.py
===================================================================
--- grass/trunk/lib/python/temporal/base.py 2013-12-04 15:19:34 UTC (rev 58385)
+++ grass/trunk/lib/python/temporal/base.py 2013-12-04 17:14:27 UTC (rev 58386)
@@ -24,7 +24,7 @@
@endcode
-(C) 2011-2012 by the GRASS Development Team
+(C) 2011-2013 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
for details.
@@ -254,6 +254,7 @@
self.table = table # Name of the table, set in the subclass
self.ident = ident
+ self.msgr = get_tgis_message_interface()
def get_table_name(self):
"""!Return the name of the table in which the internal
@@ -375,7 +376,7 @@
if len(row) > 0:
self.deserialize(row)
else:
- core.fatal(_("Object <%s> not found in the temporal database")
+ self.msgr.fatal(_("Object <%s> not found in the temporal database")
% self.get_id())
return True
@@ -456,7 +457,7 @@
@param ident The identifier to be updated, useful for renaming
"""
if self.ident is None:
- raise IOError("Missing identifer")
+ self.msgr.fatal(_("Missing identifer"))
sql, args = self.get_update_statement(ident)
#print sql
@@ -506,7 +507,7 @@
@param ident The identifier to be updated, useful for renaming
"""
if self.ident is None:
- raise IOError("Missing identifer")
+ self.msgr.fatal(_("Missing identifer"))
sql, args = self.get_update_all_statement(ident)
#print sql
@@ -616,7 +617,7 @@
self.set_mapset(mapset)
self.set_name(name)
else:
- core.fatal(_("Wrong identifier, the mapset is missing"))
+ self.msgr.fatal(_("Wrong identifier, the mapset is missing"))
if name.find(":") >= 0:
name, layer = ident.split(":")
self.set_layer(layer)
Modified: grass/trunk/lib/python/temporal/core.py
===================================================================
--- grass/trunk/lib/python/temporal/core.py 2013-12-04 15:19:34 UTC (rev 58385)
+++ grass/trunk/lib/python/temporal/core.py 2013-12-04 17:14:27 UTC (rev 58386)
@@ -27,7 +27,7 @@
@endcode
-(C) 2008-2011 by the GRASS Development Team
+(C) 2011-2013 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
for details.
@@ -196,6 +196,7 @@
grassenv = core.gisenv()
global tgis_backend
+ msgr = get_tgis_message_interface()
if tgis_backend == "sqlite":
# We substitute GRASS variables if they are located in the database string
@@ -208,7 +209,7 @@
string = string.replace("$MAPSET", grassenv["MAPSET"])
return string
else:
- core.fatal(_("Unable to initialize the temporal GIS DBMI "
+ msgr.fatal(_("Unable to initialize the temporal GIS DBMI "
"interface. Use t.connect to specify the driver "
"and the database string"))
elif tgis_backend == "pg":
@@ -216,7 +217,7 @@
string = kv["database"]
return string
else:
- core.fatal(_("Unable to initialize the temporal GIS DBMI "
+ msgr.fatal(_("Unable to initialize the temporal GIS DBMI "
"interface. Use t.connect to specify the driver "
"and the database string"))
@@ -276,7 +277,7 @@
raise
dbmi = psycopg2
else:
- core.fatal(_("Unable to initialize the temporal DBMI interface. Use "
+ msgr.fatal(_("Unable to initialize the temporal DBMI interface. Use "
"t.connect to specify the driver and the database string"))
dbmi = sqlite3
else:
@@ -356,6 +357,7 @@
global tgis_db_version
template_path = get_sql_template_path()
+ msgr = get_tgis_message_interface()
# Read all SQL scripts and templates
map_tables_template_sql = open(os.path.join(
@@ -406,7 +408,7 @@
stvds_tables_sql = stds_tables_template_sql.replace("STDS", "stvds")
str3ds_tables_sql = stds_tables_template_sql.replace("STDS", "str3ds")
- core.message(_("Create temporal database: %s" % (database)))
+ msgr.message(_("Create temporal database: %s" % (database)))
if tgis_backend == "sqlite":
# We need to create the sqlite3 database path if it does not exists
@@ -500,6 +502,8 @@
else:
self.dbmi = psycopg2
+ msgr = get_tgis_message_interface()
+
def rollback(self):
"""
Roll back the last transaction. This must be called
@@ -676,7 +680,7 @@
except:
if connected:
self.close()
- core.error(_("Unable to execute transaction:\n %(sql)s" % \
+ msgr.error(_("Unable to execute transaction:\n %(sql)s" % \
{"sql":statement}))
raise
Modified: grass/trunk/lib/python/temporal/datetime_math.py
===================================================================
--- grass/trunk/lib/python/temporal/datetime_math.py 2013-12-04 15:19:34 UTC (rev 58385)
+++ grass/trunk/lib/python/temporal/datetime_math.py 2013-12-04 17:14:27 UTC (rev 58386)
@@ -12,7 +12,7 @@
@author Soeren Gebbert
"""
from datetime import datetime, date, time, timedelta
-import grass.script.core as core
+from core import *
import copy
DAY_IN_SECONDS = 86400
@@ -243,8 +243,9 @@
inclist.append(incpart.strip().split(" "))
for inc in inclist:
+ msgr = get_tgis_message_interface()
if len(inc) < 2:
- core.error(_("Wrong increment format: %s") % (increment))
+ msgr.error(_("Wrong increment format: %s") % (increment))
return None
if inc[1].find("seconds") >= 0 or inc[1].find("second") >= 0:
seconds = sign * mult * int(inc[0])
@@ -261,7 +262,7 @@
elif inc[1].find("years") >= 0 or inc[1].find("year") >= 0:
years = sign * mult * int(inc[0])
else:
- core.error(_("Wrong increment format: %s") % (increment))
+ msgr.error(_("Wrong increment format: %s") % (increment))
return None
return modify_datetime(mydate, years, months, weeks, days, hours, minutes, seconds)
@@ -436,7 +437,8 @@
elif inc[1].find("years") >= 0 or inc[1].find("year") >= 0:
has_years = True
else:
- core.error(_("Wrong granularity format: %s") % (granularity))
+ msgr = get_tgis_message_interface()
+ msgr.error(_("Wrong granularity format: %s") % (granularity))
return None
if has_seconds:
@@ -746,7 +748,8 @@
time_object = check_datetime_string(time_string)
if not isinstance(time_object, datetime):
- core.error(time_object)
+ msgr = get_tgis_message_interface()
+ msgr.error(str(time_object))
return None
return time_object
Modified: grass/trunk/lib/python/temporal/extract.py
===================================================================
--- grass/trunk/lib/python/temporal/extract.py 2013-12-04 15:19:34 UTC (rev 58385)
+++ grass/trunk/lib/python/temporal/extract.py 2013-12-04 17:14:27 UTC (rev 58386)
@@ -4,7 +4,7 @@
Temporal GIS related functions to be used in Python scripts.
-(C) 2008-2011 by the GRASS Development Team
+(C) 2012-2013 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
for details.
@@ -48,12 +48,12 @@
"""
# Check the parameters
+ msgr = get_tgis_message_interface()
if expression and not base:
- core.fatal(_("You need to specify the base name of new created maps"))
+ msgr.fatal(_("You need to specify the base name of new created maps"))
mapset = get_current_mapset()
- msgr = get_tgis_message_interface()
dbif = SQLDatabaseInterfaceConnection()
dbif.connect()
@@ -72,7 +72,7 @@
if rows:
num_rows = len(rows)
- core.percent(0, num_rows, 1)
+ msgr.percent(0, num_rows, 1)
# Run the mapcalc expression
if expression:
@@ -84,7 +84,7 @@
count += 1
if count % 10 == 0:
- core.percent(count, num_rows, 1)
+ msgr.percent(count, num_rows, 1)
map_name = "%s_%i" % (base, count)
@@ -155,7 +155,7 @@
if exitcodes != 0:
dbif.close()
- core.fatal(_("Error while computation"))
+ msgr.fatal(_("Error while computation"))
# Empty process list
proc_list = []
@@ -163,7 +163,7 @@
# Store the new maps
new_maps[row["id"]] = new_map
- core.percent(0, num_rows, 1)
+ 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,
@@ -181,7 +181,7 @@
count += 1
if count % 10 == 0:
- core.percent(count, num_rows, 1)
+ msgr.percent(count, num_rows, 1)
old_map = sp.get_new_map_instance(row["id"])
old_map.select(dbif)
@@ -227,7 +227,7 @@
# Update the spatio-temporal extent and the metadata table entries
new_sp.update_from_registered_maps(dbif)
- core.percent(num_rows, num_rows, 1)
+ msgr.percent(num_rows, num_rows, 1)
# Remove empty maps
if len(empty_maps) > 0:
Modified: grass/trunk/lib/python/temporal/factory.py
===================================================================
--- grass/trunk/lib/python/temporal/factory.py 2013-12-04 15:19:34 UTC (rev 58385)
+++ grass/trunk/lib/python/temporal/factory.py 2013-12-04 17:14:27 UTC (rev 58386)
@@ -14,7 +14,7 @@
...
@endcode
-(C) 2008-2011 by the GRASS Development Team
+(C) 2012-2013 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
for details.
@@ -47,7 +47,8 @@
elif type == "vect" or type == "vector":
sp = VectorDataset(id)
else:
- core.error(_("Unknown dataset type: %s") % type)
+ msgr = get_tgis_message_interface()
+ msgr.error(_("Unknown dataset type: %s") % type)
return None
return sp
Modified: grass/trunk/lib/python/temporal/list_stds.py
===================================================================
--- grass/trunk/lib/python/temporal/list_stds.py 2013-12-04 15:19:34 UTC (rev 58385)
+++ grass/trunk/lib/python/temporal/list_stds.py 2013-12-04 17:14:27 UTC (rev 58386)
@@ -14,7 +14,7 @@
...
@endcode
-(C) 2008-2011 by the GRASS Development Team
+(C) 2012-2013 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
for details.
@@ -56,6 +56,7 @@
"""
dbif, connected = init_dbif(None)
+ msgr = get_tgis_message_interface()
sp = open_old_space_time_dataset(input, type, dbif)
@@ -97,7 +98,7 @@
if len(maps[0]) > 0:
first_time, dummy = maps[0][0].get_temporal_extent_as_tuple()
else:
- core.warning(_("Empty map list."))
+ msgr.warning(_("Empty map list."))
return
else:
first_time, dummy = maps[0].get_temporal_extent_as_tuple()
@@ -108,7 +109,7 @@
if len(mymap) > 0:
map = mymap[0]
else:
- core.fatal(_("Empty entry in map list, this should not happen."))
+ msgr.fatal(_("Empty entry in map list, this should not happen."))
else:
map = mymap
Modified: grass/trunk/lib/python/temporal/mapcalc.py
===================================================================
--- grass/trunk/lib/python/temporal/mapcalc.py 2013-12-04 15:19:34 UTC (rev 58385)
+++ grass/trunk/lib/python/temporal/mapcalc.py 2013-12-04 17:14:27 UTC (rev 58386)
@@ -4,7 +4,7 @@
Temporal GIS related functions to be used in Python scripts.
-(C) 2008-2011 by the GRASS Development Team
+(C) 2012-2013 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
for details.
@@ -197,7 +197,7 @@
count += 1
if count % 10 == 0:
- core.percent(count, num, 1)
+ msgr.percent(count, num, 1)
# Create the r.mapcalc statement for the current time step
map_name = "%s_%i" % (base, count)
@@ -271,7 +271,7 @@
if exitcodes != 0:
dbif.close()
- core.fatal(_("Error while mapcalc computation"))
+ msgr.fatal(_("Error while mapcalc computation"))
# Empty process list
proc_list = []
@@ -296,7 +296,7 @@
count += 1
if count % 10 == 0:
- core.percent(count, num, 1)
+ msgr.percent(count, num, 1)
# Read the map data
new_map.load()
@@ -316,7 +316,7 @@
# Update the spatio-temporal extent and the metadata table entries
new_sp.update_from_registered_maps(dbif)
- core.percent(1, 1, 1)
+ msgr.percent(1, 1, 1)
# Remove empty maps
if len(empty_maps) > 0:
@@ -423,58 +423,59 @@
"""
start, end, tz = current.get_absolute_time()
+ msgr = get_tgis_message_interface()
if expr.find("start_year()") >= 0:
if not is_time_absolute:
- core.fatal(_("The temporal operators <%s> supports only absolute"\
+ msgr.fatal(_("The temporal operators <%s> supports only absolute"\
"time." % ("start_*")))
expr = expr.replace("start_year()", str(start.year))
if expr.find("start_month()") >= 0:
if not is_time_absolute:
- core.fatal(_("The temporal operators <%s> supports only absolute"\
+ msgr.fatal(_("The temporal operators <%s> supports only absolute"\
"time." % ("start_*")))
expr = expr.replace("start_month()", str(start.month))
if expr.find("start_week()") >= 0:
if not is_time_absolute:
- core.fatal(_("The temporal operators <%s> supports only absolute"\
+ msgr.fatal(_("The temporal operators <%s> supports only absolute"\
"time." % ("start_*")))
expr = expr.replace("start_week()", str(start.isocalendar()[1]))
if expr.find("start_day()") >= 0:
if not is_time_absolute:
- core.fatal(_("The temporal operators <%s> supports only absolute"\
+ msgr.fatal(_("The temporal operators <%s> supports only absolute"\
"time." % ("start_*")))
expr = expr.replace("start_day()", str(start.day))
if expr.find("start_hour()") >= 0:
if not is_time_absolute:
- core.fatal(_("The temporal operators <%s> supports only absolute"\
+ msgr.fatal(_("The temporal operators <%s> supports only absolute"\
"time." % ("start_*")))
expr = expr.replace("start_hour()", str(start.hour))
if expr.find("start_minute()") >= 0:
if not is_time_absolute:
- core.fatal(_("The temporal operators <%s> supports only absolute"\
+ msgr.fatal(_("The temporal operators <%s> supports only absolute"\
"time." % ("start_*")))
expr = expr.replace("start_minute()", str(start.minute))
if expr.find("start_second()") >= 0:
if not is_time_absolute:
- core.fatal(_("The temporal operators <%s> supports only absolute"\
+ msgr.fatal(_("The temporal operators <%s> supports only absolute"\
"time." % ("start_*")))
expr = expr.replace("start_second()", str(start.second))
if expr.find("start_dow()") >= 0:
if not is_time_absolute:
- core.fatal(_("The temporal operators <%s> supports only absolute"\
+ msgr.fatal(_("The temporal operators <%s> supports only absolute"\
"time." % ("start_*")))
expr = expr.replace("start_dow()", str(start.isoweekday()))
if expr.find("start_doy()") >= 0:
if not is_time_absolute:
- core.fatal(_("The temporal operators <%s> supports only absolute"\
+ msgr.fatal(_("The temporal operators <%s> supports only absolute"\
"time." % ("start_*")))
year = datetime(start.year, 1, 1)
delta = start - year
@@ -505,10 +506,11 @@
"""
start, end, tz = current.get_absolute_time()
+ msgr = get_tgis_message_interface()
if expr.find("end_year()") >= 0:
if not is_time_absolute:
- core.fatal(_("The temporal operators <%s> supports only absolute"\
+ msgr.fatal(_("The temporal operators <%s> supports only absolute"\
"time." % ("end_*")))
if not end:
expr = expr.replace("end_year()", "null()")
@@ -517,7 +519,7 @@
if expr.find("end_month()") >= 0:
if not is_time_absolute:
- core.fatal(_("The temporal operators <%s> supports only absolute"\
+ msgr.fatal(_("The temporal operators <%s> supports only absolute"\
"time." % ("end_*")))
if not end:
expr = expr.replace("end_month()", "null()")
@@ -526,7 +528,7 @@
if expr.find("end_week()") >= 0:
if not is_time_absolute:
- core.fatal(_("The temporal operators <%s> supports only absolute"\
+ msgr.fatal(_("The temporal operators <%s> supports only absolute"\
"time." % ("end_*")))
if not end:
expr = expr.replace("end_week()", "null()")
@@ -535,7 +537,7 @@
if expr.find("end_day()") >= 0:
if not is_time_absolute:
- core.fatal(_("The temporal operators <%s> supports only absolute"\
+ msgr.fatal(_("The temporal operators <%s> supports only absolute"\
"time." % ("end_*")))
if not end:
expr = expr.replace("end_day()", "null()")
@@ -544,7 +546,7 @@
if expr.find("end_hour()") >= 0:
if not is_time_absolute:
- core.fatal(_("The temporal operators <%s> supports only absolute"\
+ msgr.fatal(_("The temporal operators <%s> supports only absolute"\
"time." % ("end_*")))
if not end:
expr = expr.replace("end_hour()", "null()")
@@ -553,7 +555,7 @@
if expr.find("end_minute()") >= 0:
if not is_time_absolute:
- core.fatal(_("The temporal operators <%s> supports only absolute"\
+ msgr.fatal(_("The temporal operators <%s> supports only absolute"\
"time." % ("end_*")))
if not end:
expr = expr.replace("end_minute()", "null()")
@@ -562,7 +564,7 @@
if expr.find("end_second()") >= 0:
if not is_time_absolute:
- core.fatal(_("The temporal operators <%s> supports only absolute"\
+ msgr.fatal(_("The temporal operators <%s> supports only absolute"\
"time." % ("end_*")))
if not end:
expr = expr.replace("end_second()", "null()")
@@ -571,7 +573,7 @@
if expr.find("end_dow()") >= 0:
if not is_time_absolute:
- core.fatal(_("The temporal operators <%s> supports only absolute"\
+ msgr.fatal(_("The temporal operators <%s> supports only absolute"\
"time." % ("end_*")))
if not end:
expr = expr.replace("end_dow()", "null()")
@@ -580,7 +582,7 @@
if expr.find("end_doy()") >= 0:
if not is_time_absolute:
- core.fatal(_("The temporal operators <%s> supports only absolute"\
+ msgr.fatal(_("The temporal operators <%s> supports only absolute"\
"time." % ("end_*")))
if not end:
expr = expr.replace("end_doy()", "null()")
Modified: grass/trunk/lib/python/temporal/metadata.py
===================================================================
--- grass/trunk/lib/python/temporal/metadata.py 2013-12-04 15:19:34 UTC (rev 58385)
+++ grass/trunk/lib/python/temporal/metadata.py 2013-12-04 17:14:27 UTC (rev 58386)
@@ -19,7 +19,7 @@
@endcode
-(C) 2008-2011 by the GRASS Development Team
+(C) 2012-2013 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
for details.
Modified: grass/trunk/lib/python/temporal/open_stds.py
===================================================================
--- grass/trunk/lib/python/temporal/open_stds.py 2013-12-04 15:19:34 UTC (rev 58385)
+++ grass/trunk/lib/python/temporal/open_stds.py 2013-12-04 17:14:27 UTC (rev 58386)
@@ -14,7 +14,7 @@
...
@endcode
-(C) 2008-2011 by the GRASS Development Team
+(C) 2012-2013 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
for details.
@@ -42,6 +42,7 @@
"""
mapset = get_current_mapset()
+ msgr = get_tgis_message_interface()
# Check if the dataset name contains the mapset as well
if name.find("@") < 0:
@@ -56,13 +57,13 @@
elif type == "stvds" or type == "vect" or type == "vector":
sp = dataset_factory("stvds", id)
else:
- core.fatal(_("Unkown type: %s") % (type))
+ msgr.fatal(_("Unkown type: %s") % (type))
dbif, connected = init_dbif(dbif)
if not sp.is_in_db(dbif):
dbif.close()
- core.fatal(_("Space time %(sp)s dataset <%(name)s> no found") %
+ msgr.fatal(_("Space time %(sp)s dataset <%(name)s> no found") %
{'sp': sp.get_new_map_instance(None).get_type(),
'name': name})
@@ -93,13 +94,14 @@
#Get the current mapset to create the id of the space time dataset
mapset = get_current_mapset()
+ msgr = get_tgis_message_interface()
if name.find("@") < 0:
id = name + "@" + mapset
else:
n, m = name.split("@")
if mapset != m:
- core.fatal(_("Space time datasets can only be created in the "
+ msgr.fatal(_("Space time datasets can only be created in the "
"current mapset"))
id = name
@@ -116,7 +118,7 @@
dbif, connected = init_dbif(dbif)
if sp.is_in_db(dbif) and overwrite is False:
- core.fatal(_("Space time %(sp)s dataset <%(name)s> is already in the"
+ msgr.fatal(_("Space time %(sp)s dataset <%(name)s> is already in the"
" database. Use the overwrite flag.") % {
'sp': sp.get_new_map_instance(None).get_type(),
'name': name})
@@ -148,10 +150,11 @@
This function will raise a ScriptError in case of an error.
"""
dbif, connected = init_dbif(dbif)
+ msgr = get_tgis_message_interface()
sp = check_new_space_time_dataset(name, type, dbif, overwrite)
if sp.is_in_db(dbif):
- core.warning(_("Overwrite space time %(sp)s dataset <%(name)s> and "
+ msgr.warning(_("Overwrite space time %(sp)s dataset <%(name)s> and "
"unregister all maps.") % {
'sp': sp.get_new_map_instance(None).get_type(),
'name': name})
@@ -159,7 +162,7 @@
sp.delete(dbif)
sp = sp.get_new_instance(id)
- core.verbose(_("Create new space time %s dataset.") %
+ msgr.verbose(_("Create new space time %s dataset.") %
sp.get_new_map_instance(None).get_type())
sp.set_initial_values(temporal_type=temporaltype, semantic_type=semantic,
@@ -190,6 +193,7 @@
This function will raise a ScriptError in case of an error.
"""
mapset = get_current_mapset()
+ msgr = get_tgis_message_interface()
dbif, connected = init_dbif(dbif)
map_id = AbstractMapDataset.build_id(name, mapset, layer)
@@ -200,7 +204,7 @@
if not overwrite:
if connected:
dbif.close()
- core.fatal(_("Map <%s> is already in temporal database,"
+ msgr.fatal(_("Map <%s> is already in temporal database,"
" use overwrite flag to overwrite") % (map_id))
if connected:
Modified: grass/trunk/lib/python/temporal/register.py
===================================================================
--- grass/trunk/lib/python/temporal/register.py 2013-12-04 15:19:34 UTC (rev 58385)
+++ grass/trunk/lib/python/temporal/register.py 2013-12-04 17:14:27 UTC (rev 58386)
@@ -14,7 +14,7 @@
...
@endcode
-(C) 2008-2011 by the GRASS Development Team
+(C) 2012-2013 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
for details.
@@ -390,12 +390,12 @@
msgr.fatal(_("Error in increment computation"))
if map.get_layer():
- msgr.verbose(_("Set absolute valid time for map <%(id)s> with "
+ msgr.debug(1, _("Set absolute valid time for map <%(id)s> with "
"layer %(layer)s to %(start)s - %(end)s") %
{'id': map.get_map_id(), 'layer': map.get_layer(),
'start': str(start_time), 'end': str(end_time)})
else:
- msgr.verbose(_("Set absolute valid time for map <%s> to %s - %s") %
+ msgr.debug(1, _("Set absolute valid time for map <%s> to %s - %s") %
(map.get_map_id(), str(start_time), str(end_time)))
map.set_absolute_time(start_time, end_time, None)
@@ -412,12 +412,12 @@
end_time = start_time + int(increment)
if map.get_layer():
- msgr.verbose(_("Set relative valid time for map <%s> with layer %s "
+ msgr.debug(1, _("Set relative valid time for map <%s> with layer %s "
"to %i - %s with unit %s") %
(map.get_map_id(), map.get_layer(), start_time,
str(end_time), unit))
else:
- msgr.verbose(_("Set relative valid time for map <%s> to %i - %s "
+ msgr.debug(1, _("Set relative valid time for map <%s> to %i - %s "
"with unit %s") % (map.get_map_id(), start_time,
str(end_time), unit))
Modified: grass/trunk/lib/python/temporal/sampling.py
===================================================================
--- grass/trunk/lib/python/temporal/sampling.py 2013-12-04 15:19:34 UTC (rev 58385)
+++ grass/trunk/lib/python/temporal/sampling.py 2013-12-04 17:14:27 UTC (rev 58386)
@@ -14,7 +14,7 @@
...
@endcode
-(C) 2008-2011 by the GRASS Development Team
+(C) 2012-2013 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
for details.
@@ -22,10 +22,8 @@
@author Soeren Gebbert
"""
-from space_time_datasets import *
from factory import *
-
def sample_stds_by_stds_topology(intype, sampletype, inputs, sampler, header,
separator, method, spatial=False,
print_only=True):
@@ -58,6 +56,7 @@
@return The map matrix or None if nothing found
"""
mapset = get_current_mapset()
+ msgr = get_tgis_message_interface()
# Make a method list
if not issubclass(type(method), type([])):
@@ -90,11 +89,11 @@
for st in sts:
if st.is_in_db(dbif) == False:
- core.fatal(_("Dataset <%s> not found in temporal database") % (st.get_id()))
+ msgr.fatal(_("Dataset <%s> not found in temporal database") % (st.get_id()))
st.select(dbif)
if sst.is_in_db(dbif) == False:
- core.fatal(_("Dataset <%s> not found in temporal database") % (sid))
+ msgr.fatal(_("Dataset <%s> not found in temporal database") % (sid))
sst.select(dbif)
Modified: grass/trunk/lib/python/temporal/space_time_datasets.py
===================================================================
--- grass/trunk/lib/python/temporal/space_time_datasets.py 2013-12-04 15:19:34 UTC (rev 58385)
+++ grass/trunk/lib/python/temporal/space_time_datasets.py 2013-12-04 17:14:27 UTC (rev 58386)
@@ -4,7 +4,7 @@
Temporal GIS related functions to be used in Python scripts.
-(C) 2008-2011 by the GRASS Development Team
+(C) 2012-2013 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
for details.
Modified: grass/trunk/lib/python/temporal/spatial_extent.py
===================================================================
--- grass/trunk/lib/python/temporal/spatial_extent.py 2013-12-04 15:19:34 UTC (rev 58385)
+++ grass/trunk/lib/python/temporal/spatial_extent.py 2013-12-04 17:14:27 UTC (rev 58386)
@@ -31,7 +31,7 @@
@endcode
-(C) 2008-2011 by the GRASS Development Team
+(C) 2012-2013 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
for details.
@@ -122,7 +122,7 @@
"""
if self.get_projection() != extent.get_projection():
- core.error(_("Projections are different. Unable to compute "
+ self.msgr.error(_("Projections are different. Unable to compute "
"overlapping_2d for spatial extents"))
return False
@@ -533,7 +533,7 @@
@return True or False
"""
if self.get_projection() != extent.get_projection():
- core.error(_("Projections are different. Unable to compute "
+ self.msgr.error(_("Projections are different. Unable to compute "
"is_in_2d for spatial extents"))
return False
@@ -673,7 +673,7 @@
@return True or False
"""
if self.get_projection() != extent.get_projection():
- core.error(_("Projections are different. Unable to compute "
+ self.msgr.error(_("Projections are different. Unable to compute "
"equivalent_2d for spatial extents"))
return False
@@ -780,7 +780,7 @@
"""
if self.get_projection() != extent.get_projection():
- core.error(_("Projections are different. Unable to compute cover_2d for spatial extents"))
+ self.msgr.error(_("Projections are different. Unable to compute cover_2d for spatial extents"))
return False
# Exclude equivalent_2d
@@ -851,7 +851,7 @@
@return True or False
"""
if self.get_projection() != extent.get_projection():
- core.error(_("Projections are different. Unable to compute "
+ self.msgr.error(_("Projections are different. Unable to compute "
"cover for spatial extents"))
return False
@@ -1701,7 +1701,7 @@
(top == bottom or top - bottom = 1) the area is returned"""
if self.get_projection() == "LL":
- core.error(_("Volume computation is not supported "
+ self.msgr.error(_("Volume computation is not supported "
"for LL projections"))
area = self.get_area()
@@ -1719,7 +1719,7 @@
"""!Compute the area of the extent, extent in z direction is ignored"""
if self.get_projection() == "LL":
- core.error(_("Area computation is not supported "
+ self.msgr.error(_("Area computation is not supported "
"for LL projections"))
bbox = self.get_spatial_extent_as_tuple()
Modified: grass/trunk/lib/python/temporal/spatial_topology_dataset_connector.py
===================================================================
--- grass/trunk/lib/python/temporal/spatial_topology_dataset_connector.py 2013-12-04 15:19:34 UTC (rev 58385)
+++ grass/trunk/lib/python/temporal/spatial_topology_dataset_connector.py 2013-12-04 17:14:27 UTC (rev 58386)
@@ -10,7 +10,7 @@
>>> import grass.temporal as tgis
>>> tmr = tgis.SpatialTopologyDatasetConnector()
-(C) 2008-2011 by the GRASS Development Team
+(C) 2012-2013 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
for details.
@@ -378,4 +378,4 @@
if __name__ == "__main__":
import doctest
- doctest.testmod()
\ No newline at end of file
+ doctest.testmod()
Modified: grass/trunk/lib/python/temporal/spatio_temporal_relationships.py
===================================================================
--- grass/trunk/lib/python/temporal/spatio_temporal_relationships.py 2013-12-04 15:19:34 UTC (rev 58385)
+++ grass/trunk/lib/python/temporal/spatio_temporal_relationships.py 2013-12-04 17:14:27 UTC (rev 58386)
@@ -13,7 +13,7 @@
...
@endcode
-(C) 2008-2011 by the GRASS Development Team
+(C) 2012-2013 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
for details.
Modified: grass/trunk/lib/python/temporal/stds_export.py
===================================================================
--- grass/trunk/lib/python/temporal/stds_export.py 2013-12-04 15:19:34 UTC (rev 58385)
+++ grass/trunk/lib/python/temporal/stds_export.py 2013-12-04 17:14:27 UTC (rev 58386)
@@ -20,7 +20,7 @@
...
@endcode
-(C) 2008-2011 by the GRASS Development Team
+(C) 2012-2013 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
for details.
Modified: grass/trunk/lib/python/temporal/stds_import.py
===================================================================
--- grass/trunk/lib/python/temporal/stds_import.py 2013-12-04 15:19:34 UTC (rev 58385)
+++ grass/trunk/lib/python/temporal/stds_import.py 2013-12-04 17:14:27 UTC (rev 58386)
@@ -24,7 +24,7 @@
...
@endcode
-(C) 2008-2011 by the GRASS Development Team
+(C) 2012-2013 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
for details.
@@ -36,7 +36,6 @@
import os.path
import tarfile
-import core
from space_time_datasets import *
from register import *
import factory
Modified: grass/trunk/lib/python/temporal/temporal_extent.py
===================================================================
--- grass/trunk/lib/python/temporal/temporal_extent.py 2013-12-04 15:19:34 UTC (rev 58385)
+++ grass/trunk/lib/python/temporal/temporal_extent.py 2013-12-04 17:14:27 UTC (rev 58386)
@@ -16,7 +16,7 @@
@endcode
-(C) 2008-2011 by the GRASS Development Team
+(C) 2012-2013 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
for details.
Modified: grass/trunk/lib/python/temporal/temporal_granularity.py
===================================================================
--- grass/trunk/lib/python/temporal/temporal_granularity.py 2013-12-04 15:19:34 UTC (rev 58385)
+++ grass/trunk/lib/python/temporal/temporal_granularity.py 2013-12-04 17:14:27 UTC (rev 58386)
@@ -13,7 +13,7 @@
...
@endcode
-(C) 2008-2011 by the GRASS Development Team
+(C) 2012-2013 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
for details.
Modified: grass/trunk/lib/python/temporal/temporal_topology_dataset_connector.py
===================================================================
--- grass/trunk/lib/python/temporal/temporal_topology_dataset_connector.py 2013-12-04 15:19:34 UTC (rev 58385)
+++ grass/trunk/lib/python/temporal/temporal_topology_dataset_connector.py 2013-12-04 17:14:27 UTC (rev 58386)
@@ -10,7 +10,7 @@
>>> import grass.temporal as tgis
>>> tmr = tgis.TemporalTopologyDatasetConnector()
-(C) 2008-2011 by the GRASS Development Team
+(C) 2012-2013 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
for details.
@@ -597,4 +597,4 @@
if __name__ == "__main__":
import doctest
- doctest.testmod()
\ No newline at end of file
+ doctest.testmod()
Modified: grass/trunk/lib/python/temporal/univar_statistics.py
===================================================================
--- grass/trunk/lib/python/temporal/univar_statistics.py 2013-12-04 15:19:34 UTC (rev 58385)
+++ grass/trunk/lib/python/temporal/univar_statistics.py 2013-12-04 17:14:27 UTC (rev 58386)
@@ -15,7 +15,7 @@
...
@endcode
-(C) 2008-2011 by the GRASS Development Team
+(C) 2012-2013 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
for details.
@@ -23,8 +23,6 @@
@author Soeren Gebbert
"""
-from space_time_datasets import *
-from factory import *
from open_stds import *
###############################################################################
More information about the grass-commit
mailing list