예제 #1
0
def create_scene_large_scale(roi_kml,
                             scene_root,
                             world_dir,
                             dem_folder,
                             world_size=500.0,
                             voxel_size=1.0,
                             height_diff=120.0,
                             height_sub=25.0,
                             extension=500.0,
                             land_folder=""):
    batch.init_process("bvxmCreateSceneXmlLargeScaleProcess")
    batch.set_input_string(0, roi_kml)
    batch.set_input_string(1, scene_root)
    batch.set_input_string(2, world_dir)
    batch.set_input_string(3, dem_folder)
    batch.set_input_string(4, land_folder)
    batch.set_input_float(5, world_size)
    batch.set_input_float(6, voxel_size)
    batch.set_input_float(7, height_diff)
    batch.set_input_float(8, height_sub)
    batch.set_input_float(9, extension)
    status = batch.run_process()
    if status:
        (id, type) = batch.commit_output(0)
        n_scenes = batch.get_output_unsigned(id)
        batch.remove_data(id)
        return n_scenes
    else:
        return 0
예제 #2
0
def model_dir(scene):
    batch.init_process("bvxmSceneModelDirProcess")
    batch.set_input_from_db(0, scene)
    batch.run_process()
    (id, type) = batch.commit_output(0)
    model_dir = batch.get_output_string(id)
    batch.remove_data(id)
    return model_dir
예제 #3
0
def model_dir(scene):
    batch.init_process("bvxmSceneModelDirProcess")
    batch.set_input_from_db(0, scene)
    batch.run_process()
    (id, type) = batch.commit_output(0)
    model_dir = batch.get_output_string(id)
    batch.remove_data(id)
    return model_dir
예제 #4
0
def image_mean(img):
  bvxm_batch.init_process("vilImageMeanProcess")
  bvxm_batch.set_input_from_db(0,img)
  bvxm_batch.run_process()
  (id,type) = bvxm_batch.commit_output(0)
  mean_val = bvxm_batch.get_output_float(id)
  bvxm_batch.remove_data(id)
  return mean_val
예제 #5
0
def image_mean(img):
    bvxm_batch.init_process("vilImageMeanProcess")
    bvxm_batch.set_input_from_db(0, img)
    bvxm_batch.run_process()
    (id, type) = bvxm_batch.commit_output(0)
    mean_val = bvxm_batch.get_output_float(id)
    bvxm_batch.remove_data(id)
    return mean_val
예제 #6
0
def bvxm_load_image(file_path) :
  bvxm_batch.init_process("vilLoadImageViewProcess");
  bvxm_batch.set_input_string(0, file_path);
  bvxm_batch.run_process();
  (id,type) = bvxm_batch.commit_output(0);
  (ni_id, ni_type) = bvxm_batch.commit_output(1);
  (nj_id, nj_type) = bvxm_batch.commit_output(2);
  ni = bvxm_batch.get_output_unsigned(ni_id);
  nj = bvxm_batch.get_output_unsigned(nj_id);
  img = dbvalue(id,type);
  bvxm_batch.remove_data(ni_id)
  bvxm_batch.remove_data(nj_id)
  return img, ni, nj;
예제 #7
0
def bvxm_load_image(file_path):
    bvxm_batch.init_process("vilLoadImageViewProcess")
    bvxm_batch.set_input_string(0, file_path)
    bvxm_batch.run_process()
    (id, type) = bvxm_batch.commit_output(0)
    (ni_id, ni_type) = bvxm_batch.commit_output(1)
    (nj_id, nj_type) = bvxm_batch.commit_output(2)
    ni = bvxm_batch.get_output_unsigned(ni_id)
    nj = bvxm_batch.get_output_unsigned(nj_id)
    img = dbvalue(id, type)
    bvxm_batch.remove_data(ni_id)
    bvxm_batch.remove_data(nj_id)
    return img, ni, nj
예제 #8
0
def bvxm_load_image_resource(file_path) :
  bvxm_batch.init_process("vilLoadImageResourceProcess");
  bvxm_batch.set_input_string(0, file_path);
  bvxm_batch.run_process();
  (id,type) = bvxm_batch.commit_output(0);
  (ni_id, ni_type) = bvxm_batch.commit_output(1);
  (nj_id, nj_type) = bvxm_batch.commit_output(2);
  ni = bvxm_batch.get_output_unsigned(ni_id);
  nj = bvxm_batch.get_output_unsigned(nj_id);
  img = dbvalue(id,type);
  bvxm_batch.remove_data(ni_id)
  bvxm_batch.remove_data(nj_id)
  return img, ni, nj;
예제 #9
0
def bvxm_load_image_resource(file_path):
    bvxm_batch.init_process("vilLoadImageResourceProcess")
    bvxm_batch.set_input_string(0, file_path)
    bvxm_batch.run_process()
    (id, type) = bvxm_batch.commit_output(0)
    (ni_id, ni_type) = bvxm_batch.commit_output(1)
    (nj_id, nj_type) = bvxm_batch.commit_output(2)
    ni = bvxm_batch.get_output_unsigned(ni_id)
    nj = bvxm_batch.get_output_unsigned(nj_id)
    img = dbvalue(id, type)
    bvxm_batch.remove_data(ni_id)
    bvxm_batch.remove_data(nj_id)
    return img, ni, nj
예제 #10
0
def bvxm_load_image_resource(file_path):
    bvxm_batch.init_process("vilLoadImageResourceProcess")
    bvxm_batch.set_input_string(0, file_path)
    status = bvxm_batch.run_process()
    if not status:
      return None, 0, 0
    (id, type) = bvxm_batch.commit_output(0)
    (ni_id, ni_type) = bvxm_batch.commit_output(1)
    (nj_id, nj_type) = bvxm_batch.commit_output(2)
    ni = bvxm_batch.get_output_unsigned(ni_id)
    nj = bvxm_batch.get_output_unsigned(nj_id)
    img = dbvalue(id, type)
    bvxm_batch.remove_data(ni_id)
    bvxm_batch.remove_data(nj_id)
    return img, ni, nj
예제 #11
0
def bvxm_load_image(file_path):
    bvxm_batch.init_process("vilLoadImageViewProcess")
    bvxm_batch.set_input_string(0, file_path)
    status = bvxm_batch.run_process()
    if not status:
        return None, 0, 0
    (id, type) = bvxm_batch.commit_output(0)
    (ni_id, ni_type) = bvxm_batch.commit_output(1)
    (nj_id, nj_type) = bvxm_batch.commit_output(2)
    ni = bvxm_batch.get_output_unsigned(ni_id)
    nj = bvxm_batch.get_output_unsigned(nj_id)
    img = dbvalue(id, type)
    bvxm_batch.remove_data(ni_id)
    bvxm_batch.remove_data(nj_id)
    return img, ni, nj
예제 #12
0
def create_scene_large_scale(roi_kml, scene_root, world_dir, dem_folder, world_size=500.0, voxel_size=1.0, height_diff=120.0, height_sub=25.0, extension = 500.0, land_folder=""):
    batch.init_process("bvxmCreateSceneXmlLargeScaleProcess")
    batch.set_input_string(0, roi_kml)
    batch.set_input_string(1, scene_root)
    batch.set_input_string(2, world_dir)
    batch.set_input_string(3, dem_folder)
    batch.set_input_string(4, land_folder)
    batch.set_input_float(5, world_size)
    batch.set_input_float(6, voxel_size)
    batch.set_input_float(7, height_diff)
    batch.set_input_float(8, height_sub)
    batch.set_input_float(9, extension)
    status = batch.run_process()
    if status:
        (id, type) = batch.commit_output(0)
        n_scenes = batch.get_output_unsigned(id)
        batch.remove_data(id)
        return n_scenes
    else:
        return 0
예제 #13
0
def scene_origin(scene):
    batch.init_process("bvxmSceneOriginProcess")
    batch.set_input_from_db(0, scene)
    batch.run_process()
    (id, type) = batch.commit_output(0)
    lower_left_lon = batch.get_output_double(id)
    batch.remove_data(id)
    (id, type) = batch.commit_output(1)
    lower_left_lat = batch.get_output_double(id)
    batch.remove_data(id)
    (id, type) = batch.commit_output(2)
    lower_left_z = batch.get_output_double(id)
    batch.remove_data(id)
    return lower_left_lon, lower_left_lat, lower_left_z
예제 #14
0
def scene_origin(scene):
    batch.init_process("bvxmSceneOriginProcess")
    batch.set_input_from_db(0, scene)
    batch.run_process()
    (id, type) = batch.commit_output(0)
    lower_left_lon = batch.get_output_double(id)
    batch.remove_data(id)
    (id, type) = batch.commit_output(1)
    lower_left_lat = batch.get_output_double(id)
    batch.remove_data(id)
    (id, type) = batch.commit_output(2)
    lower_left_z = batch.get_output_double(id)
    batch.remove_data(id)
    return lower_left_lon, lower_left_lat, lower_left_z
예제 #15
0
def remove_data(id):
    bvxm_batch.remove_data(id)
예제 #16
0
def scene_local_box(scene):
    batch.init_process("bvxmSceneLocalBoxProcess")
    batch.set_input_from_db(0, scene)
    batch.run_process()
    (id, type) = batch.commit_output(0)
    lower_left_x = batch.get_output_double(id)
    batch.remove_data(id)
    (id, type) = batch.commit_output(1)
    lower_left_y = batch.get_output_double(id)
    batch.remove_data(id)
    (id, type) = batch.commit_output(2)
    upper_right_x = batch.get_output_double(id)
    batch.remove_data(id)
    (id, type) = batch.commit_output(3)
    upper_right_y = batch.get_output_double(id)
    batch.remove_data(id)
    (id, type) = batch.commit_output(4)
    voxel_size = batch.get_output_double(id)
    batch.remove_data(id)
    (id, type) = batch.commit_output(5)
    lower_left_z = batch.get_output_double(id)  # min z
    batch.remove_data(id)
    (id, type) = batch.commit_output(6)
    upper_right_z = batch.get_output_double(id)  # max z
    batch.remove_data(id)
    return lower_left_x, lower_left_y, upper_right_x, upper_right_y, voxel_size, lower_left_z, upper_right_z
예제 #17
0
def scene_box(scene):
    batch.init_process("bvxmSceneBoxProcess")
    batch.set_input_from_db(0, scene)
    batch.run_process()
    (id, type) = batch.commit_output(0)
    lower_left_lon = batch.get_output_double(id)
    batch.remove_data(id)
    (id, type) = batch.commit_output(1)
    lower_left_lat = batch.get_output_double(id)
    batch.remove_data(id)
    (id, type) = batch.commit_output(2)
    lower_left_elev = batch.get_output_double(id)
    batch.remove_data(id)
    (id, type) = batch.commit_output(3)
    upper_right_lon = batch.get_output_double(id)
    batch.remove_data(id)
    (id, type) = batch.commit_output(4)
    upper_right_lat = batch.get_output_double(id)
    batch.remove_data(id)
    (id, type) = batch.commit_output(5)
    upper_right_elev = batch.get_output_double(id)
    batch.remove_data(id)
    return lower_left_lon, lower_left_lat, lower_left_elev, upper_right_lon, upper_right_lat, upper_right_elev
예제 #18
0
def scene_box(scene):
    batch.init_process("bvxmSceneBoxProcess")
    batch.set_input_from_db(0, scene)
    batch.run_process()
    (id, type) = batch.commit_output(0)
    lower_left_lon = batch.get_output_double(id)
    batch.remove_data(id)
    (id, type) = batch.commit_output(1)
    lower_left_lat = batch.get_output_double(id)
    batch.remove_data(id)
    (id, type) = batch.commit_output(2)
    lower_left_elev = batch.get_output_double(id)
    batch.remove_data(id)
    (id, type) = batch.commit_output(3)
    upper_right_lon = batch.get_output_double(id)
    batch.remove_data(id)
    (id, type) = batch.commit_output(4)
    upper_right_lat = batch.get_output_double(id)
    batch.remove_data(id)
    (id, type) = batch.commit_output(5)
    upper_right_elev = batch.get_output_double(id)
    batch.remove_data(id)
    return lower_left_lon, lower_left_lat, lower_left_elev, upper_right_lon, upper_right_lat, upper_right_elev
예제 #19
0
def remove_data(id):
    bvxm_batch.remove_data(id)
예제 #20
0
def scene_local_box(scene):
    batch.init_process("bvxmSceneLocalBoxProcess")
    batch.set_input_from_db(0, scene)
    batch.run_process()
    (id, type) = batch.commit_output(0)
    lower_left_x = batch.get_output_double(id)
    batch.remove_data(id)
    (id, type) = batch.commit_output(1)
    lower_left_y = batch.get_output_double(id)
    batch.remove_data(id)
    (id, type) = batch.commit_output(2)
    upper_right_x = batch.get_output_double(id)
    batch.remove_data(id)
    (id, type) = batch.commit_output(3)
    upper_right_y = batch.get_output_double(id)
    batch.remove_data(id)
    (id, type) = batch.commit_output(4)
    voxel_size = batch.get_output_double(id)
    batch.remove_data(id)
    (id, type) = batch.commit_output(5)
    lower_left_z = batch.get_output_double(id)  # min z
    batch.remove_data(id)
    (id, type) = batch.commit_output(6)
    upper_right_z = batch.get_output_double(id)  # max z
    batch.remove_data(id)
    return lower_left_x, lower_left_y, upper_right_x, upper_right_y, voxel_size, lower_left_z, upper_right_z