Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Daniel Scheffler
geoarray
Commits
c4e43794
Commit
c4e43794
authored
Aug 09, 2018
by
Daniel Scheffler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed GeoArray.save() for other formats than ENVI.
parent
9777d0e0
Pipeline
#3077
passed with stages
in 1 minute and 23 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
geoarray/baseclasses.py
geoarray/baseclasses.py
+6
-3
No files found.
geoarray/baseclasses.py
View file @
c4e43794
...
...
@@ -933,16 +933,19 @@ class GeoArray(object):
elif
self
.
metadata
.
all_meta
:
# set global domain metadata
if
self
.
metadata
.
global_meta
:
ds_out
.
SetMetadata
(
self
.
metadata
.
global_meta
)
ds_out
.
SetMetadata
(
dict
((
k
,
repr
(
v
))
for
k
,
v
in
self
.
metadata
.
global_meta
.
items
())
)
if
'description'
in
envi_metadict
:
ds_out
.
SetDescription
(
envi_metadict
[
'description'
])
# set band domain metadata
bandmeta_dict
=
self
.
metadata
.
to_DataFrame
().
astype
(
str
).
to_dict
()
for
bidx
in
range
(
self
.
bands
):
band
=
ds_out
.
GetRasterBand
(
bidx
+
1
)
meta2write
=
dict
((
k
,
repr
(
v
))
for
k
,
v
in
self
.
metadata
.
band_meta
.
items
()
if
v
is
not
np
.
nan
)
band
.
SetMetadata
(
meta2write
)
bandmeta
=
bandmeta_dict
[
bidx
]
# meta2write = dict((k, repr(v)) for k, v in self.metadata.band_meta.items() if v is not np.nan)
band
.
SetMetadata
(
bandmeta
)
if
'band_names'
in
envi_metadict
:
band
.
SetDescription
(
self
.
metadata
.
band_meta
[
'band_names'
][
bidx
].
strip
())
...
...
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