Beispiel #1
0
def pick_nadir_resource_pair(res,
                             lower_left_lon,
                             lower_left_lat,
                             upper_right_lon,
                             upper_right_lat,
                             satellite_name,
                             out_folder,
                             band_name="PAN",
                             non_cloud_folder=""):
    bvxm_batch.init_process("volmPickNadirResPairProcess")
    bvxm_batch.set_input_from_db(0, res)
    bvxm_batch.set_input_double(1, lower_left_lon)
    bvxm_batch.set_input_double(2, lower_left_lat)
    bvxm_batch.set_input_double(3, upper_right_lon)
    bvxm_batch.set_input_double(4, upper_right_lat)
    bvxm_batch.set_input_string(5, band_name)
    bvxm_batch.set_input_string(6, satellite_name)
    bvxm_batch.set_input_string(7, non_cloud_folder)
    bvxm_batch.set_input_string(8, out_folder)
    statuscode = bvxm_batch.run_process()
    if statuscode:
        (p_id, p_type) = bvxm_batch.commit_output(0)
        pan_path = bvxm_batch.get_output_string(p_id)
        bvxm_batch.remove_data(p_id)
        (m_id, m_type) = bvxm_batch.commit_output(1)
        multi_path = bvxm_batch.get_output_string(m_id)
        bvxm_batch.remove_data(m_id)
    else:
        pan_path = ""
        multi_path = ""
    return statuscode, pan_path, multi_path
def find_resource_pair(res, name):
    bvxm_batch.init_process("volmFindResourcePairProcess")
    bvxm_batch.set_input_from_db(0, res)
    bvxm_batch.set_input_string(1, name)
    statuscode = bvxm_batch.run_process()
    (f_id, f_type) = bvxm_batch.commit_output(0)
    full_path = bvxm_batch.get_output_string(f_id)
    bvxm_batch.remove_data(f_id)
    (n_id, n_type) = bvxm_batch.commit_output(1)
    pair_name = bvxm_batch.get_output_string(n_id)
    bvxm_batch.remove_data(n_id)
    (p_id, p_type) = bvxm_batch.commit_output(2)
    full_path_pair_name = bvxm_batch.get_output_string(p_id)
    bvxm_batch.remove_data(p_id)
    return statuscode, full_path, pair_name, full_path_pair_name
Beispiel #3
0
def find_resource_pair(res, name):
  bvxm_batch.init_process("volmFindResourcePairProcess");
  bvxm_batch.set_input_from_db(0,res);
  bvxm_batch.set_input_string(1,name);
  statuscode=bvxm_batch.run_process();
  (f_id, f_type) = bvxm_batch.commit_output(0);
  full_path = bvxm_batch.get_output_string(f_id);
  bvxm_batch.remove_data(f_id);
  (n_id, n_type) = bvxm_batch.commit_output(1);
  pair_name = bvxm_batch.get_output_string(n_id);
  bvxm_batch.remove_data(n_id);
  (p_id, p_type) = bvxm_batch.commit_output(2);
  full_path_pair_name = bvxm_batch.get_output_string(p_id);
  bvxm_batch.remove_data(p_id);
  return statuscode, full_path, pair_name, full_path_pair_name
Beispiel #4
0
def get_metadata_info(mdata):
    bvxm_batch.init_process("bradGetMetaDataInfoProcess")
    bvxm_batch.set_input_from_db(0, mdata)
    bvxm_batch.run_process()
    (id, type) = bvxm_batch.commit_output(0)
    sun_az = bvxm_batch.get_output_float(id)
    bvxm_batch.remove_data(id)
    (id, type) = bvxm_batch.commit_output(1)
    sun_el = bvxm_batch.get_output_float(id)
    bvxm_batch.remove_data(id)
    (id, type) = bvxm_batch.commit_output(2)
    year = bvxm_batch.get_output_int(id)
    bvxm_batch.remove_data(id)
    (id, type) = bvxm_batch.commit_output(3)
    month = bvxm_batch.get_output_int(id)
    bvxm_batch.remove_data(id)
    (id, type) = bvxm_batch.commit_output(4)
    day = bvxm_batch.get_output_int(id)
    bvxm_batch.remove_data(id)
    (id, type) = bvxm_batch.commit_output(5)
    hour = bvxm_batch.get_output_int(id)
    bvxm_batch.remove_data(id)
    (id, type) = bvxm_batch.commit_output(6)
    minutes = bvxm_batch.get_output_int(id)
    bvxm_batch.remove_data(id)
    (id, type) = bvxm_batch.commit_output(7)
    seconds = bvxm_batch.get_output_int(id)
    bvxm_batch.remove_data(id)
    (id, type) = bvxm_batch.commit_output(8)
    gsd = bvxm_batch.get_output_float(id)
    bvxm_batch.remove_data(id)
    (id, type) = bvxm_batch.commit_output(9)
    sat_name = bvxm_batch.get_output_string(id)
    bvxm_batch.remove_data(id)
    return sun_az, sun_el, year, month, day, hour, minutes, seconds, gsd, sat_name
Beispiel #5
0
def model_dir(scene):
  bvxm_batch.init_process("bvxmSceneModelDirProcess");
  bvxm_batch.set_input_from_db(0, scene);
  bvxm_batch.run_process();
  (id, type) = bvxm_batch.commit_output(0);
  model_dir = bvxm_batch.get_output_string(id);
  return model_dir;
Beispiel #6
0
def model_dir(scene):
    bvxm_batch.init_process("bvxmSceneModelDirProcess")
    bvxm_batch.set_input_from_db(0, scene)
    bvxm_batch.run_process()
    (id, type) = bvxm_batch.commit_output(0)
    model_dir = bvxm_batch.get_output_string(id)
    return model_dir
Beispiel #7
0
def get_metadata_info(mdata):
  bvxm_batch.init_process("bradGetMetaDataInfoProcess")
  bvxm_batch.set_input_from_db(0, mdata)
  bvxm_batch.run_process()
  (id,type) = bvxm_batch.commit_output(0)
  sun_az = bvxm_batch.get_output_float(id)
  bvxm_batch.remove_data(id)
  (id,type) = bvxm_batch.commit_output(1)
  sun_el = bvxm_batch.get_output_float(id)
  bvxm_batch.remove_data(id)
  (id, type) = bvxm_batch.commit_output(2)
  year = bvxm_batch.get_output_int(id)
  bvxm_batch.remove_data(id)
  (id, type) = bvxm_batch.commit_output(3)
  month = bvxm_batch.get_output_int(id)
  bvxm_batch.remove_data(id)
  (id, type) = bvxm_batch.commit_output(4)
  day = bvxm_batch.get_output_int(id)
  bvxm_batch.remove_data(id)
  (id, type) = bvxm_batch.commit_output(5)
  hour = bvxm_batch.get_output_int(id)
  bvxm_batch.remove_data(id)
  (id, type) = bvxm_batch.commit_output(6)
  minutes = bvxm_batch.get_output_int(id)
  bvxm_batch.remove_data(id)
  (id, type) = bvxm_batch.commit_output(7)
  seconds = bvxm_batch.get_output_int(id)
  bvxm_batch.remove_data(id)
  (id, type) = bvxm_batch.commit_output(8)
  gsd = bvxm_batch.get_output_float(id)
  bvxm_batch.remove_data(id)
  (id, type) = bvxm_batch.commit_output(9)
  sat_name = bvxm_batch.get_output_string(id)
  bvxm_batch.remove_data(id)
  return sun_az, sun_el, year, month, day, hour, minutes, seconds, gsd, sat_name
Beispiel #8
0
def find_resource_pair(res, name, tol=10.0):
    bvxm_batch.init_process("volmFindResourcePairProcess")
    bvxm_batch.set_input_from_db(0, res)
    bvxm_batch.set_input_string(1, name)
    bvxm_batch.set_input_double(2, tol)
    statuscode = bvxm_batch.run_process()
    (f_id, f_type) = bvxm_batch.commit_output(0)
    full_path = bvxm_batch.get_output_string(f_id)
    bvxm_batch.remove_data(f_id)
    (n_id, n_type) = bvxm_batch.commit_output(1)
    pair_name = bvxm_batch.get_output_string(n_id)
    bvxm_batch.remove_data(n_id)
    (p_id, p_type) = bvxm_batch.commit_output(2)
    full_path_pair_name = bvxm_batch.get_output_string(p_id)
    bvxm_batch.remove_data(p_id)
    return statuscode, full_path, pair_name, full_path_pair_name
Beispiel #9
0
def get_full_path(res, name):
    bvxm_batch.init_process("volmGetFullPathProcess")
    bvxm_batch.set_input_from_db(0, res)
    bvxm_batch.set_input_string(1, name)
    statuscode = bvxm_batch.run_process()
    (f_id, f_type) = bvxm_batch.commit_output(0)
    full_path = bvxm_batch.get_output_string(f_id)
    bvxm_batch.remove_data(f_id)
    return full_path
Beispiel #10
0
def get_full_path(res, name):
  bvxm_batch.init_process("volmGetFullPathProcess");
  bvxm_batch.set_input_from_db(0,res);
  bvxm_batch.set_input_string(1,name);
  statuscode=bvxm_batch.run_process();
  (f_id, f_type) = bvxm_batch.commit_output(0);
  full_path = bvxm_batch.get_output_string(f_id);
  bvxm_batch.remove_data(f_id);
  return full_path
Beispiel #11
0
def pick_nadir_resource(res, lower_left_lon, lower_left_lat, upper_right_lon, upper_right_lat, satellite_name, band_name="PAN"):
  bvxm_batch.init_process("volmPickNadirResProcess");
  bvxm_batch.set_input_from_db(0,res);
  bvxm_batch.set_input_double(1, lower_left_lon);
  bvxm_batch.set_input_double(2, lower_left_lat);
  bvxm_batch.set_input_double(3, upper_right_lon);
  bvxm_batch.set_input_double(4, upper_right_lat);
  bvxm_batch.set_input_string(5, band_name);
  bvxm_batch.set_input_string(6, satellite_name);
  bvxm_batch.run_process();
  (id, type) = bvxm_batch.commit_output(0);
  sat_path = bvxm_batch.get_output_string(id);
  return sat_path;
Beispiel #12
0
def pick_nadir_resource_pair(res, lower_left_lon, lower_left_lat, upper_right_lon, upper_right_lat, satellite_name, out_folder, band_name="PAN", non_cloud_folder=""):
  bvxm_batch.init_process("volmPickNadirResPairProcess");
  bvxm_batch.set_input_from_db(0,res);
  bvxm_batch.set_input_double(1, lower_left_lon);
  bvxm_batch.set_input_double(2, lower_left_lat);
  bvxm_batch.set_input_double(3, upper_right_lon);
  bvxm_batch.set_input_double(4, upper_right_lat);
  bvxm_batch.set_input_string(5, band_name);
  bvxm_batch.set_input_string(6, satellite_name);
  bvxm_batch.set_input_string(7, non_cloud_folder);
  bvxm_batch.set_input_string(8, out_folder)
  statuscode = bvxm_batch.run_process();
  if statuscode:
    (p_id, p_type) = bvxm_batch.commit_output(0);
    pan_path = bvxm_batch.get_output_string(p_id);
    bvxm_batch.remove_data(p_id);
    (m_id, m_type) = bvxm_batch.commit_output(1);
    multi_path = bvxm_batch.get_output_string(m_id);
    bvxm_batch.remove_data(m_id);
  else:
    pan_path = "";
    multi_path = "";
  return statuscode, pan_path, multi_path
Beispiel #13
0
def pick_nadir_resource(res,
                        lower_left_lon,
                        lower_left_lat,
                        upper_right_lon,
                        upper_right_lat,
                        satellite_name,
                        band_name="PAN"):
    bvxm_batch.init_process("volmPickNadirResProcess")
    bvxm_batch.set_input_from_db(0, res)
    bvxm_batch.set_input_double(1, lower_left_lon)
    bvxm_batch.set_input_double(2, lower_left_lat)
    bvxm_batch.set_input_double(3, upper_right_lon)
    bvxm_batch.set_input_double(4, upper_right_lat)
    bvxm_batch.set_input_string(5, band_name)
    bvxm_batch.set_input_string(6, satellite_name)
    bvxm_batch.run_process()
    (id, type) = bvxm_batch.commit_output(0)
    sat_path = bvxm_batch.get_output_string(id)
    return sat_path
Beispiel #14
0
def get_view_angles(mdata):
    bvxm_batch.init_process("bradGetMetaDataInfoProcess")
    bvxm_batch.set_input_from_db(0, mdata)
    bvxm_batch.run_process()
    (id, type) = bvxm_batch.commit_output(0)
    sun_az = bvxm_batch.get_output_float(id)
    bvxm_batch.remove_data(id)
    (id, type) = bvxm_batch.commit_output(1)
    sun_el = bvxm_batch.get_output_float(id)
    bvxm_batch.remove_data(id)
    (id, type) = bvxm_batch.commit_output(2)
    year = bvxm_batch.get_output_int(id)
    bvxm_batch.remove_data(id)
    (id, type) = bvxm_batch.commit_output(3)
    month = bvxm_batch.get_output_int(id)
    bvxm_batch.remove_data(id)
    (id, type) = bvxm_batch.commit_output(4)
    day = bvxm_batch.get_output_int(id)
    bvxm_batch.remove_data(id)
    (id, type) = bvxm_batch.commit_output(5)
    hour = bvxm_batch.get_output_int(id)
    bvxm_batch.remove_data(id)
    (id, type) = bvxm_batch.commit_output(6)
    minutes = bvxm_batch.get_output_int(id)
    bvxm_batch.remove_data(id)
    (id, type) = bvxm_batch.commit_output(7)
    seconds = bvxm_batch.get_output_int(id)
    bvxm_batch.remove_data(id)
    (id, type) = bvxm_batch.commit_output(8)
    gsd = bvxm_batch.get_output_float(id)
    bvxm_batch.remove_data(id)
    (id, type) = bvxm_batch.commit_output(9)
    sat_name = bvxm_batch.get_output_string(id)
    bvxm_batch.remove_data(id)
    (id, type) = bvxm_batch.commit_output(10)
    view_az = bvxm_batch.get_output_float(id)
    bvxm_batch.remove_data(id)
    (id, type) = bvxm_batch.commit_output(11)
    view_el = bvxm_batch.get_output_float(id)
    bvxm_batch.remove_data(id)
    return view_az, view_el
Beispiel #15
0
def get_view_angles(mdata):
  bvxm_batch.init_process("bradGetMetaDataInfoProcess")
  bvxm_batch.set_input_from_db(0, mdata)
  bvxm_batch.run_process()
  (id,type) = bvxm_batch.commit_output(0)
  sun_az = bvxm_batch.get_output_float(id)
  bvxm_batch.remove_data(id)
  (id,type) = bvxm_batch.commit_output(1)
  sun_el = bvxm_batch.get_output_float(id)
  bvxm_batch.remove_data(id)
  (id, type) = bvxm_batch.commit_output(2)
  year = bvxm_batch.get_output_int(id)
  bvxm_batch.remove_data(id)
  (id, type) = bvxm_batch.commit_output(3)
  month = bvxm_batch.get_output_int(id)
  bvxm_batch.remove_data(id)
  (id, type) = bvxm_batch.commit_output(4)
  day = bvxm_batch.get_output_int(id)
  bvxm_batch.remove_data(id)
  (id, type) = bvxm_batch.commit_output(5)
  hour = bvxm_batch.get_output_int(id)
  bvxm_batch.remove_data(id)
  (id, type) = bvxm_batch.commit_output(6)
  minutes = bvxm_batch.get_output_int(id)
  bvxm_batch.remove_data(id)
  (id, type) = bvxm_batch.commit_output(7)
  seconds = bvxm_batch.get_output_int(id)
  bvxm_batch.remove_data(id)
  (id, type) = bvxm_batch.commit_output(8)
  gsd = bvxm_batch.get_output_float(id)
  bvxm_batch.remove_data(id)
  (id, type) = bvxm_batch.commit_output(9)
  sat_name = bvxm_batch.get_output_string(id)
  bvxm_batch.remove_data(id)
  (id, type) = bvxm_batch.commit_output(10)
  view_az = bvxm_batch.get_output_float(id)
  bvxm_batch.remove_data(id)
  (id, type) = bvxm_batch.commit_output(11)
  view_el = bvxm_batch.get_output_float(id)
  bvxm_batch.remove_data(id)
  return view_az, view_el