Skip to content
Snippets Groups Projects
Commit 07fad50d authored by Lionel GUEZ's avatar Lionel GUEZ
Browse files

Manage empty shapefiles

parent 1c3872f0
No related branches found
No related tags found
No related merge requests found
......@@ -58,7 +58,13 @@ class SHPC_class:
else:
orientation = def_orient
d_init_slice = reader[orientation]["extremum"].record(0).date
if len(reader[orientation]["extremum"]) != 0:
d_init_slice = reader[orientation]["extremum"].record(0).date
else:
print(f"__init__: Empty shapefile: {my_shapefile}",
file = sys.stderr)
d_init_slice = None
self.d_init.append(d_init_slice)
self._n_dates = np.zeros(self.n_slices, dtype = int)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment