Skip to content
Snippets Groups Projects

Feature/allow null value for default val in interpolation point cloud

Merged Jean-Marie Kerloch requested to merge feature/allow_null_value_for_default_val into develop
4 files
+ 68
7
Compare changes
  • Side-by-side
  • Inline
Files
4
@@ -96,7 +96,7 @@ def interpolate_parser(subparser):
parser.add_argument(
"--default-value",
default=0.0,
default=None,
type=float,
help="This value will be applied to points not within/without the polygon if a \
polygon is given")
@@ -157,7 +157,7 @@ def interpolate(input_mesh,
shift_x=0.0,
shift_y=0.0,
outside_zone=False,
default_value=0.0,
default_value=None,
mmap=False,
chunk_interp=False,
chunk_x_partitions=None,
@@ -233,8 +233,10 @@ def interpolate(input_mesh,
else:
res.add_variable(varname, varunit)
if default_value == None and poly != None and var_exists == True:
if not default_value and not poly is None and var_exists:
default_value = res.get_data_value('BOTTOM', 0)
else:
default_value = 0.0
if outside_zone == True:
loc = 'outside'
Loading