def runSqlOgr(ds,sql,dialect='SQLITE'):
    layer_res=ds.ExecuteSQL(sql,None,dialect)
    return layer_res
def getBoundLayer(ds,name_layer,name_geo_col):
    sql='select Min(MbrMinX('+name_geo_col+")) as minx,Max(MbrMaxX("+name_geo_col+")) as maxx,Min(MbrMinY("+name_geo_col+")) as miny,Max(MbrMaxY("+name_geo_col+")) as maxy from "+name_layer
    layer_res=runSqlOgr(ds,sql)
    if layer_res is None:
        return None,None,None,None
