def set_time_info(layer, attribute, end_attribute, presentation, precision_value, precision_step, enabled=True):
 layer = gs_catalog.get_layer(layer.name)
 if (layer is None):
  raise ValueError(('no such layer: %s' % layer.name))
 resource = layer.resource
 resolution = None
 if (precision_value and precision_step):
  resolution = ('%s %s' % (precision_value, precision_step))
 info = DimensionInfo('time', enabled, presentation, resolution, 'ISO8601', None, attribute=attribute, end_attribute=end_attribute)
 metadata = dict((resource.metadata or {}))
 metadata['time'] = info
 resource.metadata = metadata
 gs_catalog.save(resource)

def set_time_info ( layer , attribute , end_attribute , presentation , precision_value , precision_step , enabled = True ) : layer = gs_catalog . get_layer ( layer . name ) if ( layer is None ) : raise ValueError ( ( 'no such layer: %s' % layer . name ) ) resource = layer . resource resolution = None if ( precision_value and precision_step ) : resolution = ( '%s %s' % ( precision_value , precision_step ) ) info = DimensionInfo ( 'time' , enabled , presentation , resolution , 'ISO8601' , None , attribute = attribute , end_attribute = end_attribute ) metadata = dict ( ( resource . metadata or { } ) ) metadata [ 'time' ] = info resource . metadata = metadata gs_catalog . save ( resource )
configure the time dimension for a layer .