Skip to content

Commit

Permalink
Simple quotes in power_line
Browse files Browse the repository at this point in the history
  • Loading branch information
flacombe committed Aug 24, 2023
1 parent 56a03fd commit d2b2bc7
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions analysers/analyser_merge_power_line_FR.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,27 +32,27 @@ def __init__(self, config, logger = None):
title = T_('Power line not integrated'))

self.init(
"https://odre.opendatasoft.com/explore/dataset/lignes-aeriennes-rte-nv/information",
"Lignes aériennes RTE",
'https://odre.opendatasoft.com/explore/dataset/lignes-aeriennes-rte-nv/information',
'Lignes aériennes RTE',
GDAL(SourceOpenDataSoft(
url="https://odre.opendatasoft.com/explore/dataset/lignes-aeriennes-rte-nv/information",
attribution="RTE",
format="geojson"),
fields=["tension"]),
url='https://odre.opendatasoft.com/explore/dataset/lignes-aeriennes-rte-nv/information',
attribution='RTE',
format='geojson'),
fields=['tension']),
Load('geom',
select={"tension": lambda t: f'{t} != \'HORS TENSION\''}),
select={'tension': lambda t: f'{t} != \'HORS TENSION\''}),
ConflateNetwork(
select = Select(
types = ["ways"],
tags = [{"power": "line"}, {"disused:power": "line"}]),
types = ['ways'],
tags = [{'power': 'line'}, {'disused:power': 'line'}]),
conflationDistance = 30,
mapping = Mapping(
static1 = {
"power": "line",
"operator": "RTE",
"operator:wikidata": "Q2178795"},
static2 = {"source": self.source},
'power': 'line',
'operator': 'RTE',
'operator:wikidata': 'Q2178795'},
static2 = {'source': self.source},
mapping1 = {
"voltage": lambda fields: str((int(float(fields["tension"].replace("kV", "")) * 1000))) if fields["tension"] not in ("HORS TENSION", "<45kV", "COURANT CONTINU") else None,
'voltage': lambda fields: str((int(float(fields['tension'].replace('kV', '')) * 1000))) if fields['tension'] not in ('HORS TENSION', '<45kV', 'COURANT CONTINU') else None,
},
text = lambda tags, fields: {"en": ", ".join(filter(lambda res: res and res != "None", [fields["tension"]]))} )))
text = lambda tags, fields: {'en': ', '.join(filter(lambda res: res and res != 'None', [fields['tension']]))} )))

0 comments on commit d2b2bc7

Please sign in to comment.