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
Daniel Scheffler
py_tools_ds
Commits
f65c5039
Commit
f65c5039
authored
Feb 19, 2019
by
Daniel Scheffler
Browse files
Merge branch 'bugfix/fix_static_TLS_import_error' into 'master'
Bugfix/fix static tls import error Closes
#8
See merge request
!2
parents
fa0b0006
5d02fbd0
Pipeline
#3741
failed with stages
in 12 minutes and 27 seconds
Changes
12
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
py_tools_ds/compatibility/python/__init__.py
View file @
f65c5039
# -*- coding: utf-8 -*-
from
.
import
exceptions
__author__
=
'Daniel Scheffler'
__all__
=
[
'exceptions'
]
py_tools_ds/convenience/__init__.py
View file @
f65c5039
# -*- coding: utf-8 -*-
from
.
import
object_oriented
__author__
=
"Daniel Scheffler"
__all__
=
[
'object_oriented'
]
py_tools_ds/dtypes/__init__.py
View file @
f65c5039
# -*- coding: utf-8 -*-
__author__
=
"Daniel Scheffler"
from
.
import
conversion
__all__
=
[
'conversion'
]
py_tools_ds/geo/__init__.py
View file @
f65c5039
from
.
import
raster
from
.
import
vector
from
.
import
coord_calc
from
.
import
coord_trafo
from
.
import
coord_grid
from
.
import
map_info
from
.
import
projection
__all__
=
[
'raster'
,
'vector'
,
'coord_calc'
,
'coord_trafo'
,
'coord_grid'
,
'map_info'
,
'projection'
]
# -*- coding: utf-8 -*-
__author__
=
'Daniel Scheffler'
py_tools_ds/geo/raster/__init__.py
View file @
f65c5039
# -*- coding: utf-8 -*-
__author__
=
"Daniel Scheffler"
from
.
import
conversion
from
.
import
reproject
__all__
=
[
'conversion'
,
'reproject'
]
py_tools_ds/geo/raster/reproject.py
View file @
f65c5039
...
...
@@ -14,10 +14,9 @@ except ImportError:
import
gdal
import
gdalnumeric
import
rasterio
from
rasterio.warp
import
reproject
as
rio_reproject
from
rasterio.warp
import
calculate_default_transform
as
rio_calc_transform
from
rasterio.warp
import
Resampling
# NOTE: In case of ImportError: dlopen: cannot load any more object with static TLS,
# one could add 'from pykdtree.kdtree import KDTree' here (before pyresample import)
from
pyresample.geometry
import
AreaDefinition
,
SwathDefinition
from
pyresample.utils
import
get_area_def
from
pyresample.bilinear
import
resample_bilinear
...
...
@@ -63,6 +62,16 @@ def warp_ndarray_OLD(ndarray, in_gt, in_prj, out_prj, out_gt=None, outRowsCols=N
:return out_gt: warped gdal GeoTransform
:return out_prj: warped projection as WKT string
"""
# NOTE: rasterio seems to increase the number of objects with static TLS
# There is a maximum number and if this is exceeded an ImportError is raised:
# ImportError: dlopen: cannot load any more object with static TLS
# - see also: https://gitext.gfz-potsdam.de/danschef/py_tools_ds/issues/8
# - NOTE: importing rasterio AFTER pyresample (which uses pykdtree) seems to solve that too
# => keep the rasterio import within the function locals to avoid not needed imports
import
rasterio
from
rasterio.warp
import
reproject
as
rio_reproject
from
rasterio.warp
import
calculate_default_transform
as
rio_calc_transform
from
rasterio.warp
import
Resampling
if
not
ndarray
.
flags
[
'OWNDATA'
]:
temp
=
np
.
empty_like
(
ndarray
)
...
...
py_tools_ds/geo/vector/__init__.py
View file @
f65c5039
# -*- coding: utf-8 -*-
from
.
import
geometry
from
.
import
topology
from
.
import
conversion
__author__
=
"Daniel Scheffler"
__all__
=
[
'geometry'
,
'topology'
,
'conversion'
]
py_tools_ds/io/__init__.py
View file @
f65c5039
# -*- coding: utf-8 -*-
from
.
import
raster
from
.
import
pathgen
__author__
=
"Daniel Scheffler"
__all__
=
[
'raster'
,
'pathgen'
]
py_tools_ds/numeric/__init__.py
View file @
f65c5039
# -*- coding: utf-8 -*-
from
.
import
array
from
.
import
vector
__author__
=
"Daniel Scheffler"
__all__
=
[
'array'
,
'vector'
]
py_tools_ds/processing/__init__.py
View file @
f65c5039
# -*- coding: utf-8 -*-
from
.
import
shell
__author__
=
"Daniel Scheffler"
__all__
=
[
'shell'
]
py_tools_ds/similarity/__init__.py
View file @
f65c5039
# -*- coding: utf-8 -*-
from
.
import
raster
__author__
=
"Daniel Scheffler"
__all__
=
[
'raster'
]
py_tools_ds/version.py
View file @
f65c5039
__version__
=
'0.14.1
0
'
__versionalias__
=
'20190219_0
1
'
__version__
=
'0.14.1
1
'
__versionalias__
=
'20190219_0
2
'
Write
Preview
Supports
Markdown
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