Skip to content

Commit

Permalink
geolib: update bool datatype string
Browse files Browse the repository at this point in the history
  • Loading branch information
dshean committed Jan 4, 2023
1 parent e780b4c commit 8f70461
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pygeotools/lib/geolib.py
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ def shp2array(shp_fn, r_ds=None, res=None, extent=None, t_srs=None):
b.SetNoDataValue(ndv)
gdal.RasterizeLayer(m_ds, [1], outlyr, burn_values=[1])
a = b.ReadAsArray()
a = ~(a.astype('Bool'))
a = ~(a.astype(bool))
return a

def raster_shpclip(r_fn, shp_fn, extent='raster', bbox=False, pad=None, invert=False, verbose=False):
Expand Down Expand Up @@ -1628,7 +1628,7 @@ def lyr2mask(lyr, r_ds):
#Rasterize with values of 1
gdal.RasterizeLayer(m_ds, [1], lyr, burn_values=[1])
a = b.ReadAsArray()
mask = a.astype('Bool')
mask = a.astype(bool)
m_ds = None
return ~mask

Expand Down

0 comments on commit 8f70461

Please sign in to comment.