Example #1
0
def geo_cam_global_to_img(geocam, lon, lat):
    bvxm_batch.init_process("vpglGeoGlobalToImgProcess")
    bvxm_batch.set_input_from_db(0, geocam)
    bvxm_batch.set_input_double(1, lon)
    bvxm_batch.set_input_double(2, lat)
    bvxm_batch.run_process()
    (id, type) = bvxm_batch.commit_output(0)
    u = bvxm_batch.get_output_int(id)
    (id, type) = bvxm_batch.commit_output(1)
    v = bvxm_batch.get_output_int(id)
    return u, v
Example #2
0
def geo_cam_global_to_img(geocam, lon, lat):
    bvxm_batch.init_process("vpglGeoGlobalToImgProcess");
    bvxm_batch.set_input_from_db(0, geocam);
    bvxm_batch.set_input_double(1, lon);
    bvxm_batch.set_input_double(2, lat);
    bvxm_batch.run_process();
    (id, type) = bvxm_batch.commit_output(0);
    u = bvxm_batch.get_output_int(id);
    (id, type) = bvxm_batch.commit_output(1);
    v = bvxm_batch.get_output_int(id);
    return u, v;
Example #3
0
def find_sun_dir_bin(metadata, output_file):
    bvxm_batch.init_process("bradSunDirBinProcess")
    bvxm_batch.set_input_from_db(0, metadata)
    bvxm_batch.set_input_string(1, output_file)
    bvxm_batch.run_process()
    (bin_id, bin_type) = bvxm_batch.commit_output(0)
    bin = bvxm_batch.get_output_int(bin_id)
    return bin
Example #4
0
def find_sun_dir_bin(metadata, output_file):
  bvxm_batch.init_process("bradSunDirBinProcess");
  bvxm_batch.set_input_from_db(0,metadata)
  bvxm_batch.set_input_string(1,output_file);
  bvxm_batch.run_process();
  (bin_id,bin_type)=bvxm_batch.commit_output(0);
  bin = bvxm_batch.get_output_int(bin_id);
  return bin
Example #5
0
def utm_coords(lon, lat):
    bvxm_batch.init_process("vpglComputeUTMZoneProcess")
    bvxm_batch.set_input_double(0, lon)
    bvxm_batch.set_input_double(1, lat)
    result = bvxm_batch.run_process()
    if result:
        (id, type) = bvxm_batch.commit_output(0)
        x = bvxm_batch.get_output_double(id)
        (id, type) = bvxm_batch.commit_output(1)
        y = bvxm_batch.get_output_double(id)
        (id, type) = bvxm_batch.commit_output(2)
        utm_zone = bvxm_batch.get_output_int(id)
        (id, type) = bvxm_batch.commit_output(3)
        northing = bvxm_batch.get_output_int(id)
        return x, y, utm_zone, northing
    else:
        return 0.0, 0.0, 0, 0
Example #6
0
def utm_coords(lon, lat):
    bvxm_batch.init_process("vpglComputeUTMZoneProcess")
    bvxm_batch.set_input_double(0, lon)
    bvxm_batch.set_input_double(1, lat)
    result = bvxm_batch.run_process()
    if result:
        (id, type) = bvxm_batch.commit_output(0)
        x = bvxm_batch.get_output_double(id)
        (id, type) = bvxm_batch.commit_output(1)
        y = bvxm_batch.get_output_double(id)
        (id, type) = bvxm_batch.commit_output(2)
        utm_zone = bvxm_batch.get_output_int(id)
        (id, type) = bvxm_batch.commit_output(3)
        northing = bvxm_batch.get_output_int(id)
        return x, y, utm_zone, northing
    else:
        return 0.0, 0.0, 0, 0
Example #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
Example #8
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
Example #9
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
Example #10
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