stevenpawley / Pyspatialml

Machine learning modelling for spatial data
GNU General Public License v3.0
145 stars 29 forks source link

TypeError in stack.extract_vector() #17

Closed EChebelyon closed 4 years ago

EChebelyon commented 4 years ago

I am getting a TypeError when using the extract_vector() method.

Running:

df_points = stack.extract_vector(gdf)

Returns:

'TypeError': sample_gen() got an unexpected keyword argument 'masked'

gdf is a Geopandas geodataframe with two columns: a target and geometry column.

stevenpawley commented 4 years ago

Hmm, what version of rasterio do you have installed? Perhaps the 'masked' argument was for rasterio.sample.sample_gen was only added in a more recent version.

EChebelyon commented 4 years ago

Good flag, I was on rasterio 1.1.0 upgrading to 1.1.5 fixed the issue.

Many thanks.