Skip to content

Commit 8097dba

Browse files
committed
WIP
1 parent b41d43b commit 8097dba

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

reproject/hips/utils.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,19 @@ def make_tile_folders(*, level, indices, output_directory):
9696
os.makedirs(dirname)
9797

9898

99+
def make_tile_folders_3d(*, spatial_level, spectral_level, spatial_indices, spectral_indices, output_directory):
100+
101+
rounded_spatial_indices = np.unique(_rounded_spatial_index(spatial_indices))
102+
for spatial_index in rounded_spatial_indices:
103+
dirname = os.path.dirname(
104+
tile_filename_3d(spatial_level=spatial_level, spectral_level=spectral_level,
105+
spatial_index=spatial_index, spectral_index=spectral_indices,
106+
output_directory=output_directory, extension="")
107+
)
108+
if not os.path.exists(dirname):
109+
os.makedirs(dirname)
110+
111+
99112
def is_url(directory):
100113
return directory.startswith("http://") or directory.startswith("https://")
101114

0 commit comments

Comments
 (0)