Skip to content

Commit

Permalink
Improve filter
Browse files Browse the repository at this point in the history
  • Loading branch information
flacombe committed Jan 30, 2025
1 parent 422ad77 commit a795938
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions analysers/analyser_merge_power_pole_FR_spec_enedis.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,23 @@ def __init__(self, config, logger = None):
self.def_class_update_official(item = 8290, id = 1004, level = 3, tags = ['merge', 'power', 'fix:chair', 'fix:survey'],
title = T_('Power pole update'))

dep_code = config.options.get('dep_code') or config.options.get('country').split('-')[1]

self.init(
"https://www.data.gouv.fr/fr/datasets/position-geographique-des-poteaux-hta-et-bt/",
"Position géographique des poteaux électriques HTA et BT Enedis",
CSV(SourceDataGouv(
attribution="Enedis",
dataset="60b9a555532a9939f42fcb3b",
resource="93186d05-f283-421c-8534-a92149a01a36"
)),
), fields=['Code Département', 'Geo Point', 'PREC']),
Load_XY("Geo Point", "Geo Point",
xFunction = lambda x: x and x.split(',')[1],
yFunction = lambda y: y and y.split(',')[0],
select = {"PREC": ["A : 0 - 50cm", "B : 50cm - 1m 50"]}),
select = {
"Code Département": dep_code,
"PREC": ["A : 0 - 50cm", "B : 50cm - 1m 50"]
}),
Conflate(
select = Select(
types = ['nodes'],
Expand Down

0 comments on commit a795938

Please sign in to comment.