Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Hoek, Steven
lmgeo
Commits
20cf3b9b
Commit
20cf3b9b
authored
Jun 16, 2016
by
Hoek, Steven
Browse files
Made sure that when the nodatavalue is set, it is cast to the right datatype
parent
7c75be9b
Changes
1
Hide whitespace changes
Inline
Side-by-side
formats/bandraster.py
View file @
20cf3b9b
...
@@ -117,7 +117,10 @@ class BandRaster(GridEnvelope2D, Raster):
...
@@ -117,7 +117,10 @@ class BandRaster(GridEnvelope2D, Raster):
self
.
xul
=
ulxmap
-
0.5
*
self
.
dx
self
.
xul
=
ulxmap
-
0.5
*
self
.
dx
self
.
yul
=
ulymap
+
0.5
*
self
.
dy
self
.
yul
=
ulymap
+
0.5
*
self
.
dy
hl
=
hf
.
readline
();
hl
=
hf
.
readline
();
self
.
nodatavalue
=
int
(
hl
.
replace
(
'NODATA'
,
''
));
if
self
.
dataformat
in
[
'f'
,
'd'
]:
self
.
nodatavalue
=
float
(
hl
.
replace
(
'NODATA'
,
''
).
strip
());
else
:
self
.
nodatavalue
=
int
(
hl
.
replace
(
'NODATA'
,
''
).
strip
());
hf
.
close
()
hf
.
close
()
else
:
else
:
# Assume that the rest of the information has to be read from a world file
# Assume that the rest of the information has to be read from a world file
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment