Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
geoarray
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
6
Issues
6
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Daniel Scheffler
geoarray
Commits
297fa33f
Commit
297fa33f
authored
Aug 08, 2018
by
Daniel Scheffler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfixes.
parent
feb1eb3d
Pipeline
#3069
failed with stages
in 1 minute and 10 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
geoarray/baseclasses.py
geoarray/baseclasses.py
+6
-1
tests/test_geoarray.py
tests/test_geoarray.py
+2
-2
No files found.
geoarray/baseclasses.py
View file @
297fa33f
...
@@ -4,6 +4,7 @@ import os
...
@@ -4,6 +4,7 @@ import os
import
warnings
import
warnings
from
importlib
import
util
from
importlib
import
util
from
collections
import
OrderedDict
from
collections
import
OrderedDict
from
copy
import
deepcopy
import
numpy
as
np
import
numpy
as
np
from
matplotlib
import
pyplot
as
plt
from
matplotlib
import
pyplot
as
plt
...
@@ -1476,7 +1477,11 @@ class GeoArray(object):
...
@@ -1476,7 +1477,11 @@ class GeoArray(object):
# apply zslice to bandnames and metadata
# apply zslice to bandnames and metadata
if
zslicing
:
if
zslicing
:
bNs_out
=
list
(
np
.
array
(
list
(
self
.
bandnames
))[
zslice
])
bNs_out
=
list
(
np
.
array
(
list
(
self
.
bandnames
))[
zslice
])
_meta_out
=
None
if
self
.
_metadata
is
None
else
self
.
meta
[
list
(
np
.
array
(
range
(
self
.
bands
))[
zslice
])]
_meta_out
=
deepcopy
(
self
.
meta
)
if
self
.
_metadata
:
for
k
,
v
in
_meta_out
.
band_meta
.
items
():
_meta_out
.
band_meta
[
k
]
=
list
(
np
.
array
(
v
)[
zslice
])
else
:
else
:
bNs_out
=
list
(
self
.
bandnames
)
bNs_out
=
list
(
self
.
bandnames
)
_meta_out
=
self
.
meta
_meta_out
=
self
.
meta
...
...
tests/test_geoarray.py
View file @
297fa33f
...
@@ -24,7 +24,6 @@ Program started in Mai 2017.
...
@@ -24,7 +24,6 @@ Program started in Mai 2017.
from
__future__
import
print_function
from
__future__
import
print_function
from
collections
import
OrderedDict
from
collections
import
OrderedDict
import
dill
import
dill
import
geopandas
import
numpy
as
np
import
numpy
as
np
import
os
import
os
from
os
import
path
from
os
import
path
...
@@ -43,6 +42,7 @@ from py_tools_ds.geo.vector import geometry
...
@@ -43,6 +42,7 @@ from py_tools_ds.geo.vector import geometry
from
py_tools_ds.compatibility.python.os
import
makedirs
from
py_tools_ds.compatibility.python.os
import
makedirs
matplotlib
.
use
(
'Template'
)
# disables matplotlib figure popups
matplotlib
.
use
(
'Template'
)
# disables matplotlib figure popups
from
geoarray
import
GeoArray
,
masks
,
__file__
# noqa E402 module level import not at top of file
from
geoarray
import
GeoArray
,
masks
,
__file__
# noqa E402 module level import not at top of file
from
geoarray.metadata
import
GDAL_Metadata
# noqa E402 module level import not at top of file
__author__
=
'Jessica Palka'
__author__
=
'Jessica Palka'
...
@@ -453,7 +453,7 @@ class Test_GeoarrayFunctions(unittest.TestCase):
...
@@ -453,7 +453,7 @@ class Test_GeoarrayFunctions(unittest.TestCase):
Test, if the output of the metadata-function is an instance of GeoDataFrame.
Test, if the output of the metadata-function is an instance of GeoDataFrame.
"""
"""
self
.
assertIsInstance
(
self
.
testtiff
.
metadata
,
geopandas
.
GeoDataFrame
)
self
.
assertIsInstance
(
self
.
testtiff
.
metadata
,
GDAL_Metadata
)
def
test_tiles
(
self
):
def
test_tiles
(
self
):
test_gAs
=
[
self
.
testtiff
,
# 3D
test_gAs
=
[
self
.
testtiff
,
# 3D
...
...
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