Skip to content

Commit c4941fa

Browse files
committed
Allow scientific notation for nodata value
1 parent 226f019 commit c4941fa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/vizcolormapgen.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def colormapgen(output, colormap, min, max, nodata, percent):
7171
''')
7272

7373
out = open(output + '.txt', 'w+')
74-
if str(nodata).isnumeric():
74+
if not str(nodata) == 'nv':
7575
if float(nodata) <= min:
7676
out.write(f'{str(nodata)} 0 0 0 0\n')
7777
else:
@@ -89,7 +89,7 @@ def colormapgen(output, colormap, min, max, nodata, percent):
8989
xml_str = f' <ColorMapEntry rgb="{str(r)},{str(g)},{str(b)}" transparent="false" label="{str(val)+("%" if percent else "")}"/>'
9090
xml.write(xml_str + '\n')
9191

92-
if str(nodata).isnumeric():
92+
if not str(nodata) == 'nv':
9393
if float(nodata) >= max:
9494
out.write(f'{str(nodata)} 0 0 0 0\n')
9595
out.seek(0)

0 commit comments

Comments
 (0)