Commit 2cd88223 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Fixed TypeError within raster2polygon. Bumped version.


Signed-off-by: Daniel Scheffler's avatarDaniel Scheffler <danschef@gfz-potsdam.de>
parent 837afaf8
Pipeline #27431 passed with stages
in 2 minutes and 17 seconds
......@@ -2,6 +2,12 @@
History
=======
0.17.9 (2021-09-09)
-------------------
* Fixed TypeError within raster2polygon.
0.17.8 (2021-08-11)
-------------------
......
......@@ -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!')
......
......@@ -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__ = '20210811_01'
__version__ = '0.17.9'
__versionalias__ = '20210909_01'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment