Example #1
0
def save(x, y, layer, source, acquired, data, data_type, data_fill, data_range, data_scale, data_shape, **kwargs):
    """Save"""
    # logger.debug("Saving <%s,%s> (%s:%s) @ %s - %s" %
    #              (x, y, layer, source, acquired, data_type))
    parameters = (x, y, layer, source, acquired, data,
                  data_type, data_fill, data_range, data_scale, data_shape)
    return session.execute(SAVE, parameters)
Example #2
0
def save(x, y, layer, source, acquired, data, data_type, data_fill, data_range,
         data_scale, data_shape, **kwargs):
    """Save"""
    # logger.debug("Saving <%s,%s> (%s:%s) @ %s - %s" %
    #              (x, y, layer, source, acquired, data_type))
    parameters = (x, y, layer, source, acquired, data, data_type, data_fill,
                  data_range, data_scale, data_shape)
    return session.execute(SAVE, parameters)
Example #3
0
def find(x, y, layer, t1, t2):
    """Find a tile containing x, y.

    This does not post-process results. It returns a list of rows results
    that can be further processed. This means that the data blob isn't even
    a usable array.
    """
    logger.debug("find <%s,%s> (%s) @ %s-%s." % (layer, x, y, t1, t2))
    t1 = datetime.strptime(t1, "%Y-%m-%d")
    t2 = datetime.strptime(t2, "%Y-%m-%d")
    parameters = (x, y, layer, t1, t2)
    results = session.execute(FIND, parameters)
    return results
Example #4
0
def find(x, y, layer, t1, t2):
    """Find a tile containing x, y.

    This does not post-process results. It returns a list of rows results
    that can be further processed. This means that the data blob isn't even
    a usable array.
    """
    logger.debug("find <%s,%s> (%s) @ %s-%s." % (layer, x, y, t1, t2))
    t1 = datetime.strptime(t1, "%Y-%m-%d")
    t2 = datetime.strptime(t2, "%Y-%m-%d")
    parameters = (x, y, layer, t1, t2)
    results = session.execute(FIND, parameters)
    return results