To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit 1bd4e54a authored by luroth's avatar luroth
Browse files

Adding camera positions to polygons for export

parent b704620b
......@@ -162,6 +162,11 @@ def generate_image_masks_with_DEM():
single_images_coords_all.world_x - single_images_coords_all.X) +
(single_images_coords_all.world_y - single_images_coords_all.Y) *
(single_images_coords_all.world_y - single_images_coords_all.Y))) - np.pi / 2)
single_images_coords_all['camera_pos_world_x'] = single_images_coords_all.X
single_images_coords_all['camera_pos_world_y'] = single_images_coords_all.Y
single_images_coords_all['camera_pos_world_z'] = single_images_coords_all.Z
# Create polygons for geojson files
polygons = []
for index, row in single_images_coords_all.iterrows():
......@@ -175,7 +180,8 @@ def generate_image_masks_with_DEM():
# Geopandas df to allow geojson export
df_single_images_coords = pd.DataFrame(
single_images_coords_all[
['image', 'plot_label', 'type', 'world_x', 'world_y', 'world_z', 'azimuth_angle', 'zenith_angle']])
['image', 'plot_label', 'type', 'world_x', 'world_y', 'world_z', 'azimuth_angle', 'zenith_angle',
'camera_pos_world_x', 'camera_pos_world_y', 'camera_pos_world_z']])
df_single_images_coords['geometry'] = polygons
# Group by image and export files
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment