Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
geopat
geopat
Commits
e73b9bf3
Commit
e73b9bf3
authored
Apr 30, 2019
by
Dumoulin Nicolas
Browse files
label of Bdv addded in input data and unconsidered cultures keeped
parent
1f617266
Changes
1
Hide whitespace changes
Inline
Side-by-side
PATBuilder.py
View file @
e73b9bf3
...
...
@@ -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
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment