Skip to content
Snippets Groups Projects
Commit 9a469a9e authored by Roelofsen, Hans's avatar Roelofsen, Hans
Browse files

update with ref to latest pkl

parent f91d1b57
Branches
Tags
No related merge requests found
......@@ -30,18 +30,9 @@ doren.add_yearly_covar(covar_dir=cv_precp_dir, covar_src_basename=cv_precp_src,
doren.add_yearly_covar(covar_dir=cv_temp_dir, covar_src_basename=cv_temp_src, covar_name='5_yearly_temp')
doren.get_requested_species(src=sp_req_src)
sp = 'Empetrum nigrum'
sp2 = 'Calluna vulgaris'
doren.select_plts_w_species(sp)
doren.nearest_positive()
doren.write_stuff('headers_shp')
doren.write_stuff('species_single_file')
doren.write_stuff('report')
doren.write_stuff('species_list')
doren.write_stuff('typische_soorten')
doren.write_stuff('report')
doren.write_stuff('headers_shp')
with open(r'c:\Users\roelo008\OneDrive - WageningenUR\a_projects\DOREN\b_compiled_data\a_pkl\doren_{}.pkl'.
......
......@@ -17,9 +17,7 @@ batch_nr = int(args.batch_nr)
n_batches = int(args.n_batches)
# Recover the Pickled doren object
pkl_src = './pkl_src/doren_20200630.pkl'
pkl_src = './pkl_src/doren_20200630.pkl'
pkl_src = r'c:\Users\roelo008\OneDrive - WageningenUR\a_projects\DOREN\b_compiled_data\a_pkl\doren_20200630.pkl'
pkl_src = './pkl_src/doren_20200812.pkl'
with open(pkl_src, 'rb') as handle:
doren = pickle.load(handle)
......@@ -37,29 +35,7 @@ for i, j in enumerate(sel, start=1):
print(' doing species {0} of {1}: {2}'.format(i, len(sel), sp))
doren.select_plts_w_species(species_name=sp)
doren.nearest_positive()
# doren.filter_by_buffer_around_positive_plots(buffer_size=100000)
doren.write_stuff('species_single_file')
doren.write_stuff('headers_shp')
except OSError:
continue
"""Scratch below"""
sp = 'Empetrum nigrum'
doren.select_plts_w_species(sp)
doren.nearest_positive()
gdA = doren.eva.loc[doren.negative_plots, :]
gdB = doren.eva.loc[doren.positive_plots, ['plot_id', 'plot_coordinates_3035']]
ckdnearest(gdbA, gdbB)
import geopandas as gpd
from shapely.geometry import Point
gpd1 = gpd.GeoDataFrame([['John', 1, Point(1, 1)], ['Smith', 1, Point(2, 2)],
['Soap', 1, Point(0, 2)]],
columns=['Name', 'ID', 'geometry'])
gpd2 = gpd.GeoDataFrame([['Work', Point(0, 1.1)], ['Shops', Point(2.5, 2)],
['Home', Point(1, 1.1)]],
columns=['Place', 'geometry'])
ckdnearest(gpd1, gpd2)
\ No newline at end of file
doren.write_stuff('report')
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment