-
Notifications
You must be signed in to change notification settings - Fork 1
/
build_raw_tile_index_for_neighborhood.m
32 lines (30 loc) · 1.89 KB
/
build_raw_tile_index_for_neighborhood.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
function tile_index = build_raw_tile_index_for_neighborhood(raw_tile_root_folder_path, center_tile_relative_path, sample_memo_folder_path, do_force_computation)
% Build the full tile index
raw_tile_index = compute_or_read_from_memo(sample_memo_folder_path, ...
'raw-tile-index', ...
@()(build_raw_tile_index(raw_tile_root_folder_path)), ...
do_force_computation) ;
full_tile_index_from_full_tile_ijk1 = raw_tile_index.tile_index_from_tile_ijk1 ;
full_tile_ijk1_from_full_tile_index = raw_tile_index.ijk1_from_tile_index ;
xyz_from_full_tile_index = raw_tile_index.xyz_from_tile_index ;
relative_path_from_full_tile_index = raw_tile_index.relative_path_from_tile_index ;
%full_tile_grid_shape = size(full_tile_index_from_full_tile_ijk1)
%full_tile_count = length(relative_path_from_full_tile_index)
% Get out just the tiles around the center_tile
[tile_index_from_tile_ijk1, ...
tile_ijk1_from_tile_index, ...
xyz_from_tile_index, ...
relative_path_from_tile_index] = ...
extract_tiles_near_tile(full_tile_index_from_full_tile_ijk1, ...
full_tile_ijk1_from_full_tile_index, ...
xyz_from_full_tile_index, ...
relative_path_from_full_tile_index, ...
center_tile_relative_path) ;
%tile_count = length(relative_path_from_tile_index)
% Store the tile subset indices in a single structure
tile_index = struct() ;
tile_index.tile_index_from_tile_ijk1 = tile_index_from_tile_ijk1 ;
tile_index.ijk1_from_tile_index = tile_ijk1_from_tile_index ;
tile_index.xyz_from_tile_index = xyz_from_tile_index ;
tile_index.relative_path_from_tile_index = relative_path_from_tile_index ;
end