Commit e73b9bf3 authored by Dumoulin Nicolas's avatar Dumoulin Nicolas
Browse files

label of Bdv addded in input data and unconsidered cultures keeped

parent 1f617266
......@@ -29,7 +29,7 @@ def build_initial_PAT(rpg_parcelles_filename, rpg_ilots_filename, pat_cultural_c
'''
municipalities = build_PAT_municipalities(pat_municipalities_dir, bdv_filename, bdv_fixes_filename,
adminexpress_com_filename, adminexpress_epci_filename)
municipalities = gpd.GeoDataFrame(municipalities[['INSEE_COM','CODE_EPCI','geometry','POPULATION','BV2012']])
municipalities = gpd.GeoDataFrame(municipalities[['INSEE_COM','Nom','CODE_EPCI','geometry','POPULATION','BV2012','LIBBV2012']])
rpg = gpd.GeoDataFrame.from_file(rpg_parcelles_filename, encoding='utf-8')[['ID_PARCEL','CODE_CULTU','geometry']]
# we will use the centroid for doing the sjoin with municipalities
rpg['patches'] = rpg.geometry
......@@ -79,7 +79,7 @@ def build_initial_PAT(rpg_parcelles_filename, rpg_ilots_filename, pat_cultural_c
'BV2012':'Bdv'
})
# delete unconsidered rows
patches_expl = patches_expl[patches_expl['cultgeopat']!='Non Considérée']
# patches_expl = patches_expl[patches_expl['cultgeopat']!='Non Considérée']
# TODO join with MAJIC
patches_expl['SURF_PARC'] = patches_expl.area
return [patches_expl, municipalities]
......
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