Skip to content
GitLab
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
2cd88223
Commit
2cd88223
authored
Sep 09, 2021
by
Daniel Scheffler
Browse files
Fixed TypeError within raster2polygon. Bumped version.
Signed-off-by:
Daniel Scheffler
<
danschef@gfz-potsdam.de
>
parent
837afaf8
Pipeline
#27431
passed with stages
in 2 minutes and 17 seconds
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
HISTORY.rst
View file @
2cd88223
...
...
@@ -2,6 +2,12 @@
History
=======
0.17.9 (2021-09-09)
-------------------
* Fixed TypeError within raster2polygon.
0.17.8 (2021-08-11)
-------------------
...
...
py_tools_ds/geo/raster/conversion.py
View file @
2cd88223
...
...
@@ -133,11 +133,13 @@ def raster2polygon(array, gt, prj, DN2extract=1, exact=True, maxfeatCount=None,
# GDF['geometry'] = GDF.apply(get_shplyPoly, axis=1)
GDF
=
GeoDataFrame
(
columns
=
[
'geometry'
,
'DN'
])
GDF
.
DN
=
GDF
.
DN
.
astype
(
float
)
timer
=
Timer
(
timeout
)
for
i
in
range
(
featCount
):
if
not
timer
.
timed_out
:
element
=
mem_layer
.
GetNextFeature
()
GDF
.
loc
[
i
]
=
[
loads
(
element
.
GetGeometryRef
().
ExportToWkb
()).
buffer
(
0
),
DN2extract
]
wkb
=
bytes
(
element
.
GetGeometryRef
().
ExportToWkb
())
GDF
.
loc
[
i
]
=
[
loads
(
wkb
).
buffer
(
0
),
DN2extract
]
del
element
else
:
raise
TimeoutError
(
'raster2polygon timed out!'
)
...
...
py_tools_ds/version.py
View file @
2cd88223
...
...
@@ -19,5 +19,5 @@
# You should have received a copy of the GNU Lesser General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
__version__
=
'0.17.
8
'
__versionalias__
=
'20210
811
_01'
__version__
=
'0.17.
9
'
__versionalias__
=
'20210
909
_01'
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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