déménagement du mappeur

https://forge.chapril.org/tykayn/mapping-geojson-osm

Signed-off-by: tykayn <contact@cipherbliss.com>
This commit is contained in:
tykayn 2023-08-11 20:53:37 +02:00
parent e07eb5c853
commit 06f5f1bb1b
209 changed files with 487 additions and 10077638 deletions

468
license-osm/index.html Normal file
View File

@ -0,0 +1,468 @@
<!DOCTYPE html>
<html dir="ltr" lang="fr">
<head data-locale="fr"
data-location="{&quot;minlon&quot;:-5.142222,&quot;minlat&quot;:41.371582,&quot;maxlon&quot;:9.561556,&quot;maxlat&quot;:51.092804}"
data-preferred-editor="remote"
data-user="2962129"
data-user-home="{&quot;lat&quot;:48.6246,&quot;lon&quot;:2.124}">
<meta content="IE=edge" http-equiv="X-UA-Compatible">
<meta charset="UTF-8">
<meta content="width=device-width, initial-scale=1" name="viewport">
<!-- <script src="https://www.openstreetmap.org/assets/application-57cd01faad75101f62e68d5f3bb3c1f019aeb72d3418a41b8b251be58fc09df2.js"></script>-->
<!-- <script src="https://www.openstreetmap.org/assets/i18n/fr-05ae7302303275076d6ae97c266a9bcb5b3a518ca4e009b707d61f59649b0200.js"></script>-->
<link href="https://www.openstreetmap.org/assets/screen-ltr-ca0aa65af2fe5fbc646694d87d9b5d73d80c1e27ba166ad1b99a297bccc1f756.css"
media="screen"
rel="stylesheet">
<link href="https://www.openstreetmap.org/assets/print-ltr-43899a8d8a55e0f65e57a89b7de420a34e64888beead34a1ac0e2530be9b6369.css"
media="print"
rel="stylesheet">
<link href="https://www.openstreetmap.org/assets/leaflet-all-874f5f3b37bd0e0e69acaf01dd25772af42be74da2e51025b131799d43107685.css"
media="screen, print"
rel="stylesheet">
<link href="https://www.openstreetmap.org/assets/apple-touch-icon-57x57-0af2b52ac2b1a8cb0aba42f17aa901bfdedb9174bd978f838e3b3e1dd8602f52.png"
rel="apple-touch-icon"
sizes="57x57"
type="image/png">
<link href="https://www.openstreetmap.org/assets/apple-touch-icon-60x60-cff74c9066d8e7fd08b29407712edbae5613cc9a4c03ee0398a89502a6a41d1f.png"
rel="apple-touch-icon"
sizes="60x60"
type="image/png">
<link href="https://www.openstreetmap.org/assets/apple-touch-icon-72x72-63c6fdf3ddf65feebac1c0441bf6a378d1e4bde7107f598ae86733c402895eae.png"
rel="apple-touch-icon"
sizes="72x72"
type="image/png">
<link href="https://www.openstreetmap.org/assets/apple-touch-icon-76x76-1740d6e7a59521693c496dd8fbe1caf3d5ad302017cb0f5073b6914b4f5b7544.png"
rel="apple-touch-icon"
sizes="76x76"
type="image/png">
<link href="https://www.openstreetmap.org/assets/apple-touch-icon-114x114-20ba9df1a8f9b341040d661b7942b7b10288b9b4c4ce0663e10018958dc7f4a8.png"
rel="apple-touch-icon"
sizes="114x114"
type="image/png">
<link href="https://www.openstreetmap.org/assets/apple-touch-icon-120x120-c304991e604d1be82639709b96fb87f7b6b6688cc0d04d5f6141604259299648.png"
rel="apple-touch-icon"
sizes="120x120"
type="image/png">
<link href="https://www.openstreetmap.org/assets/apple-touch-icon-144x144-fbf20bdf9d2f7c1fe8eb85d7869a9bda285be88c93a39438150f5eb5955758ce.png"
rel="apple-touch-icon"
sizes="144x144"
type="image/png">
<link href="https://www.openstreetmap.org/assets/apple-touch-icon-152x152-af45dc979e972cab863517b2cb33a3dcf3e04e02a2eb2734c6f93edc21fa395d.png"
rel="apple-touch-icon"
sizes="152x152"
type="image/png">
<link href="https://www.openstreetmap.org/assets/apple-touch-icon-180x180-ea6361d7ae5b3f08c6290652ad703fa239364cc09c84873044f3299845f24652.png"
rel="apple-touch-icon"
sizes="180x180"
type="image/png">
<link href="https://www.openstreetmap.org/assets/favicon-32x32-99b88fcadeef736889823c8a886b89d8cada9d4423a49a27de29bacc0a6bebd1.png"
rel="icon"
sizes="32x32"
type="image/png">
<link href="https://www.openstreetmap.org/assets/favicon-194x194-79d3fb0152c735866e64b1d7535d504483cd13c2fad0131a6142bd9629d30de2.png"
rel="icon"
sizes="194x194"
type="image/png">
<link href="https://www.openstreetmap.org/assets/favicon-96x96-6ffbc38962fddb870f9577b76430a0ee4db5fb4eca485f850cd45436d7f3eb87.png"
rel="icon"
sizes="96x96"
type="image/png">
<link href="https://www.openstreetmap.org/assets/android-chrome-192x192-f970b9be3965dfda6ea9481b305c39b2ec794e296f802235e30d4671f0f896e1.png"
rel="icon"
sizes="192x192"
type="image/png">
<link href="https://www.openstreetmap.org/assets/favicon-16x16-474476c1b2381628a81361a9e2bf04b936d21f77c59e84b48c6c69ea376fb6cf.png"
rel="icon"
sizes="16x16"
type="image/png">
<link color="#7ebc6f"
href="https://www.openstreetmap.org/assets/tab-icon-3e700a12d38a1bba06d674ed663824232025cd6b0ca5c439c846740a7468b302.svg"
rel="mask-icon">
<link href="https://www.openstreetmap.org/assets/manifest-b2cc1407226d3e16e6149425747239c259fbe44b41bff3aca36ca6d9e56a6e18.json"
rel="manifest">
<meta content="https://www.openstreetmap.org/assets/browserconfig-c59184dc0264731151cbf50ae58f7fa8ae5153138013f125203e1193800f862f.xml"
name="msapplication-config">
<meta content="#00a300" name="msapplication-TileColor">
<meta content="https://www.openstreetmap.org/assets/mstile-144x144-02723f6f7cb2c18e6f8041c93f80982decb52b24a7e447477bc2ce3136d75806.png"
name="msapplication-TileImage">
<meta content="#ffffff" name="theme-color">
<link href="https://www.openstreetmap.org/copyright" rel="canonical">
<link href="https://www.openstreetmap.org/assets/osm-42b7b3fbcee2193e455a773db6cd3d34a2f48ca94547fed54901dd9d8307b02b.xml"
rel="search" title="OpenStreetMap Search"
type="application/opensearchdescription+xml">
<meta content="OpenStreetMap is the free wiki world map." name="description">
<meta content="OpenStreetMap" property="og:site_name">
<meta content="OpenStreetMap" property="og:title">
<meta content="website" property="og:type">
<meta content="https://www.openstreetmap.org/assets/osm_logo_256-ed028f90468224a272961c380ecee0cfb73b8048b34f4b4b204b7f0d1097875d.png"
property="og:image">
<meta content="https://www.openstreetmap.org/assets/osm_logo_256-ed028f90468224a272961c380ecee0cfb73b8048b34f4b4b204b7f0d1097875d.png"
property="og:image:secure_url">
<meta content="https://www.openstreetmap.org/copyright" property="og:url">
<meta content="OpenStreetMap est une carte du monde, créée par des gens comme vous et libre dutilisation sous licence libre."
property="og:description">
<meta content="authenticity_token" name="csrf-param">
<meta content="cNrEDHe26Yx6WzoJM6HJe88pvmeHOFbQAcdEBBegYXh_VqjsJJHGIF30YGTlX05O_uMyr2OP49wIOIfObfj9dQ"
name="csrf-token">
<title>OpenStreetMap</title>
</head>
<body>
<div id="main">
<div id="content">
<header class="closed clearfix">
<h1>
<a ="https://www.openstreetmap.org/" class="geolink">
<picture>
<source srcset="/assets/osm_logo-4afddaae0230a5a46687fdc751ed256dfdccde144118cb02a7d7960f207a4b92.svg"
type="image/svg+xml">
<img alt="Logo dOpenStreetMap"
class="logo"
src="/assets/osm_logo-9391021d40a7acdafd2ac5d5622dfe0e469c61421fdb2975365c183f5edaa270.png"
srcset="/assets/osm_logo-4afddaae0230a5a46687fdc751ed256dfdccde144118cb02a7d7960f207a4b92.svg">
</picture>
OpenStreetMap
</a>
</h1>
<a href="#" id="menu-icon"></a>
<nav class="primary">
<div class="btn-group">
<div class="btn-group " id="edit_tab" title="Zoomez en avant pour modifier la carte">
<a class="btn btn-outline-primary geolink editlink" data-editor="remote" id="editanchor"
="https://www.openstreetmap.org/edit">Modifier</a>
<button class="btn btn-outline-primary dropdown-toggle dropdown-toggle-split"
data-bs-toggle="dropdown"
type="button"></button>
<ul class="dropdown-menu">
<li>
<a class="geolink editlink dropdown-item" data-editor="id" ="
https://www.openstreetmap.org/edit?editor=id">Modifier
avec iD (éditeur intégré au navigateur)</a>
</li>
<li>
<a class="geolink editlink dropdown-item" data-editor="remote"
="https://www.openstreetmap.org/edit?editor=remote">Modifier avec Éditeur externe (JOSM,
Potlatch,
Merkaartor)</a>
</li>
</ul>
</div>
<a class="btn btn-outline-primary geolink flex-grow-1 current_page_class(history_path)"
id="history_tab" ="https://www.openstreetmap.org/history">Historique</a>
<a class="btn btn-outline-primary geolink current_page_class(export_path)" id="export_tab"
="https://www.openstreetmap.org/export">Exporter</a>
</div>
</nav>
<nav class="secondary">
<ul class="mx-1 px-0">
<li class="compact-hide nav-item ">
<a class="nav-link" ="https://www.openstreetmap.org/traces">Traces GPS</a>
</li>
<li class="compact-hide nav-item ">
<a class="nav-link" ="https://www.openstreetmap.org/diary">Journaux des utilisateurs</a>
</li>
<li class="compact-hide nav-item ">
<a class="nav-link" ="https://www.openstreetmap.org/communities">Communautés</a>
</li>
<li class="compact-hide nav-item current">
<a class="nav-link" ="https://www.openstreetmap.org/copyright">Droits dauteur</a>
</li>
<li class="compact-hide nav-item ">
<a class="nav-link" ="https://www.openstreetmap.org/help">Aide</a>
</li>
<li class="compact-hide nav-item ">
<a class="nav-link" ="https://www.openstreetmap.org/about">À propos</a>
</li>
<li class="dropdown nav-item" id="compact-secondary-nav">
<button class="dropdown-toggle nav-link btn" data-bs-toggle="dropdown" type="button">Plus
</button>
<ul class="dropdown-menu">
<li class=""><a class="dropdown-item" ="https://www.openstreetmap.org/traces">Traces GPS</a>
</li>
<li class=""><a class="dropdown-item" ="https://www.openstreetmap.org/diary">Journaux des
utilisateurs</a></li>
<li class=""><a class="dropdown-item" ="https://www.openstreetmap.org/communities">
Communautés</a></li>
<li class="current"><a class="dropdown-item" ="https://www.openstreetmap.org/copyright">
Droits dauteur</a></li>
<li class=""><a class="dropdown-item" ="https://www.openstreetmap.org/help">Aide</a></li>
<li class=""><a class="dropdown-item" ="https://www.openstreetmap.org/about">À propos</a>
</li>
</ul>
</li>
</ul>
<div class="d-inline-flex dropdown user-menu logged-in clearfix">
<button class="dropdown-toggle btn btn-outline-secondary px-2 py-1 flex-grow-1"
data-bs-toggle="dropdown"
type="button">
<img alt="" class="user_thumbnail_tiny rounded-1"
height="50"
src="https://www.gravatar.com/avatar/c3b6c1aaf400b9240b9e361629f28b23.jpg?s=50&amp;d=https%3A%2F%2Fwww.openstreetmap.org%2Fassets%2Favatar_large-54d681ddaf47c4181b05dbfae378dc0201b393bbad3ff0e68143c3d5f3880ace.png"
width="50">
<span class="user-button">
<span class="username">
tykayn
</span>
</span>
</button>
<div class="dropdown-menu dropdown-menu-end">
<a class="dropdown-item" ="https://www.openstreetmap.org/dashboard">Mon tableau de bord</a>
<a class="dropdown-item" ="https://www.openstreetmap.org/messages/inbox">
Mes messages
<span class="count-number">0</span>
</a> <a class="dropdown-item" ="https://www.openstreetmap.org/user/tykayn">Mon profil</a>
<a class="dropdown-item" ="https://www.openstreetmap.org/account/edit">Mes options</a>
<a class="dropdown-item" ="https://www.openstreetmap.org/preferences">Mes préférences</a>
<div class="dropdown-divider"></div>
<a class="geolink dropdown-item" data-method="post" rel="nofollow"
="https://www.openstreetmap.org/logout?referer=%2Fcopyright">Se déconnecter</a>
</div>
</div>
</nav>
</header>
<div id="content">
<div class="content-inner">
<div class="lang-selector">
This page is also available in ENGLISH / FRANÇAIS / ...
<select id="lang" name="lang">
<option value="FR_fr">Français</option>
<option value="EN_en">English</option>
</select>
</div>
<article>
<div class="heading-box">
<h1 id="head">
<!-- noun-heart-5454846-->
OpenStreetMap : la base de données cartographique ouverte, collaborative et mondiale
</h1>
<p>
</p>
Chacun est libre de contribuer et dutiliser les données à condition de protéger et de
contribuer à faire
grandir
OpenStreetMap.
Ceci est un résumé expliquant simplement (et en aucun cas un substitut à) la licence ODbL (en
anglais).
OpenStreetMap® est disponible en données libres, sous licence de base de données ouverte Open
Data Commons
(ODbL)
(ODbL) par la Fondation OpenStreetMap (OSMF).
Vous êtes autorisé à :
-
<!-- noun-cc-share-573489-->
Partager : copier, distribuer et utiliser la base de données
-
<!-- noun-build-3136692-->
Créer : produire des cartes (ou nimporte quoi dautre !) à partir de la base de données
-
<!-- noun-layer-1159947-->
Adapter : modifier, transformer et construire avec la base de données
Et tout cela, pour un usage noun-artist-4516845 personnel tout autant que noun-dollar-1324742
commercial
Selon les conditions suivantes :
-
<!-- noun-contributions-4513764-->
Attribution : vous devez créditer OpenStreetMap pour tout usage public ou travail
dérivé de la base de données
-
<!-- noun-refresh-1815798-->
Partage sous les mêmes conditions : si vous faites un usage public de la base de données ou
dune version dérivée, les conditions de lODbL sappliquent
-
<!-- noun-open-padlock-5336638-->
Préserver louverture : si vous redistribuez la base de données ou une version dérivée
avec des mesures de protection (comme des DRM), vous devez alors également fournir une version
sans ces
mesures
de protection
</div>
<div class="tabs-box">
<div class="tabs-heading">
<!-- tabs:-->
<!-- noun-contributions-4513764-->
Créditer /
<!-- noun-together-3266241-->
Contributeurs /
<!-- noun-import-1243585-->
Imports interdits /
<!-- noun-thumb-5947085-->
Marque OpenStreetMap®
<!-- noun-contributions-4513764-->
</div>
<div class="tabs-body">
</div>
</div>
<div class="crediting-box">
<h2 id="crediting">
Créditer
</h2>
Lorsque vous utilisez des données dOpenStreetMap, vous devez effectuer les deux choses
suivantes :
Donnez crédit à OpenStreetMap en affichant notre avis des droits dauteur.
Indiquez clairement que les données sont disponibles sous la Licence Open Database.
<a href="https://wiki.osmfoundation.org/wiki/Licence/Attribution_Guidelines/fr">
→ Voir tous les usages
</a>
</div>
<!-- NB : au lieu de renvoyer vers une page externe, ça mériterait de développer un outil qui couvre la majorité des cas-->
<!-- dusage, du type Choose a License-->
<div class="contributors-box">
<h2 id="contributors">
<!-- noun-together-3266241 -->
Contributeurs
</h2>
Les données dOpenStreetMap sont créées par des milliers de personnes. Ces contributeurs peuvent
être
bénévoles
ou
professionnels.
Nous incluons également des données publiées sous licence ouverte par des agences nationales de
cartographie
et
dautres sources de données ouvertes.
<a href="https://wiki.openstreetmap.org/wiki/Contributors">
→ Voir tous les contributeurs
</a>
<!-- (en anglais ; sur le wiki dOpenStreetMap)-->
Linclusion de données dans OpenStreetMap nimplique pas que les fournisseurs dorigine du
contenu
approuvent
OpenStreetMap, ni quils garantissent ou acceptent quelque responsabilité que ce soit.
</div>
<div class="forbidden-imports-box">
<h2 id="forbidden_imports">
<!-- noun-import-1243585 -->
Imports interdits
</h2>
Nous rappelons aux contributeurs dOSM quils ne doivent jamais ajouter de données provenant de
sources
protégées
par le droit dauteur (copyright) ou des droits voisins (par ex. Google Maps ou des cartes
imprimées) sans
autorisation explicite de la part des détenteurs de ces droits.
Si vous pensez que des données protégées par des droits dauteur ont été ajoutées de manière
inappropriée à
la
base
de données OpenStreetMap :
<a href="https://wiki.osmfoundation.org/wiki/Takedown_procedure">
→ Procédure de retrait (en anglais)
</a>
<a href="https://dmca.openstreetmap.org/">
→ Page de signalement en ligne (en anglais)
</a>
</div>
<!-- noun-thumb-5947085 -->
<div class="brand-box">
<h2>
Marque OpenStreetMap®
</h2>
Les termes OpenStreetMap et State of the Map ainsi que le logo en forme de loupe sont des
marques déposées
de la
Fondation OpenStreetMap.
<a href="https://wiki.osmfoundation.org/wiki/Trademark_Policy">
→ Politique relative aux marques (en anglais)
</a>
</div>
<!-- noun-guideline-5892826-->
<div class="clarification-box">
<h2>
Clarifications dutilisation
</h2>
La fondation OpenStreetMap détaille ses directives pour les nombreuses possibilité spécifiques
dutilisation
des
données : création dune carte web ou imprimée, utilisation des données via une API, combinaison
avec des
bases
des données tierces …
<a href="https://wiki.osmfoundation.org/wiki/Licence/Community_Guidelines/fr">
→ Directives générales
</a>
</div>
<div class="contact-box">
<h2>
Contact
</h2>
Pour toute question relative à linterprétation de lODbL, veuillez consulter un avocat.
Vous pouvez contacter le legal working group, groupe de travail légal de la fondation.
<a href="legal-questions@osmfoundation.org">
→ legal-questions@osmfoundation.org
</a>
</div>
<!-- noun-warning-170417-->
<div class="warning-box">
<h2>
Avertissement
</h2>
Cette page nest pas une licence et na aucune valeur légale. Cest un résumé de <a
href="https://opendatacommons.org/licenses/odbl/1-0/">
lODbL 1.0
</a>; une explication
simplifiée du texte juridique complet. La licence ODbL nexiste quen anglais. Toute traduction
de lODbL ne
pourrait avoir une quelconque valeur légale. Veuillez vous référer à la licence
<a href="https://opendatacommons.org/licenses/odbl/1-0/">
ODbL 1.0
</a>: seuls ses termes
exacts
ont une valeur légale.
</div>
</article>
</div>
</div>
</div>
</div>
</body>
</html>

16
license-osm/readme.md Normal file
View File

@ -0,0 +1,16 @@
# page clarifiant la licence ODBL pour openstreetmap
# post sur le forum
https://forum.openstreetmap.fr/t/refonte-page-copyright/16792
overflorian
> Hello,
En anticipation de la finalisation de la traduction les community guidelines, on vous propose avec @tykayn de refondre la page https://www.openstreetmap.org/copyright sur linspiration de la très limpide page https://creativecommons.org/licenses/by-sa/4.0/deed.fr
Dans lidée, on en fait une version anglaise et une française et on les proposera à léquipe qui gère osm.org.
Commençons par la version française.
# ressources
choose a licence https://creativecommons.org/choose
Tous les logos utilisés sont ici : Nextcloud
https://nextcloud.junglebus.io/index.php/s/4g7Mmj8Wo4Cqypq

View File

@ -1,39 +1,5 @@
# Conversion de jeux de données geojson en tags OSM
# Mapping Geojson to OSM
installation
```bash
npm i
npm i -g geojsontoosm
this repo has moved to its own way:
```
## Tout convertir faire d'un coup
Pour récupérer le jeu de données pour les bornes elec et convertir le geojson en fichier osm, lancer le script bash
```bash
bash refresh_data.sh
```
Export depuis overpass turbo dans OSM
https://overpass-turbo.eu/s/1yhY
## config
Configurer le filtre de département et les autres options dans convert_to_osm_tags.ts.
## utilisation
```bash
node convert_to_osm_tags.ts
```
résultat en json dans le dossier output.
La sortie est filtrée selon le mappage donné et la zone de code postal de la config.
Réalisé pour l'intégration des bornes elec.
# Ressources
Tableau de conversion de l'open data
https://wiki.openstreetmap.org/wiki/France/data.gouv.fr/Bornes_de_Recharge_pour_V%C3%A9hicules_%C3%89lectriques
# Roadmap
## bornes recharge elec IRVE
* ne pas mettre ref:EU:EVSE si la valeur vaut "non concerné"
* convertir les False en no
* enlever les source:date
* enlever les name
https://forge.chapril.org/tykayn/mapping-geojson-osm

View File

@ -1,6 +0,0 @@
module.exports = {
presets: [
['@babel/preset-env', {targets: {node: 'current'}}],
'@babel/preset-typescript',
],
};

View File

@ -1,183 +0,0 @@
/**
build all files for departements from the dataset and the mapping engine
**/
const {exec} = require('child_process');
const execSync = require("child_process").execSync;
let min_department = 1;
const max_departement = 1
let enable_domtom = true;
// const max_departement = 95
function exec_command(command: string) {
console.log('=> command',
command
)
const result = execSync(command);
// convert and show the output.
console.log(result.toString("utf8"));
}
function build_department_geojson(department: string) {
let command = `ts-node convert_to_osm_tags.ts --department=${department}`;
console.log('command', command)
exec_command(command)
}
function convert_geojson_to_osm_for_department(department: string) {
let command = `geojsontoosm output/my_converted_data_set_filtered_zipcode_${department}.json > osm_output/bornes-irve-filetered-from-etalab-opendata_dep_${department}.osm`;
console.log('command', command)
exec_command(command)
}
for (let ii = min_department; ii <= max_departement; ii++) {
let departement = '' + ii
build_department_geojson(departement)
}
for (let ii = min_department; ii <= max_departement; ii++) {
let departement = '' + ii
convert_geojson_to_osm_for_department(departement)
}
// build_department_geojson('2A')
// convert_geojson_to_osm_for_department('2A')
// build_department_geojson('2B')
// convert_geojson_to_osm_for_department('2B')
if (enable_domtom) {
// départements corse et dom tom
let more_departements = ['2A', '2B'
, '971'
, '972'
, '973'
, '974'
, '975'
, '976']
more_departements.forEach((department => {
console.log(' mapping data for department ' + department)
let departement_string = '' + department
build_department_geojson(departement_string)
}))
more_departements.forEach((department => {
console.log('convert to osm ' + department)
let departement_string = '' + department
convert_geojson_to_osm_for_department(departement_string)
}))
}
/**
Numéro Départements Chef-lieu
01 Ain Bourg-en-Bresse
02 Aisne Laon
03 Allier Moulin
04 Alpes-de-Haute-Provence Digne
05 Hautes-Alpes Gap
06 Alpes-Maritimes Nice
07 Ardèche Privas
08 Ardennes Charleville-Mézières
09 Ariège Foix
10 Aube Troyes
11 Aude Carcassonne
12 Aveyron Rodez
13 Bouches-du-Rhône Marseille
14 Calvados Caen
15 Cantal Aurillac
16 Charente Angoulême
17 Charente-Maritime La Rochelle
18 Cher Bourges
19 Corrèze Tulle
21 Côte-d'Or Dijon
22 Côtes d'Armor Saint-Brieuc
23 Creuse Guéret
24 Dordogne Périgueux
25 Doubs Besançon
26 Drôme Valence
27 Eure Evreux
28 Eure-et-Loir Chartres
29 Finistère Quimper
30 Gard Nîmes
31 Haute-Garonne Toulouse
32 Gers Auch
33 Gironde Bordeaux
34 Hérault Montpellier
35 Ille-et-Vilaine Rennes
36 Indre Châteauroux
37 Indre-et-Loire Tours
38 Isère Grenoble
39 Jura Lons-le-Saunier
40 Landes Mont-de-Marsan
41 Loir-et-Cher Blois
42 Loire St-Étienne
43 Haute-Loire Le Puy
44 Loire-Atlantique Nantes
45 Loiret Orléans
46 Lot Cahors
47 Lot-et-Garonne Agen
48 Lozère Mende
49 Maine-et-Loire Angers
50 Manche St-
51 Marne Châlons-sur-Marne
52 Haute-Marne Chaumont
53 Mayenne Laval
54 Meurthe-et-Moselle Nancy
55 Meuse Bar-le-Duc
56 Morbihan Vannes
57 Moselle Metz
58 Nièvre Nevers
59 Nord Lille
60 Oise Beauvais
61 Orne Alençon
62 Pas-de-Calais Arras
63 Puy-de-Dôme Clermont-Ferrand
64 Pyrénées-Atlantiques Pau
65 Hautes-Pyrénées Tarbes
66 Pyrénées-Orientales Perpignan
67 Bas-Rhin Strasbourg
68 Haut-Rhin Colmar
69 Rhône Lyon
70 Haute-Saône Vesoul
71 Saône-et-Loire Mâcon
72 Sarthe Le Mans
73 Savoie Chambéry
74 Haute-Savoie Annecy
75 Paris Paris
76 Seine-Maritime Rouen
77 Seine-et-Marne Melun
78 Yvelines Versailles
79 Deux-Sèvres Niort
80 Somme Amiens
81 Tarn Albi
82 Tarn-et-Garonne Montauban
83 Var Toulon
84 Vaucluse Avignon
85 Vendée La Roche-sur-Yon
86 Vienne Poitiers
87 Haute-Vienne Limoges
88 Vosges Épinal
89 Yonne Auxerre
90 Territoire de Belfort Belfort
91 Essonne Evry
92 Hauts-de-Seine Nanterre
93 Seine-St-Denis Bobigny
94 Val-de-Marne Créteil
95 Val-D'Oise Pontoise
2A Corse-du-Sud Ajaccio
2B Haute-Corse Bastia
971 Guadeloupe Basse-Terre
972 Martinique Fort-de-France
973 Guyane Cayenne
974 La Réunion Saint-Denis
976 Mayotte Mamoudzou
**/

View File

@ -1,82 +0,0 @@
import fs from "fs";
let sourceFilePath: string = './chargemap_data/hurepoix.json'
/**
makes a geojson from chargemap layer data
*/
function convertChargemapFile(sourceFilePath: string) {
fs.readFile(sourceFilePath, 'utf8', function (err, data) {
let data_transformed: any = JSON.parse(data)
let base_dataset: any = {type: 'FeatureCollection', features: []}
let base_point: any = {
type: 'Feature',
geometry: {
type: 'Point',
coordinates: []
},
properties: {
amenity: "charging_station"
}
}
console.log('data_transformed.items.length', data_transformed.items.length)
data_transformed.items.forEach((item: any) => {
let new_point: any = {...base_point}
if (item.type == 'point') {
new_point.geometry.coordinates = [
item.properties?.lat,
item.properties?.lng,
]
} else if (item.type == 'pool') {
new_point.geometry.coordinates = [
item.pool.gps_coordinates.lon,
item.pool.gps_coordinates.lat,
]
console.log('new_point.geometry.coordinates', new_point.geometry.coordinates)
}
base_dataset.features.push(new_point)
})
console.log('base_dataset.features.length', base_dataset.features.length)
if (base_dataset) {
writeFile('hurepoix_geojson.json', JSON.stringify(base_dataset, null, 2))
}
})
}
/**
* crée un fichier dans le dossier par défaut, output
* @param fileName
* @param fileContent
*/
function writeFile(fileName: string, fileContent: any) {
let output_folder = 'output';
return fs.writeFile(
`./${output_folder}/${fileName}`,
fileContent,
'utf8',
(err) => {
if (err) {
console.log(`Error writing file: ${err}`)
} else {
console.log(`File ${fileName} is written successfully!`)
}
}
)
}
convertChargemapFile(sourceFilePath)

File diff suppressed because it is too large Load Diff

View File

@ -1,384 +0,0 @@
{
"count": 18,
"items": [
{
"lat": 50.0743484,
"lng": 1.537268,
"icon": "cluster.png",
"type": "cluster",
"count": 33
},
{
"lat": 49.6465569,
"lng": 0.595749,
"icon": "cluster.png",
"type": "cluster",
"count": 31
},
{
"lat": 49.9614983,
"lng": 1.1935092,
"icon": "cluster.png",
"type": "cluster",
"count": 26
},
{
"lat": 50.1074982,
"lng": 1.8426746,
"icon": "cluster.png",
"type": "cluster",
"count": 24
},
{
"lat": 50.2155533,
"lng": 1.628114,
"icon": "cluster.png",
"type": "cluster",
"count": 22
},
{
"lat": 49.6115227,
"lng": 0.7733023,
"icon": "cluster.png",
"type": "cluster",
"count": 21
},
{
"lat": 49.9128304,
"lng": 1.0857821,
"icon": "cluster.png",
"type": "cluster",
"count": 20
},
{
"lat": 49.8144035,
"lng": 0.657026,
"icon": "cluster.png",
"type": "cluster",
"count": 16
},
{
"lat": 49.8280449,
"lng": 0.911511,
"icon": "cluster.png",
"type": "cluster",
"count": 15
},
{
"lat": 49.5984917,
"lng": 1.1111569,
"icon": "cluster.png",
"type": "cluster",
"count": 14
},
{
"lat": 49.6525497,
"lng": 1.6158921,
"icon": "cluster.png",
"type": "cluster",
"count": 11
},
{
"lat": 49.7663574,
"lng": 1.7457,
"icon": "cluster.png",
"type": "cluster",
"count": 9
},
{
"lat": 49.9557304,
"lng": 1.767372,
"icon": "cluster.png",
"type": "cluster",
"count": 7
},
{
"lat": 49.8437424,
"lng": 1.7790869,
"icon": "cluster.png",
"type": "cluster",
"count": 3
},
{
"lat": 49.6544685,
"lng": 1.832823,
"icon": "cluster.png",
"type": "cluster",
"count": 2
},
{
"lat": 49.5701447,
"lng": 0.4898517,
"icon": "cluster.png",
"type": "cluster",
"count": 2
},
{
"lat": 49.5702896,
"lng": 1.609848,
"icon": "icon-accelerated_on.png",
"type": "pool",
"pool": {
"amenities": [],
"city": "Saumont-la-Poterie",
"real_time_available": true,
"rating": null,
"i18n_country_id": 67,
"emsps": [],
"gps_coordinates": {
"lon": 1.609848,
"lat": 49.5702896
},
"street_name": "358 Route de Paris ",
"speed": {
"icon": "accelerated.svg",
"self": "charging_speeds/3.json",
"id": 3,
"map_icon": "accelerated.png"
},
"should_check_prices": true,
"number": null,
"schedules": [],
"object_state_id": 2,
"is_indoor": false,
"id": 285402,
"slug": "eco-pi-saumont-la-poterie-358-route-de-paris",
"can_remote_start_charge": false,
"statistic": {
"global_note_average": null,
"price_note_average": null,
"location_note_average": null,
"security_note_average": null,
"comments_count": 0,
"reports_count": 0,
"checkins_count": 0,
"material_note_average": null,
"creation_date": "2023-07-29T02:04:10+00:00",
"ratings_count": 1
},
"can_update_charging_pool": false,
"is_always_open": true,
"can_charge_with_chargemap": true,
"location_type_id": 21,
"network_id": 2340,
"evse_emi3_ids": [
"FR*EPI*E11734505*1"
],
"charging_connectors": [
{
"count": 5,
"available_count": 3,
"evse_ids": [
701375,
701376,
701379,
701377,
701378
],
"type": "MENNEKES_TYPE_2",
"connector_type": {
"id": 14,
"icon": "type2"
},
"power_max": 22
}
],
"is_free": false,
"name": "Eco-PI - Saumont-la-Poterie - 358 Route de Paris ",
"location_type_slug": "unknown",
"charging_speed_id": 3,
"postal_code": "76440",
"country_code": "FR",
"is_tesla": false,
"evses": [
{
"id": 701375,
"is_available": true,
"realtime_state": "AVAILABLE"
},
{
"id": 701376,
"is_available": true,
"realtime_state": "AVAILABLE"
},
{
"id": 701379,
"is_available": true,
"realtime_state": "AVAILABLE"
},
{
"id": 701377,
"is_available": false,
"realtime_state": "OUT_OF_ORDER"
},
{
"id": 701378,
"is_available": false,
"realtime_state": "OUT_OF_ORDER"
}
]
}
},
{
"lat": 49.5693893,
"lng": 0.953997,
"icon": "icon-accelerated_on.png",
"type": "pool",
"pool": {
"amenities": [
"drinks",
"restoration",
"shop",
"restroom"
],
"city": "Pavilly",
"real_time_available": true,
"rating": 4,
"i18n_country_id": 67,
"emsps": [
10,
75,
77,
107,
108,
112
],
"gps_coordinates": {
"lon": 0.953997,
"lat": 49.5693893
},
"street_name": "Place du Président d'Esneval",
"speed": {
"icon": "accelerated.svg",
"self": "charging_speeds/3.json",
"id": 3,
"map_icon": "accelerated.png"
},
"should_check_prices": true,
"number": "4",
"schedules": [],
"object_state_id": 2,
"is_indoor": false,
"id": 105727,
"slug": "sde76-place-du-president-desneval-4-pavilly",
"can_remote_start_charge": false,
"statistic": {
"global_note_average": 4,
"price_note_average": 5,
"location_note_average": 2,
"security_note_average": 5,
"comments_count": 0,
"reports_count": 0,
"checkins_count": 25,
"material_note_average": 2,
"creation_date": "2023-07-29T02:01:25+00:00",
"ratings_count": 1
},
"can_update_charging_pool": false,
"is_always_open": true,
"can_charge_with_chargemap": true,
"location_type_id": 4,
"network_id": 404,
"evse_emi3_ids": [
"FR*S76*E100*1*1"
],
"charging_connectors": [
{
"count": 4,
"available_count": 2,
"evse_ids": [
25003,
25004,
390745,
390747
],
"type": "DOMESTIC_TYPE_F",
"connector_type": {
"id": 6,
"icon": "schuko"
},
"power_max": 3
},
{
"count": 7,
"available_count": 4,
"evse_ids": [
25003,
25004,
390745,
390747,
390662,
390663,
390664
],
"type": "MENNEKES_TYPE_2",
"connector_type": {
"id": 14,
"icon": "type2"
},
"power_max": 22
},
{
"count": 3,
"available_count": 2,
"evse_ids": [
390662,
390663,
390664
],
"type": "DOMESTIC_TYPE_F",
"connector_type": {
"id": 6,
"icon": "schuko"
},
"power_max": 2
}
],
"is_free": false,
"name": "SDE76 - Place du Président d'Esneval, 4 - Pavilly",
"location_type_slug": "parking",
"charging_speed_id": 3,
"postal_code": "76570",
"country_code": "FR",
"is_tesla": false,
"evses": [
{
"id": 25003,
"is_available": true,
"realtime_state": "AVAILABLE"
},
{
"id": 25004,
"is_available": true,
"realtime_state": "AVAILABLE"
},
{
"id": 390745,
"is_available": false,
"realtime_state": "OUT_OF_ORDER"
},
{
"id": 390747,
"is_available": false,
"realtime_state": "OUT_OF_ORDER"
},
{
"id": 390662,
"is_available": false,
"realtime_state": "OUT_OF_ORDER"
},
{
"id": 390663,
"is_available": true,
"realtime_state": "AVAILABLE"
},
{
"id": 390664,
"is_available": true,
"realtime_state": "AVAILABLE"
}
]
}
}
]
}

View File

@ -1,299 +0,0 @@
/**
* convertisseur de données de bornes de recharge électrique à partir de données Chargemap et open data Etalab
*/
import * as fs from 'fs'
import mappingConfigIRVE from './mappings/converters/configIRVE'
import mappingConfigIRVE_simple from './mappings/converters/mappingConfigIRVE_simple'
import mapping_engine from './mappings/engine'
import {BoundingBoxCoordinatesType, FeatureCollection} from "./mappings/mapping-config.type";
import utils from './mappings/utils'
const minimist = require('minimist')
const debugLog = utils.debugLog;
let use_mapping_engine = false
use_mapping_engine = true
let Mapping_engine = new mapping_engine(mappingConfigIRVE)
let mini_arguments: any = minimist(process.argv.slice(2))
// let sourceFilePathGeoJson = './etalab_data/small.json'
let sourceFilePathGeoJson = './etalab_data/all.json'
// let sourceFilePathGeoJson = './output/my_converted_data_set_filtered_zipcode_91.json'
// let sourceFilePathGeoJson = './output/my_converted_data_set_filtered_zipcode_91_small.json'
// wip filter
let filterOnBoundingBox = true
filterOnBoundingBox = false
let boundingBoxCoordinates: BoundingBoxCoordinatesType = {
xMin: 1.91,
xMax: 2.38,
yMin: 48.7,
yMax: 48.4,
}
let filterCoordinates = true
filterCoordinates = false
let enable_filter_on_department = true
enable_filter_on_department = false
let filterDepartment = 91
if (mini_arguments['department']) {
filterDepartment = mini_arguments['department']
enable_filter_on_department = true
}
if (mini_arguments['source']) {
sourceFilePathGeoJson = mini_arguments['source']
}
if (mini_arguments['engine']) {
use_mapping_engine = mini_arguments['engine']
}
let filterZipCode = new RegExp(`^${filterDepartment}`)
let filterZipCodeAdresse = new RegExp(` ${filterDepartment}`)
let filteredName = ''
if (enable_filter_on_department) {
filteredName = '_filtered_zipcode_' + filterDepartment
} else if (filterOnBoundingBox) {
filteredName = '_filtered_bbox_' + boundingBoxCoordinates.xMin + '-' + boundingBoxCoordinates.xMax + '_' + boundingBoxCoordinates.yMin + '-' + boundingBoxCoordinates.yMax
}
let pointCounterMax: number = 1000000
let limitConversionToFirstPoint: boolean = false
// limitConversionToFirstPoint = true
if (limitConversionToFirstPoint) {
pointCounterMax = 1
}
let defaultPropertiesOfPoint: any = {
'amenity': 'charging_station'
}
let converted_geo_json: any = {
type: 'FeatureCollection',
features: []
}
let output_folder = 'output';
/**
* crée un fichier dans le dossier par défaut, output
* @param fileName
* @param fileContent
*/
function writeFile(fileName: string, fileContent: any) {
debugLog('write file ', fileName)
return fs.writeFile(
`./${output_folder}/${fileName}`,
fileContent,
'utf8',
(err) => {
if (err) {
debugLog(`Error writing file: ${err}`)
} else {
debugLog(`File ${fileName} is written successfully!`)
}
}
)
}
/**
*
* @param sourceFilePath
* @param mapping
* @param pointCounterMax
* @param boundingBoxCoordinates
*/
function convertDataForIRVE(sourceFilePath: string, mapping: any, pointCounterMax: number, boundingBoxCoordinates: any) {
debugLog('convertDataForIRVE from ', sourceFilePath)
fs.readFile(sourceFilePath, 'utf8', function (err, data) {
let point_counter = 0
let feature_points_after_filter: any = []
if (err) {
return debugLog(err)
}
let data_transformed: FeatureCollection = JSON.parse(data)
// debug('data keys ', Object.keys(dataTransformed))
// debugLog('properties of point 0', data_transformed.features[0])
if (data_transformed.features) {
debugLog('data found, features:', data_transformed.features.length)
// find interesting list of points to use
let list_of_points: any = data_transformed.features
debugLog('listOfPoints.length', list_of_points.length)
/**
* filtering
* TODO: do it in the engine
*/
// for each point from the data source, filter if we take it or not
list_of_points.forEach((feature_point: any) => {
let regex_filter_test_result = true
if (enable_filter_on_department) {
debugLog('filtre sur les départements activé')
regex_filter_test_result = (
filterZipCode.test(feature_point.properties.consolidated_code_postal)
||
filterZipCodeAdresse.test(feature_point.properties.adresse_station)
)
} else {
debugLog('pas de filtre sur les départements')
}
if (filterOnBoundingBox) {
debugLog('filtre sur les coordonnées bounding box activé')
let x = feature_point.properties.coordonneesXY[0]
let xMin = boundingBoxCoordinates.xMin
let xMax = boundingBoxCoordinates.xMax
let yMin = boundingBoxCoordinates.yMin
let yMax = boundingBoxCoordinates.yMax
let y = feature_point.properties.coordonneesXY[1]
regex_filter_test_result = (
(x >= xMin && x <= xMax)
&&
(y >= yMin && y <= yMax)
)
} else {
debugLog('pas de filtre sur les coordonnées bounding box')
}
// TODO add filter offset max
// filter points depending on zipcode
if (regex_filter_test_result) {
feature_points_after_filter.push(feature_point)
debugLog(' +1 point', point_counter)
point_counter++
}
})
/**
* conversion
*/
debugLog(' after filtering, feature_points_after_filter number of points: ', feature_points_after_filter.length)
feature_points_after_filter.forEach((feature_point: any) => {
// debugLog('featurePoint.properties.consolidated_code_postal', feature_point.properties.consolidated_code_postal)
debugLog('convert : work on 1 point')
// debugLog('convert :featurePoint', feature_point)
let mapped_point: any = {}
if (use_mapping_engine) {
// debugLog('convert :using mapping engine on feature point'
// , feature_point
// )
mapped_point = Mapping_engine.mapElementFromConf(feature_point)
debugLog('mapped_point', mapped_point)
} else {
debugLog('convert :using simple converter on feature point', feature_point)
mapped_point = mapElementFromConfSimple(feature_point, mapping)
}
// debugLog('mapped_point one point', mapped_point)
if (mapped_point) {
converted_geo_json.features.push(mapped_point)
debugLog('convert : added one point to converted_geo_json')
} else {
debugLog('convert : !!! there is no map one point')
}
})
// output new geojson
debugLog('convert : convertedGeoJson.features.length', converted_geo_json.features.length)
// write file on disk
if (converted_geo_json.features.length) {
let fileNameToWrite = 'my_converted_data_set' + filteredName + '.json'
console.log('features: ', converted_geo_json.features.length)
debugLog('convert : write file ', fileNameToWrite)
writeFile(fileNameToWrite, JSON.stringify(converted_geo_json, null, 2))
} else {
console.log('convert : no writing of file, because there is no converted feature')
}
// console.log('convert : converted_geo_json output:', converted_geo_json.features)
return converted_geo_json
}
})
}
/**
* retuns the converted element from mapping config if present, null otherwise
*/
function mapElementFromConfSimple(featurePoint: any, mappingConfig: any) {
let mappingKeys = Object.keys(mappingConfig)
let featurePointPropertiesKeys = Object.keys(featurePoint.properties)
debugLog('keys', mappingKeys, featurePointPropertiesKeys)
let newProperties: any = defaultPropertiesOfPoint
// reinit properties of current point
let basePoint = Object.create(featurePoint)
basePoint.type = featurePoint.type
basePoint.geometry = featurePoint.geometry
basePoint.properties = newProperties
// apply new properties if found in mapping config
featurePointPropertiesKeys.forEach((pointKeyName: string) => {
if (mappingKeys.indexOf(pointKeyName) !== -1) {
// debugLog('found element', pointKeyName, '=>', mappingConfig[pointKeyName], 'value : ', featurePoint.properties[pointKeyName])
let convertedValue: any = ''
if (utils.isBooleanKey(pointKeyName)) {
let copyOfValue: any = '' + featurePoint.properties[pointKeyName]
if (typeof copyOfValue === typeof Object && copyOfValue.key_converted) {
copyOfValue = copyOfValue.key_converted
}
convertedValue = copyOfValue.toLowerCase() == 'true' ? 'yes' : 'no'
} else {
convertedValue = featurePoint.properties[pointKeyName]
}
if (convertedValue) {
let convertedKey: any = mappingConfig[pointKeyName]
newProperties[convertedKey] = convertedValue
}
}
})
debugLog('basePoint', basePoint)
return basePoint
}
if (use_mapping_engine) {
debugLog(' - using mapping engine')
debugLog(' - pointCounterMax', pointCounterMax)
Mapping_engine.setConfig(mappingConfigIRVE)
convertDataForIRVE(sourceFilePathGeoJson, mappingConfigIRVE, pointCounterMax, boundingBoxCoordinates)
} else {
let mappingConfigIRVE = mappingConfigIRVE_simple
convertDataForIRVE(sourceFilePathGeoJson, mappingConfigIRVE, pointCounterMax, boundingBoxCoordinates)
}

View File

@ -1,260 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<coverage generated="1691227045577" clover="3.2.0">
<project timestamp="1691227045577" name="All files">
<metrics statements="239" coveredstatements="113" conditionals="6" coveredconditionals="4" methods="9" coveredmethods="4" elements="254" coveredelements="121" complexity="0" loc="239" ncloc="239" packages="2" files="3" classes="3"/>
<package name="data_other.testing">
<metrics statements="34" coveredstatements="34" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/>
<file name="mappings_to_test.ts" path="/home/poule/encrypted/stockage-syncable/www/development/html/scripts/mapping_geojson_to_osm_tags/data_other/testing/mappings_to_test.ts">
<metrics statements="34" coveredstatements="34" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/>
<line num="1" count="1" type="stmt"/>
<line num="2" count="1" type="stmt"/>
<line num="3" count="1" type="stmt"/>
<line num="4" count="1" type="stmt"/>
<line num="5" count="1" type="stmt"/>
<line num="6" count="1" type="stmt"/>
<line num="7" count="1" type="stmt"/>
<line num="8" count="1" type="stmt"/>
<line num="9" count="1" type="stmt"/>
<line num="10" count="1" type="stmt"/>
<line num="11" count="1" type="stmt"/>
<line num="12" count="1" type="stmt"/>
<line num="13" count="1" type="stmt"/>
<line num="14" count="1" type="stmt"/>
<line num="15" count="1" type="stmt"/>
<line num="16" count="1" type="stmt"/>
<line num="17" count="1" type="stmt"/>
<line num="18" count="1" type="stmt"/>
<line num="19" count="1" type="stmt"/>
<line num="20" count="1" type="stmt"/>
<line num="21" count="1" type="stmt"/>
<line num="22" count="1" type="stmt"/>
<line num="23" count="1" type="stmt"/>
<line num="24" count="1" type="stmt"/>
<line num="25" count="1" type="stmt"/>
<line num="26" count="1" type="stmt"/>
<line num="27" count="1" type="stmt"/>
<line num="28" count="1" type="stmt"/>
<line num="29" count="1" type="stmt"/>
<line num="30" count="1" type="stmt"/>
<line num="31" count="1" type="stmt"/>
<line num="32" count="1" type="stmt"/>
<line num="33" count="1" type="stmt"/>
<line num="34" count="1" type="stmt"/>
</file>
</package>
<package name="mappings">
<metrics statements="205" coveredstatements="79" conditionals="6" coveredconditionals="4" methods="9" coveredmethods="4"/>
<file name="engine.ts" path="/home/poule/encrypted/stockage-syncable/www/development/html/scripts/mapping_geojson_to_osm_tags/mappings/engine.ts">
<metrics statements="203" coveredstatements="77" conditionals="6" coveredconditionals="4" methods="9" coveredmethods="4"/>
<line num="1" count="1" type="stmt"/>
<line num="2" count="1" type="stmt"/>
<line num="3" count="1" type="stmt"/>
<line num="4" count="1" type="stmt"/>
<line num="5" count="1" type="stmt"/>
<line num="6" count="1" type="stmt"/>
<line num="7" count="1" type="stmt"/>
<line num="8" count="1" type="stmt"/>
<line num="9" count="1" type="stmt"/>
<line num="10" count="1" type="stmt"/>
<line num="11" count="1" type="stmt"/>
<line num="12" count="1" type="stmt"/>
<line num="13" count="1" type="stmt"/>
<line num="14" count="1" type="stmt"/>
<line num="15" count="1" type="stmt"/>
<line num="16" count="1" type="cond" truecount="1" falsecount="0"/>
<line num="17" count="1" type="stmt"/>
<line num="18" count="1" type="stmt"/>
<line num="19" count="1" type="cond" truecount="1" falsecount="0"/>
<line num="20" count="1" type="stmt"/>
<line num="21" count="1" type="stmt"/>
<line num="22" count="1" type="stmt"/>
<line num="23" count="1" type="cond" truecount="1" falsecount="0"/>
<line num="24" count="1" type="stmt"/>
<line num="25" count="1" type="stmt"/>
<line num="26" count="1" type="stmt"/>
<line num="27" count="1" type="stmt"/>
<line num="28" count="0" type="stmt"/>
<line num="29" count="0" type="stmt"/>
<line num="30" count="0" type="stmt"/>
<line num="31" count="0" type="stmt"/>
<line num="32" count="0" type="stmt"/>
<line num="33" count="0" type="stmt"/>
<line num="34" count="0" type="stmt"/>
<line num="35" count="0" type="stmt"/>
<line num="36" count="0" type="stmt"/>
<line num="37" count="0" type="stmt"/>
<line num="38" count="0" type="stmt"/>
<line num="39" count="0" type="stmt"/>
<line num="40" count="0" type="stmt"/>
<line num="41" count="0" type="stmt"/>
<line num="42" count="1" type="stmt"/>
<line num="43" count="1" type="stmt"/>
<line num="44" count="1" type="stmt"/>
<line num="45" count="1" type="stmt"/>
<line num="46" count="1" type="stmt"/>
<line num="47" count="1" type="stmt"/>
<line num="48" count="1" type="stmt"/>
<line num="49" count="0" type="stmt"/>
<line num="50" count="0" type="stmt"/>
<line num="51" count="0" type="stmt"/>
<line num="52" count="1" type="stmt"/>
<line num="53" count="1" type="stmt"/>
<line num="54" count="1" type="stmt"/>
<line num="55" count="1" type="stmt"/>
<line num="56" count="1" type="stmt"/>
<line num="57" count="1" type="stmt"/>
<line num="58" count="1" type="stmt"/>
<line num="59" count="1" type="stmt"/>
<line num="60" count="1" type="stmt"/>
<line num="61" count="1" type="stmt"/>
<line num="62" count="0" type="stmt"/>
<line num="63" count="0" type="stmt"/>
<line num="64" count="0" type="stmt"/>
<line num="65" count="0" type="stmt"/>
<line num="66" count="1" type="stmt"/>
<line num="67" count="1" type="stmt"/>
<line num="68" count="1" type="stmt"/>
<line num="69" count="1" type="stmt"/>
<line num="70" count="1" type="stmt"/>
<line num="71" count="1" type="stmt"/>
<line num="72" count="1" type="stmt"/>
<line num="73" count="1" type="stmt"/>
<line num="74" count="1" type="stmt"/>
<line num="75" count="0" type="stmt"/>
<line num="76" count="0" type="stmt"/>
<line num="77" count="0" type="stmt"/>
<line num="78" count="0" type="stmt"/>
<line num="79" count="0" type="stmt"/>
<line num="80" count="1" type="stmt"/>
<line num="81" count="1" type="stmt"/>
<line num="82" count="1" type="stmt"/>
<line num="83" count="1" type="stmt"/>
<line num="84" count="1" type="cond" truecount="1" falsecount="0"/>
<line num="85" count="1" type="cond" truecount="0" falsecount="1"/>
<line num="86" count="0" type="stmt"/>
<line num="87" count="0" type="stmt"/>
<line num="88" count="1" type="stmt"/>
<line num="89" count="1" type="stmt"/>
<line num="90" count="1" type="stmt"/>
<line num="91" count="1" type="stmt"/>
<line num="92" count="1" type="stmt"/>
<line num="93" count="1" type="stmt"/>
<line num="94" count="1" type="stmt"/>
<line num="95" count="1" type="stmt"/>
<line num="96" count="1" type="stmt"/>
<line num="97" count="1" type="stmt"/>
<line num="98" count="1" type="stmt"/>
<line num="99" count="1" type="stmt"/>
<line num="100" count="1" type="stmt"/>
<line num="101" count="1" type="cond" truecount="0" falsecount="1"/>
<line num="102" count="0" type="stmt"/>
<line num="103" count="0" type="stmt"/>
<line num="104" count="0" type="stmt"/>
<line num="105" count="0" type="stmt"/>
<line num="106" count="0" type="stmt"/>
<line num="107" count="0" type="stmt"/>
<line num="108" count="0" type="stmt"/>
<line num="109" count="0" type="stmt"/>
<line num="110" count="0" type="stmt"/>
<line num="111" count="0" type="stmt"/>
<line num="112" count="0" type="stmt"/>
<line num="113" count="0" type="stmt"/>
<line num="114" count="0" type="stmt"/>
<line num="115" count="0" type="stmt"/>
<line num="116" count="0" type="stmt"/>
<line num="117" count="0" type="stmt"/>
<line num="118" count="0" type="stmt"/>
<line num="119" count="1" type="stmt"/>
<line num="120" count="1" type="stmt"/>
<line num="121" count="0" type="stmt"/>
<line num="122" count="0" type="stmt"/>
<line num="123" count="0" type="stmt"/>
<line num="124" count="0" type="stmt"/>
<line num="125" count="0" type="stmt"/>
<line num="126" count="0" type="stmt"/>
<line num="127" count="0" type="stmt"/>
<line num="128" count="0" type="stmt"/>
<line num="129" count="0" type="stmt"/>
<line num="130" count="0" type="stmt"/>
<line num="131" count="0" type="stmt"/>
<line num="132" count="0" type="stmt"/>
<line num="133" count="0" type="stmt"/>
<line num="134" count="0" type="stmt"/>
<line num="135" count="0" type="stmt"/>
<line num="136" count="0" type="stmt"/>
<line num="137" count="0" type="stmt"/>
<line num="138" count="0" type="stmt"/>
<line num="139" count="0" type="stmt"/>
<line num="140" count="0" type="stmt"/>
<line num="141" count="0" type="stmt"/>
<line num="142" count="0" type="stmt"/>
<line num="143" count="0" type="stmt"/>
<line num="144" count="0" type="stmt"/>
<line num="145" count="0" type="stmt"/>
<line num="146" count="0" type="stmt"/>
<line num="147" count="0" type="stmt"/>
<line num="148" count="0" type="stmt"/>
<line num="149" count="0" type="stmt"/>
<line num="150" count="0" type="stmt"/>
<line num="151" count="0" type="stmt"/>
<line num="152" count="0" type="stmt"/>
<line num="153" count="0" type="stmt"/>
<line num="154" count="0" type="stmt"/>
<line num="155" count="0" type="stmt"/>
<line num="156" count="0" type="stmt"/>
<line num="157" count="0" type="stmt"/>
<line num="158" count="0" type="stmt"/>
<line num="159" count="0" type="stmt"/>
<line num="160" count="0" type="stmt"/>
<line num="161" count="0" type="stmt"/>
<line num="162" count="0" type="stmt"/>
<line num="163" count="0" type="stmt"/>
<line num="164" count="0" type="stmt"/>
<line num="165" count="0" type="stmt"/>
<line num="166" count="0" type="stmt"/>
<line num="167" count="0" type="stmt"/>
<line num="168" count="0" type="stmt"/>
<line num="169" count="0" type="stmt"/>
<line num="170" count="0" type="stmt"/>
<line num="171" count="0" type="stmt"/>
<line num="172" count="0" type="stmt"/>
<line num="173" count="0" type="stmt"/>
<line num="174" count="0" type="stmt"/>
<line num="175" count="0" type="stmt"/>
<line num="176" count="0" type="stmt"/>
<line num="177" count="0" type="stmt"/>
<line num="178" count="0" type="stmt"/>
<line num="179" count="0" type="stmt"/>
<line num="180" count="0" type="stmt"/>
<line num="181" count="0" type="stmt"/>
<line num="182" count="0" type="stmt"/>
<line num="183" count="0" type="stmt"/>
<line num="184" count="0" type="stmt"/>
<line num="185" count="0" type="stmt"/>
<line num="186" count="0" type="stmt"/>
<line num="187" count="0" type="stmt"/>
<line num="188" count="0" type="stmt"/>
<line num="189" count="0" type="stmt"/>
<line num="190" count="0" type="stmt"/>
<line num="191" count="0" type="stmt"/>
<line num="192" count="0" type="stmt"/>
<line num="193" count="0" type="stmt"/>
<line num="194" count="0" type="stmt"/>
<line num="195" count="0" type="stmt"/>
<line num="196" count="0" type="stmt"/>
<line num="197" count="0" type="stmt"/>
<line num="198" count="0" type="stmt"/>
<line num="199" count="0" type="stmt"/>
<line num="200" count="0" type="stmt"/>
<line num="201" count="0" type="stmt"/>
<line num="202" count="1" type="stmt"/>
<line num="203" count="1" type="stmt"/>
</file>
<file name="mapping-config.type.js" path="/home/poule/encrypted/stockage-syncable/www/development/html/scripts/mapping_geojson_to_osm_tags/mappings/mapping-config.type.js">
<metrics statements="2" coveredstatements="2" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/>
<line num="1" count="1" type="stmt"/>
<line num="2" count="1" type="stmt"/>
</file>
</package>
</project>
</coverage>

File diff suppressed because one or more lines are too long

View File

@ -1,224 +0,0 @@
body, html {
margin:0; padding: 0;
height: 100%;
}
body {
font-family: Helvetica Neue, Helvetica, Arial;
font-size: 14px;
color:#333;
}
.small { font-size: 12px; }
*, *:after, *:before {
-webkit-box-sizing:border-box;
-moz-box-sizing:border-box;
box-sizing:border-box;
}
h1 { font-size: 20px; margin: 0;}
h2 { font-size: 14px; }
pre {
font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace;
margin: 0;
padding: 0;
-moz-tab-size: 2;
-o-tab-size: 2;
tab-size: 2;
}
a { color:#0074D9; text-decoration:none; }
a:hover { text-decoration:underline; }
.strong { font-weight: bold; }
.space-top1 { padding: 10px 0 0 0; }
.pad2y { padding: 20px 0; }
.pad1y { padding: 10px 0; }
.pad2x { padding: 0 20px; }
.pad2 { padding: 20px; }
.pad1 { padding: 10px; }
.space-left2 { padding-left:55px; }
.space-right2 { padding-right:20px; }
.center { text-align:center; }
.clearfix { display:block; }
.clearfix:after {
content:'';
display:block;
height:0;
clear:both;
visibility:hidden;
}
.fl { float: left; }
@media only screen and (max-width:640px) {
.col3 { width:100%; max-width:100%; }
.hide-mobile { display:none!important; }
}
.quiet {
color: #7f7f7f;
color: rgba(0,0,0,0.5);
}
.quiet a { opacity: 0.7; }
.fraction {
font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;
font-size: 10px;
color: #555;
background: #E8E8E8;
padding: 4px 5px;
border-radius: 3px;
vertical-align: middle;
}
div.path a:link, div.path a:visited { color: #333; }
table.coverage {
border-collapse: collapse;
margin: 10px 0 0 0;
padding: 0;
}
table.coverage td {
margin: 0;
padding: 0;
vertical-align: top;
}
table.coverage td.line-count {
text-align: right;
padding: 0 5px 0 20px;
}
table.coverage td.line-coverage {
text-align: right;
padding-right: 10px;
min-width:20px;
}
table.coverage td span.cline-any {
display: inline-block;
padding: 0 5px;
width: 100%;
}
.missing-if-branch {
display: inline-block;
margin-right: 5px;
border-radius: 3px;
position: relative;
padding: 0 4px;
background: #333;
color: yellow;
}
.skip-if-branch {
display: none;
margin-right: 10px;
position: relative;
padding: 0 4px;
background: #ccc;
color: white;
}
.missing-if-branch .typ, .skip-if-branch .typ {
color: inherit !important;
}
.coverage-summary {
border-collapse: collapse;
width: 100%;
}
.coverage-summary tr { border-bottom: 1px solid #bbb; }
.keyline-all { border: 1px solid #ddd; }
.coverage-summary td, .coverage-summary th { padding: 10px; }
.coverage-summary tbody { border: 1px solid #bbb; }
.coverage-summary td { border-right: 1px solid #bbb; }
.coverage-summary td:last-child { border-right: none; }
.coverage-summary th {
text-align: left;
font-weight: normal;
white-space: nowrap;
}
.coverage-summary th.file { border-right: none !important; }
.coverage-summary th.pct { }
.coverage-summary th.pic,
.coverage-summary th.abs,
.coverage-summary td.pct,
.coverage-summary td.abs { text-align: right; }
.coverage-summary td.file { white-space: nowrap; }
.coverage-summary td.pic { min-width: 120px !important; }
.coverage-summary tfoot td { }
.coverage-summary .sorter {
height: 10px;
width: 7px;
display: inline-block;
margin-left: 0.5em;
background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent;
}
.coverage-summary .sorted .sorter {
background-position: 0 -20px;
}
.coverage-summary .sorted-desc .sorter {
background-position: 0 -10px;
}
.status-line { height: 10px; }
/* yellow */
.cbranch-no { background: yellow !important; color: #111; }
/* dark red */
.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 }
.low .chart { border:1px solid #C21F39 }
.highlighted,
.highlighted .cstat-no, .highlighted .fstat-no, .highlighted .cbranch-no{
background: #C21F39 !important;
}
/* medium red */
.cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE }
/* light red */
.low, .cline-no { background:#FCE1E5 }
/* light green */
.high, .cline-yes { background:rgb(230,245,208) }
/* medium green */
.cstat-yes { background:rgb(161,215,106) }
/* dark green */
.status-line.high, .high .cover-fill { background:rgb(77,146,33) }
.high .chart { border:1px solid rgb(77,146,33) }
/* dark yellow (gold) */
.status-line.medium, .medium .cover-fill { background: #f9cd0b; }
.medium .chart { border:1px solid #f9cd0b; }
/* light yellow */
.medium { background: #fff4c2; }
.cstat-skip { background: #ddd; color: #111; }
.fstat-skip { background: #ddd; color: #111 !important; }
.cbranch-skip { background: #ddd !important; color: #111; }
span.cline-neutral { background: #eaeaea; }
.coverage-summary td.empty {
opacity: .5;
padding-top: 4px;
padding-bottom: 4px;
line-height: 1;
color: #888;
}
.cover-fill, .cover-empty {
display:inline-block;
height: 12px;
}
.chart {
line-height: 0;
}
.cover-empty {
background: white;
}
.cover-full {
border-right: none !important;
}
pre.prettyprint {
border: none !important;
padding: 0 !important;
margin: 0 !important;
}
.com { color: #999 !important; }
.ignore-none { color: #999; font-weight: normal; }
.wrapper {
min-height: 100%;
height: auto !important;
height: 100%;
margin: 0 auto -48px;
}
.footer, .push {
height: 48px;
}

View File

@ -1,87 +0,0 @@
/* eslint-disable */
var jumpToCode = (function init() {
// Classes of code we would like to highlight in the file view
var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no'];
// Elements to highlight in the file listing view
var fileListingElements = ['td.pct.low'];
// We don't want to select elements that are direct descendants of another match
var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > `
// Selecter that finds elements on the page to which we can jump
var selector =
fileListingElements.join(', ') +
', ' +
notSelector +
missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b`
// The NodeList of matching elements
var missingCoverageElements = document.querySelectorAll(selector);
var currentIndex;
function toggleClass(index) {
missingCoverageElements
.item(currentIndex)
.classList.remove('highlighted');
missingCoverageElements.item(index).classList.add('highlighted');
}
function makeCurrent(index) {
toggleClass(index);
currentIndex = index;
missingCoverageElements.item(index).scrollIntoView({
behavior: 'smooth',
block: 'center',
inline: 'center'
});
}
function goToPrevious() {
var nextIndex = 0;
if (typeof currentIndex !== 'number' || currentIndex === 0) {
nextIndex = missingCoverageElements.length - 1;
} else if (missingCoverageElements.length > 1) {
nextIndex = currentIndex - 1;
}
makeCurrent(nextIndex);
}
function goToNext() {
var nextIndex = 0;
if (
typeof currentIndex === 'number' &&
currentIndex < missingCoverageElements.length - 1
) {
nextIndex = currentIndex + 1;
}
makeCurrent(nextIndex);
}
return function jump(event) {
if (
document.getElementById('fileSearch') === document.activeElement &&
document.activeElement != null
) {
// if we're currently focused on the search input, we don't want to navigate
return;
}
switch (event.which) {
case 78: // n
case 74: // j
goToNext();
break;
case 66: // b
case 75: // k
case 80: // p
goToPrevious();
break;
}
};
})();
window.addEventListener('keydown', jumpToCode);

View File

@ -1,116 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for data_other/testing</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../prettify.css" />
<link rel="stylesheet" href="../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../index.html">All files</a> data_other/testing</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>34/34</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>0/0</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>0/0</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>34/34</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
<template id="filterTemplate">
<div class="quiet">
Filter:
<input oninput="onInput()" type="search" id="fileSearch">
</div>
</template>
</div>
<div class='status-line high'></div>
<div class="pad1">
<table class="coverage-summary">
<thead>
<tr>
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
</tr>
</thead>
<tbody><tr>
<td class="file high" data-value="mappings_to_test.ts"><a href="mappings_to_test.ts.html">mappings_to_test.ts</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="34" class="abs high">34/34</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="0" class="abs high">0/0</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="0" class="abs high">0/0</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="34" class="abs high">34/34</td>
</tr>
</tbody>
</table>
</div>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2023-08-05T09:17:25.573Z
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../sorter.js"></script>
<script src="../../block-navigation.js"></script>
</body>
</html>

View File

@ -1,184 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for data_other/testing/mappings_to_test.ts</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../prettify.css" />
<link rel="stylesheet" href="../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../index.html">All files</a> / <a href="index.html">data_other/testing</a> mappings_to_test.ts</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>34/34</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>0/0</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>0/0</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>34/34</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
<template id="filterTemplate">
<div class="quiet">
Filter:
<input oninput="onInput()" type="search" id="fileSearch">
</div>
</template>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a>
<a name='L32'></a><a href='#L32'>32</a>
<a name='L33'></a><a href='#L33'>33</a>
<a name='L34'></a><a href='#L34'>34</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span></td><td class="text"><pre class="prettyprint lang-js">import MappingConfigType from "../../mappings/mapping-config.type";
&nbsp;
/**
* configurations de mapping pour les cas de tests
*/
export const mappingRemoveAll: MappingConfigType = {
config_name: 'testing config',
config_author: 'tykayn &lt;contact@cipherbliss.com&gt;',
default_properties_of_point: {
'amenity': 'charging_station'
},
tags: {
nom_amenageur: {
key_converted: 'autre_nom_amenageur',
conditional_values: {
'Accessibilité inconnue': {
ignore_this_data: true, // ne pas ajouter de tag si la valeur est égale à Accessibilité inconnue.
},
}
}
}
}
export const mappingIgnore: MappingConfigType = {
config_name: 'testing config',
config_author: 'tykayn &lt;contact@cipherbliss.com&gt;',
default_properties_of_point: {
'amenity': 'charging_station'
},
tags: {
nom_amenageur: {
ignore_this_data: true,
}
}
}</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2023-08-05T09:17:25.573Z
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../sorter.js"></script>
<script src="../../block-navigation.js"></script>
</body>
</html>

View File

@ -1,691 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for engine.ts</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="prettify.css" />
<link rel="stylesheet" href="base.css" />
<link rel="shortcut icon" type="image/x-icon" href="favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="index.html">All files</a> engine.ts</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">37.43% </span>
<span class="quiet">Statements</span>
<span class='fraction'>76/203</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">66.66% </span>
<span class="quiet">Branches</span>
<span class='fraction'>4/6</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">44.44% </span>
<span class="quiet">Functions</span>
<span class='fraction'>4/9</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">37.43% </span>
<span class="quiet">Lines</span>
<span class='fraction'>76/203</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
<template id="filterTemplate">
<div class="quiet">
Filter:
<input oninput="onInput()" type="search" id="fileSearch">
</div>
</template>
</div>
<div class='status-line low'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a>
<a name='L32'></a><a href='#L32'>32</a>
<a name='L33'></a><a href='#L33'>33</a>
<a name='L34'></a><a href='#L34'>34</a>
<a name='L35'></a><a href='#L35'>35</a>
<a name='L36'></a><a href='#L36'>36</a>
<a name='L37'></a><a href='#L37'>37</a>
<a name='L38'></a><a href='#L38'>38</a>
<a name='L39'></a><a href='#L39'>39</a>
<a name='L40'></a><a href='#L40'>40</a>
<a name='L41'></a><a href='#L41'>41</a>
<a name='L42'></a><a href='#L42'>42</a>
<a name='L43'></a><a href='#L43'>43</a>
<a name='L44'></a><a href='#L44'>44</a>
<a name='L45'></a><a href='#L45'>45</a>
<a name='L46'></a><a href='#L46'>46</a>
<a name='L47'></a><a href='#L47'>47</a>
<a name='L48'></a><a href='#L48'>48</a>
<a name='L49'></a><a href='#L49'>49</a>
<a name='L50'></a><a href='#L50'>50</a>
<a name='L51'></a><a href='#L51'>51</a>
<a name='L52'></a><a href='#L52'>52</a>
<a name='L53'></a><a href='#L53'>53</a>
<a name='L54'></a><a href='#L54'>54</a>
<a name='L55'></a><a href='#L55'>55</a>
<a name='L56'></a><a href='#L56'>56</a>
<a name='L57'></a><a href='#L57'>57</a>
<a name='L58'></a><a href='#L58'>58</a>
<a name='L59'></a><a href='#L59'>59</a>
<a name='L60'></a><a href='#L60'>60</a>
<a name='L61'></a><a href='#L61'>61</a>
<a name='L62'></a><a href='#L62'>62</a>
<a name='L63'></a><a href='#L63'>63</a>
<a name='L64'></a><a href='#L64'>64</a>
<a name='L65'></a><a href='#L65'>65</a>
<a name='L66'></a><a href='#L66'>66</a>
<a name='L67'></a><a href='#L67'>67</a>
<a name='L68'></a><a href='#L68'>68</a>
<a name='L69'></a><a href='#L69'>69</a>
<a name='L70'></a><a href='#L70'>70</a>
<a name='L71'></a><a href='#L71'>71</a>
<a name='L72'></a><a href='#L72'>72</a>
<a name='L73'></a><a href='#L73'>73</a>
<a name='L74'></a><a href='#L74'>74</a>
<a name='L75'></a><a href='#L75'>75</a>
<a name='L76'></a><a href='#L76'>76</a>
<a name='L77'></a><a href='#L77'>77</a>
<a name='L78'></a><a href='#L78'>78</a>
<a name='L79'></a><a href='#L79'>79</a>
<a name='L80'></a><a href='#L80'>80</a>
<a name='L81'></a><a href='#L81'>81</a>
<a name='L82'></a><a href='#L82'>82</a>
<a name='L83'></a><a href='#L83'>83</a>
<a name='L84'></a><a href='#L84'>84</a>
<a name='L85'></a><a href='#L85'>85</a>
<a name='L86'></a><a href='#L86'>86</a>
<a name='L87'></a><a href='#L87'>87</a>
<a name='L88'></a><a href='#L88'>88</a>
<a name='L89'></a><a href='#L89'>89</a>
<a name='L90'></a><a href='#L90'>90</a>
<a name='L91'></a><a href='#L91'>91</a>
<a name='L92'></a><a href='#L92'>92</a>
<a name='L93'></a><a href='#L93'>93</a>
<a name='L94'></a><a href='#L94'>94</a>
<a name='L95'></a><a href='#L95'>95</a>
<a name='L96'></a><a href='#L96'>96</a>
<a name='L97'></a><a href='#L97'>97</a>
<a name='L98'></a><a href='#L98'>98</a>
<a name='L99'></a><a href='#L99'>99</a>
<a name='L100'></a><a href='#L100'>100</a>
<a name='L101'></a><a href='#L101'>101</a>
<a name='L102'></a><a href='#L102'>102</a>
<a name='L103'></a><a href='#L103'>103</a>
<a name='L104'></a><a href='#L104'>104</a>
<a name='L105'></a><a href='#L105'>105</a>
<a name='L106'></a><a href='#L106'>106</a>
<a name='L107'></a><a href='#L107'>107</a>
<a name='L108'></a><a href='#L108'>108</a>
<a name='L109'></a><a href='#L109'>109</a>
<a name='L110'></a><a href='#L110'>110</a>
<a name='L111'></a><a href='#L111'>111</a>
<a name='L112'></a><a href='#L112'>112</a>
<a name='L113'></a><a href='#L113'>113</a>
<a name='L114'></a><a href='#L114'>114</a>
<a name='L115'></a><a href='#L115'>115</a>
<a name='L116'></a><a href='#L116'>116</a>
<a name='L117'></a><a href='#L117'>117</a>
<a name='L118'></a><a href='#L118'>118</a>
<a name='L119'></a><a href='#L119'>119</a>
<a name='L120'></a><a href='#L120'>120</a>
<a name='L121'></a><a href='#L121'>121</a>
<a name='L122'></a><a href='#L122'>122</a>
<a name='L123'></a><a href='#L123'>123</a>
<a name='L124'></a><a href='#L124'>124</a>
<a name='L125'></a><a href='#L125'>125</a>
<a name='L126'></a><a href='#L126'>126</a>
<a name='L127'></a><a href='#L127'>127</a>
<a name='L128'></a><a href='#L128'>128</a>
<a name='L129'></a><a href='#L129'>129</a>
<a name='L130'></a><a href='#L130'>130</a>
<a name='L131'></a><a href='#L131'>131</a>
<a name='L132'></a><a href='#L132'>132</a>
<a name='L133'></a><a href='#L133'>133</a>
<a name='L134'></a><a href='#L134'>134</a>
<a name='L135'></a><a href='#L135'>135</a>
<a name='L136'></a><a href='#L136'>136</a>
<a name='L137'></a><a href='#L137'>137</a>
<a name='L138'></a><a href='#L138'>138</a>
<a name='L139'></a><a href='#L139'>139</a>
<a name='L140'></a><a href='#L140'>140</a>
<a name='L141'></a><a href='#L141'>141</a>
<a name='L142'></a><a href='#L142'>142</a>
<a name='L143'></a><a href='#L143'>143</a>
<a name='L144'></a><a href='#L144'>144</a>
<a name='L145'></a><a href='#L145'>145</a>
<a name='L146'></a><a href='#L146'>146</a>
<a name='L147'></a><a href='#L147'>147</a>
<a name='L148'></a><a href='#L148'>148</a>
<a name='L149'></a><a href='#L149'>149</a>
<a name='L150'></a><a href='#L150'>150</a>
<a name='L151'></a><a href='#L151'>151</a>
<a name='L152'></a><a href='#L152'>152</a>
<a name='L153'></a><a href='#L153'>153</a>
<a name='L154'></a><a href='#L154'>154</a>
<a name='L155'></a><a href='#L155'>155</a>
<a name='L156'></a><a href='#L156'>156</a>
<a name='L157'></a><a href='#L157'>157</a>
<a name='L158'></a><a href='#L158'>158</a>
<a name='L159'></a><a href='#L159'>159</a>
<a name='L160'></a><a href='#L160'>160</a>
<a name='L161'></a><a href='#L161'>161</a>
<a name='L162'></a><a href='#L162'>162</a>
<a name='L163'></a><a href='#L163'>163</a>
<a name='L164'></a><a href='#L164'>164</a>
<a name='L165'></a><a href='#L165'>165</a>
<a name='L166'></a><a href='#L166'>166</a>
<a name='L167'></a><a href='#L167'>167</a>
<a name='L168'></a><a href='#L168'>168</a>
<a name='L169'></a><a href='#L169'>169</a>
<a name='L170'></a><a href='#L170'>170</a>
<a name='L171'></a><a href='#L171'>171</a>
<a name='L172'></a><a href='#L172'>172</a>
<a name='L173'></a><a href='#L173'>173</a>
<a name='L174'></a><a href='#L174'>174</a>
<a name='L175'></a><a href='#L175'>175</a>
<a name='L176'></a><a href='#L176'>176</a>
<a name='L177'></a><a href='#L177'>177</a>
<a name='L178'></a><a href='#L178'>178</a>
<a name='L179'></a><a href='#L179'>179</a>
<a name='L180'></a><a href='#L180'>180</a>
<a name='L181'></a><a href='#L181'>181</a>
<a name='L182'></a><a href='#L182'>182</a>
<a name='L183'></a><a href='#L183'>183</a>
<a name='L184'></a><a href='#L184'>184</a>
<a name='L185'></a><a href='#L185'>185</a>
<a name='L186'></a><a href='#L186'>186</a>
<a name='L187'></a><a href='#L187'>187</a>
<a name='L188'></a><a href='#L188'>188</a>
<a name='L189'></a><a href='#L189'>189</a>
<a name='L190'></a><a href='#L190'>190</a>
<a name='L191'></a><a href='#L191'>191</a>
<a name='L192'></a><a href='#L192'>192</a>
<a name='L193'></a><a href='#L193'>193</a>
<a name='L194'></a><a href='#L194'>194</a>
<a name='L195'></a><a href='#L195'>195</a>
<a name='L196'></a><a href='#L196'>196</a>
<a name='L197'></a><a href='#L197'>197</a>
<a name='L198'></a><a href='#L198'>198</a>
<a name='L199'></a><a href='#L199'>199</a>
<a name='L200'></a><a href='#L200'>200</a>
<a name='L201'></a><a href='#L201'>201</a>
<a name='L202'></a><a href='#L202'>202</a>
<a name='L203'></a><a href='#L203'>203</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span></td><td class="text"><pre class="prettyprint lang-js">import custom_utils from './utils'
&nbsp;
const {debugLog} = custom_utils
&nbsp;
let listOfBooleanKeys = [
"prise_type_ef",
"prise_type_2",
"prise_type_combo_ccs",
"prise_type_chademo",
"gratuit",
"paiement_acte",
"paiement_cb",
"cable_t2_attache"
]
&nbsp;
export default class {
mapping_config: any = {}
&nbsp;
constructor(mappingConfig) {
this.setConfig(mappingConfig)
}
&nbsp;
setConfig(mappingConfig) {
this.mapping_config = mappingConfig
}
&nbsp;
<span class="fstat-no" title="function not covered" > mapFeaturePoint(featurePointGeoJson) {</span>
<span class="cstat-no" title="statement not covered" ></span>
<span class="cstat-no" title="statement not covered" > let geoJSONConvertedPoint: any = {}</span>
<span class="cstat-no" title="statement not covered" > geoJSONConvertedPoint.properties = {...this.mapping_config.default_properties_of_point}</span>
<span class="cstat-no" title="statement not covered" > geoJSONConvertedPoint.type = featurePointGeoJson.type</span>
<span class="cstat-no" title="statement not covered" > geoJSONConvertedPoint.geometry = featurePointGeoJson.geometry</span>
<span class="cstat-no" title="statement not covered" ></span>
<span class="cstat-no" title="statement not covered" > let props = featurePointGeoJson.properties</span>
<span class="cstat-no" title="statement not covered" ></span>
<span class="cstat-no" title="statement not covered" > props.forEach((key, value) =&gt; {</span>
<span class="cstat-no" title="statement not covered" ></span>
<span class="cstat-no" title="statement not covered" > })</span>
<span class="cstat-no" title="statement not covered" ></span>
<span class="cstat-no" title="statement not covered" > return geoJSONConvertedPoint</span>
<span class="cstat-no" title="statement not covered" > }</span>
&nbsp;
/**
* TODO convert to mapping config property to transform_truthy
* @param pointKeyName
* @returns {boolean}
*/
<span class="fstat-no" title="function not covered" > isBooleanKey(pointKeyName): boolean {</span>
<span class="cstat-no" title="statement not covered" ></span>
<span class="cstat-no" title="statement not covered" > return listOfBooleanKeys.indexOf(pointKeyName) !== -1</span>
<span class="cstat-no" title="statement not covered" > }</span>
&nbsp;
truthyValues = ['true', 'True', 'TRUE', '1', 1]
falsyValues = ['false', 'False', 'FALSE', '0', 0]
&nbsp;
/**
* reduce number of features
* @param offsetCount
* @param listOfFeatures
*/
<span class="fstat-no" title="function not covered" > filterFeaturesByOffset(offsetCount: number, listOfFeatures): Array&lt;any&gt; {</span>
<span class="cstat-no" title="statement not covered" > let filteredList = listOfFeatures</span>
<span class="cstat-no" title="statement not covered" > // TODO</span>
<span class="cstat-no" title="statement not covered" > return filteredList</span>
<span class="cstat-no" title="statement not covered" > }</span>
&nbsp;
// filterFeaturesByPropertyRegex(bboxConfig, listOfFeatures) {
// console.log('bboxConfig', bboxConfig)
// let filteredList = listOfFeatures
// // TODO
// return filteredList
// }
&nbsp;
<span class="fstat-no" title="function not covered" > filterFeaturesByPropertyRegex(propertyName, criteriaRegex, listOfFeatures) {</span>
<span class="cstat-no" title="statement not covered" > let filteredList = listOfFeatures.filter(feature =&gt; {</span>
<span class="cstat-no" title="statement not covered" > return criteriaRegex.test(feature?.properties[propertyName])</span>
<span class="cstat-no" title="statement not covered" > })</span>
<span class="cstat-no" title="statement not covered" > return filteredList</span>
<span class="cstat-no" title="statement not covered" > }</span>
&nbsp;
/**
* retuns the converted element from mapping config if present, null otherwise
*/
mapElementFromConf(featurePoint: any) {
if (!this.mapping_config) <span class="branch-0 cbranch-no" title="branch not covered" >{</span>
<span class="cstat-no" title="statement not covered" > throw new Error('no config was loaded in the mapping engine. use setConfig(my_mapping_config) on this instance of mapping engine before using this.')</span>
<span class="cstat-no" title="statement not covered" ></span>
<span class="cstat-no" title="statement not covered" > }</span>
&nbsp;
<!-- console.log('mapping_config tags', this.mapping_config.tags)-->
<!-- debugLog('config_name', this.mapping_config.config_name)-->
let mappingKeys = Object.keys(this.mapping_config.tags)
// let mappingKeys = (this.mapping_config.tags)
let featurePointPropertiesKeys = Object.keys(featurePoint.properties)
&nbsp;
debugLog('============= keys mappingKeys:', this.mapping_config.tags.length, mappingKeys.length)
debugLog('============= keys featurePointPropertiesKeys :', featurePoint.properties.length, featurePointPropertiesKeys.length)
&nbsp;
let newProperties = Object.create(this.mapping_config.default_properties_of_point)
&nbsp;
<span class="branch-0 cbranch-no" title="branch not covered" > return;</span>
<span class="cstat-no" title="statement not covered" > // reinit properties of current point</span>
<span class="cstat-no" title="statement not covered" > let basePoint = Object.create(featurePoint)</span>
<span class="cstat-no" title="statement not covered" > basePoint.type = featurePoint.type</span>
<span class="cstat-no" title="statement not covered" > basePoint.geometry = featurePoint.geometry</span>
<span class="cstat-no" title="statement not covered" ></span>
<span class="cstat-no" title="statement not covered" > // apply new properties if found in mapping config</span>
<span class="cstat-no" title="statement not covered" > featurePointPropertiesKeys.forEach(pointKeyName =&gt; {</span>
<span class="cstat-no" title="statement not covered" ></span>
<span class="cstat-no" title="statement not covered" > this.convertProperty(pointKeyName, mappingKeys, featurePoint, newProperties)</span>
<span class="cstat-no" title="statement not covered" ></span>
<span class="cstat-no" title="statement not covered" > })</span>
<span class="cstat-no" title="statement not covered" ></span>
<span class="cstat-no" title="statement not covered" > basePoint.properties = newProperties</span>
<span class="cstat-no" title="statement not covered" ></span>
<span class="cstat-no" title="statement not covered" > debugLog('basePoint', basePoint)</span>
<span class="cstat-no" title="statement not covered" > return basePoint</span>
<span class="cstat-no" title="statement not covered" > }</span>
&nbsp;
<span class="fstat-no" title="function not covered" > convertProperty(pointKeyName, mappingKeys, featurePoint, newProperties) {</span>
<span class="cstat-no" title="statement not covered" > console.log('pointKeyName', pointKeyName)</span>
<span class="cstat-no" title="statement not covered" > if (!mappingKeys.indexOf(pointKeyName) !== -1) {</span>
<span class="cstat-no" title="statement not covered" > // debugLog('found element', pointKeyName, '=&gt;', this.mapping_config[pointKeyName], 'value : ', featurePoint.properties[pointKeyName])</span>
<span class="cstat-no" title="statement not covered" > let convertedValue = ''</span>
<span class="cstat-no" title="statement not covered" ></span>
<span class="cstat-no" title="statement not covered" > let valueConvertedFromMapping = featurePoint.properties[pointKeyName]</span>
<span class="cstat-no" title="statement not covered" > let typeofValue = typeof valueConvertedFromMapping</span>
<span class="cstat-no" title="statement not covered" > let isStringValue = typeofValue === 'string'</span>
<span class="cstat-no" title="statement not covered" > debugLog('- pointKeyName', pointKeyName)</span>
<span class="cstat-no" title="statement not covered" > debugLog('- valueConvertedFromMapping', valueConvertedFromMapping)</span>
<span class="cstat-no" title="statement not covered" > // debugLog('typeof featurePoint.properties[pointKeyName] === \'string\'', typeofValue)</span>
<span class="cstat-no" title="statement not covered" ></span>
<span class="cstat-no" title="statement not covered" > let isConfigMappingObject = typeofValue === 'string'</span>
<span class="cstat-no" title="statement not covered" ></span>
<span class="cstat-no" title="statement not covered" > if (isStringValue) {</span>
<span class="cstat-no" title="statement not covered" > debugLog('-- string value')</span>
<span class="cstat-no" title="statement not covered" > if (this.isBooleanKey(pointKeyName)) {</span>
<span class="cstat-no" title="statement not covered" > let lowerValue = (valueConvertedFromMapping + '').toLowerCase()</span>
<span class="cstat-no" title="statement not covered" > debugLog('isBooleanKey: lowerValue', lowerValue)</span>
<span class="cstat-no" title="statement not covered" > convertedValue = this.truthyValues.indexOf(lowerValue) ? 'yes' : 'no'</span>
<span class="cstat-no" title="statement not covered" ></span>
<span class="cstat-no" title="statement not covered" > } else {</span>
<span class="cstat-no" title="statement not covered" > convertedValue = valueConvertedFromMapping</span>
<span class="cstat-no" title="statement not covered" > }</span>
<span class="cstat-no" title="statement not covered" > debugLog('-- convertedValue', convertedValue)</span>
<span class="cstat-no" title="statement not covered" > if (convertedValue) {</span>
<span class="cstat-no" title="statement not covered" > newProperties[this.mapping_config[pointKeyName]] = convertedValue</span>
<span class="cstat-no" title="statement not covered" > }</span>
<span class="cstat-no" title="statement not covered" > } else if (isConfigMappingObject) {</span>
<span class="cstat-no" title="statement not covered" > let newKey = ''</span>
<span class="cstat-no" title="statement not covered" > let configObject = valueConvertedFromMapping</span>
<span class="cstat-no" title="statement not covered" ></span>
<span class="cstat-no" title="statement not covered" > if (configObject.key_converted) {</span>
<span class="cstat-no" title="statement not covered" > newKey = configObject.key_converted</span>
<span class="cstat-no" title="statement not covered" > }</span>
<span class="cstat-no" title="statement not covered" ></span>
<span class="cstat-no" title="statement not covered" > /**</span>
<span class="cstat-no" title="statement not covered" > * gestion des valeurs conditionnelles</span>
<span class="cstat-no" title="statement not covered" > * nous pouvons renseigner une string ou un objet décrivant les transformations à réaliser</span>
<span class="cstat-no" title="statement not covered" > */</span>
<span class="cstat-no" title="statement not covered" > if (configObject.conditional_values) {</span>
<span class="cstat-no" title="statement not covered" > let keysConditionnalValues = Object.keys(configObject.conditional_values)</span>
<span class="cstat-no" title="statement not covered" > let isFoundValue = keysConditionnalValues.indexOf(valueConvertedFromMapping)</span>
<span class="cstat-no" title="statement not covered" > if (isFoundValue !== -1) {</span>
<span class="cstat-no" title="statement not covered" > let conditionnalConfig :any = keysConditionnalValues[isFoundValue]</span>
<span class="cstat-no" title="statement not covered" ></span>
<span class="cstat-no" title="statement not covered" > if (conditionnalConfig.tags_to_add) {</span>
<span class="cstat-no" title="statement not covered" > // on peut définir un ensemble de tags à rajouter</span>
<span class="cstat-no" title="statement not covered" > newProperties.push(...conditionnalConfig.tags_to_add)</span>
<span class="cstat-no" title="statement not covered" > }</span>
<span class="cstat-no" title="statement not covered" > if (conditionnalConfig.truthy_value) {</span>
<span class="cstat-no" title="statement not covered" > // convertir la valeur, si elle est truthy, la transformer en ce que donne la propriété truthy_value</span>
<span class="cstat-no" title="statement not covered" > // exemple: le jeu de données dit que la colonne cable_t2_attache vaut "True", mais on veut le convertir en "1".</span>
<span class="cstat-no" title="statement not covered" > // on met donc truthy_value: '1'</span>
<span class="cstat-no" title="statement not covered" > if (this.truthyValues.indexOf(valueConvertedFromMapping) !== -1) {</span>
<span class="cstat-no" title="statement not covered" > convertedValue = conditionnalConfig.truthy_value</span>
<span class="cstat-no" title="statement not covered" > }</span>
<span class="cstat-no" title="statement not covered" > }</span>
<span class="cstat-no" title="statement not covered" > if (conditionnalConfig.falsy_value) {</span>
<span class="cstat-no" title="statement not covered" > if (this.falsyValues.indexOf(valueConvertedFromMapping) !== -1) {</span>
<span class="cstat-no" title="statement not covered" > convertedValue = conditionnalConfig.falsy_value</span>
<span class="cstat-no" title="statement not covered" > }</span>
<span class="cstat-no" title="statement not covered" > }</span>
<span class="cstat-no" title="statement not covered" > if (conditionnalConfig.transform_function) {</span>
<span class="cstat-no" title="statement not covered" > // une transformation de la valeur</span>
<span class="cstat-no" title="statement not covered" > // apply transformation to value</span>
<span class="cstat-no" title="statement not covered" > convertedValue = conditionnalConfig.transform_function(valueConvertedFromMapping)</span>
<span class="cstat-no" title="statement not covered" > }</span>
<span class="cstat-no" title="statement not covered" > // use the value converted</span>
<span class="cstat-no" title="statement not covered" > else if (conditionnalConfig.value_converted) {</span>
<span class="cstat-no" title="statement not covered" > convertedValue = conditionnalConfig.value_converted</span>
<span class="cstat-no" title="statement not covered" > }</span>
<span class="cstat-no" title="statement not covered" > }</span>
<span class="cstat-no" title="statement not covered" > }</span>
<span class="cstat-no" title="statement not covered" ></span>
<span class="cstat-no" title="statement not covered" > if (newKey &amp;&amp; !configObject.ignore_this_data) {</span>
<span class="cstat-no" title="statement not covered" > newProperties[newKey] = convertedValue</span>
<span class="cstat-no" title="statement not covered" > }</span>
<span class="cstat-no" title="statement not covered" > }</span>
<span class="cstat-no" title="statement not covered" > }</span>
<span class="cstat-no" title="statement not covered" > }</span>
&nbsp;
}</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2023-08-05T08:59:44.912Z
</div>
<script src="prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="sorter.js"></script>
<script src="block-navigation.js"></script>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 445 B

View File

@ -1,131 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for All files</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="prettify.css" />
<link rel="stylesheet" href="base.css" />
<link rel="shortcut icon" type="image/x-icon" href="favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1>All files</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">47.28% </span>
<span class="quiet">Statements</span>
<span class='fraction'>113/239</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">66.66% </span>
<span class="quiet">Branches</span>
<span class='fraction'>4/6</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">44.44% </span>
<span class="quiet">Functions</span>
<span class='fraction'>4/9</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">47.28% </span>
<span class="quiet">Lines</span>
<span class='fraction'>113/239</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
<template id="filterTemplate">
<div class="quiet">
Filter:
<input oninput="onInput()" type="search" id="fileSearch">
</div>
</template>
</div>
<div class='status-line low'></div>
<div class="pad1">
<table class="coverage-summary">
<thead>
<tr>
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
</tr>
</thead>
<tbody><tr>
<td class="file high" data-value="data_other/testing"><a href="data_other/testing/index.html">data_other/testing</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="34" class="abs high">34/34</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="0" class="abs high">0/0</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="0" class="abs high">0/0</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="34" class="abs high">34/34</td>
</tr>
<tr>
<td class="file low" data-value="mappings"><a href="mappings/index.html">mappings</a></td>
<td data-value="38.53" class="pic low">
<div class="chart"><div class="cover-fill" style="width: 38%"></div><div class="cover-empty" style="width: 62%"></div></div>
</td>
<td data-value="38.53" class="pct low">38.53%</td>
<td data-value="205" class="abs low">79/205</td>
<td data-value="66.66" class="pct medium">66.66%</td>
<td data-value="6" class="abs medium">4/6</td>
<td data-value="44.44" class="pct low">44.44%</td>
<td data-value="9" class="abs low">4/9</td>
<td data-value="38.53" class="pct low">38.53%</td>
<td data-value="205" class="abs low">79/205</td>
</tr>
</tbody>
</table>
</div>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2023-08-05T09:17:25.573Z
</div>
<script src="prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="sorter.js"></script>
<script src="block-navigation.js"></script>
</body>
</html>

View File

@ -1,691 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for mappings/engine.ts</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../prettify.css" />
<link rel="stylesheet" href="../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../index.html">All files</a> / <a href="index.html">mappings</a> engine.ts</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">37.93% </span>
<span class="quiet">Statements</span>
<span class='fraction'>77/203</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">66.66% </span>
<span class="quiet">Branches</span>
<span class='fraction'>4/6</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">44.44% </span>
<span class="quiet">Functions</span>
<span class='fraction'>4/9</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">37.93% </span>
<span class="quiet">Lines</span>
<span class='fraction'>77/203</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
<template id="filterTemplate">
<div class="quiet">
Filter:
<input oninput="onInput()" type="search" id="fileSearch">
</div>
</template>
</div>
<div class='status-line low'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a>
<a name='L32'></a><a href='#L32'>32</a>
<a name='L33'></a><a href='#L33'>33</a>
<a name='L34'></a><a href='#L34'>34</a>
<a name='L35'></a><a href='#L35'>35</a>
<a name='L36'></a><a href='#L36'>36</a>
<a name='L37'></a><a href='#L37'>37</a>
<a name='L38'></a><a href='#L38'>38</a>
<a name='L39'></a><a href='#L39'>39</a>
<a name='L40'></a><a href='#L40'>40</a>
<a name='L41'></a><a href='#L41'>41</a>
<a name='L42'></a><a href='#L42'>42</a>
<a name='L43'></a><a href='#L43'>43</a>
<a name='L44'></a><a href='#L44'>44</a>
<a name='L45'></a><a href='#L45'>45</a>
<a name='L46'></a><a href='#L46'>46</a>
<a name='L47'></a><a href='#L47'>47</a>
<a name='L48'></a><a href='#L48'>48</a>
<a name='L49'></a><a href='#L49'>49</a>
<a name='L50'></a><a href='#L50'>50</a>
<a name='L51'></a><a href='#L51'>51</a>
<a name='L52'></a><a href='#L52'>52</a>
<a name='L53'></a><a href='#L53'>53</a>
<a name='L54'></a><a href='#L54'>54</a>
<a name='L55'></a><a href='#L55'>55</a>
<a name='L56'></a><a href='#L56'>56</a>
<a name='L57'></a><a href='#L57'>57</a>
<a name='L58'></a><a href='#L58'>58</a>
<a name='L59'></a><a href='#L59'>59</a>
<a name='L60'></a><a href='#L60'>60</a>
<a name='L61'></a><a href='#L61'>61</a>
<a name='L62'></a><a href='#L62'>62</a>
<a name='L63'></a><a href='#L63'>63</a>
<a name='L64'></a><a href='#L64'>64</a>
<a name='L65'></a><a href='#L65'>65</a>
<a name='L66'></a><a href='#L66'>66</a>
<a name='L67'></a><a href='#L67'>67</a>
<a name='L68'></a><a href='#L68'>68</a>
<a name='L69'></a><a href='#L69'>69</a>
<a name='L70'></a><a href='#L70'>70</a>
<a name='L71'></a><a href='#L71'>71</a>
<a name='L72'></a><a href='#L72'>72</a>
<a name='L73'></a><a href='#L73'>73</a>
<a name='L74'></a><a href='#L74'>74</a>
<a name='L75'></a><a href='#L75'>75</a>
<a name='L76'></a><a href='#L76'>76</a>
<a name='L77'></a><a href='#L77'>77</a>
<a name='L78'></a><a href='#L78'>78</a>
<a name='L79'></a><a href='#L79'>79</a>
<a name='L80'></a><a href='#L80'>80</a>
<a name='L81'></a><a href='#L81'>81</a>
<a name='L82'></a><a href='#L82'>82</a>
<a name='L83'></a><a href='#L83'>83</a>
<a name='L84'></a><a href='#L84'>84</a>
<a name='L85'></a><a href='#L85'>85</a>
<a name='L86'></a><a href='#L86'>86</a>
<a name='L87'></a><a href='#L87'>87</a>
<a name='L88'></a><a href='#L88'>88</a>
<a name='L89'></a><a href='#L89'>89</a>
<a name='L90'></a><a href='#L90'>90</a>
<a name='L91'></a><a href='#L91'>91</a>
<a name='L92'></a><a href='#L92'>92</a>
<a name='L93'></a><a href='#L93'>93</a>
<a name='L94'></a><a href='#L94'>94</a>
<a name='L95'></a><a href='#L95'>95</a>
<a name='L96'></a><a href='#L96'>96</a>
<a name='L97'></a><a href='#L97'>97</a>
<a name='L98'></a><a href='#L98'>98</a>
<a name='L99'></a><a href='#L99'>99</a>
<a name='L100'></a><a href='#L100'>100</a>
<a name='L101'></a><a href='#L101'>101</a>
<a name='L102'></a><a href='#L102'>102</a>
<a name='L103'></a><a href='#L103'>103</a>
<a name='L104'></a><a href='#L104'>104</a>
<a name='L105'></a><a href='#L105'>105</a>
<a name='L106'></a><a href='#L106'>106</a>
<a name='L107'></a><a href='#L107'>107</a>
<a name='L108'></a><a href='#L108'>108</a>
<a name='L109'></a><a href='#L109'>109</a>
<a name='L110'></a><a href='#L110'>110</a>
<a name='L111'></a><a href='#L111'>111</a>
<a name='L112'></a><a href='#L112'>112</a>
<a name='L113'></a><a href='#L113'>113</a>
<a name='L114'></a><a href='#L114'>114</a>
<a name='L115'></a><a href='#L115'>115</a>
<a name='L116'></a><a href='#L116'>116</a>
<a name='L117'></a><a href='#L117'>117</a>
<a name='L118'></a><a href='#L118'>118</a>
<a name='L119'></a><a href='#L119'>119</a>
<a name='L120'></a><a href='#L120'>120</a>
<a name='L121'></a><a href='#L121'>121</a>
<a name='L122'></a><a href='#L122'>122</a>
<a name='L123'></a><a href='#L123'>123</a>
<a name='L124'></a><a href='#L124'>124</a>
<a name='L125'></a><a href='#L125'>125</a>
<a name='L126'></a><a href='#L126'>126</a>
<a name='L127'></a><a href='#L127'>127</a>
<a name='L128'></a><a href='#L128'>128</a>
<a name='L129'></a><a href='#L129'>129</a>
<a name='L130'></a><a href='#L130'>130</a>
<a name='L131'></a><a href='#L131'>131</a>
<a name='L132'></a><a href='#L132'>132</a>
<a name='L133'></a><a href='#L133'>133</a>
<a name='L134'></a><a href='#L134'>134</a>
<a name='L135'></a><a href='#L135'>135</a>
<a name='L136'></a><a href='#L136'>136</a>
<a name='L137'></a><a href='#L137'>137</a>
<a name='L138'></a><a href='#L138'>138</a>
<a name='L139'></a><a href='#L139'>139</a>
<a name='L140'></a><a href='#L140'>140</a>
<a name='L141'></a><a href='#L141'>141</a>
<a name='L142'></a><a href='#L142'>142</a>
<a name='L143'></a><a href='#L143'>143</a>
<a name='L144'></a><a href='#L144'>144</a>
<a name='L145'></a><a href='#L145'>145</a>
<a name='L146'></a><a href='#L146'>146</a>
<a name='L147'></a><a href='#L147'>147</a>
<a name='L148'></a><a href='#L148'>148</a>
<a name='L149'></a><a href='#L149'>149</a>
<a name='L150'></a><a href='#L150'>150</a>
<a name='L151'></a><a href='#L151'>151</a>
<a name='L152'></a><a href='#L152'>152</a>
<a name='L153'></a><a href='#L153'>153</a>
<a name='L154'></a><a href='#L154'>154</a>
<a name='L155'></a><a href='#L155'>155</a>
<a name='L156'></a><a href='#L156'>156</a>
<a name='L157'></a><a href='#L157'>157</a>
<a name='L158'></a><a href='#L158'>158</a>
<a name='L159'></a><a href='#L159'>159</a>
<a name='L160'></a><a href='#L160'>160</a>
<a name='L161'></a><a href='#L161'>161</a>
<a name='L162'></a><a href='#L162'>162</a>
<a name='L163'></a><a href='#L163'>163</a>
<a name='L164'></a><a href='#L164'>164</a>
<a name='L165'></a><a href='#L165'>165</a>
<a name='L166'></a><a href='#L166'>166</a>
<a name='L167'></a><a href='#L167'>167</a>
<a name='L168'></a><a href='#L168'>168</a>
<a name='L169'></a><a href='#L169'>169</a>
<a name='L170'></a><a href='#L170'>170</a>
<a name='L171'></a><a href='#L171'>171</a>
<a name='L172'></a><a href='#L172'>172</a>
<a name='L173'></a><a href='#L173'>173</a>
<a name='L174'></a><a href='#L174'>174</a>
<a name='L175'></a><a href='#L175'>175</a>
<a name='L176'></a><a href='#L176'>176</a>
<a name='L177'></a><a href='#L177'>177</a>
<a name='L178'></a><a href='#L178'>178</a>
<a name='L179'></a><a href='#L179'>179</a>
<a name='L180'></a><a href='#L180'>180</a>
<a name='L181'></a><a href='#L181'>181</a>
<a name='L182'></a><a href='#L182'>182</a>
<a name='L183'></a><a href='#L183'>183</a>
<a name='L184'></a><a href='#L184'>184</a>
<a name='L185'></a><a href='#L185'>185</a>
<a name='L186'></a><a href='#L186'>186</a>
<a name='L187'></a><a href='#L187'>187</a>
<a name='L188'></a><a href='#L188'>188</a>
<a name='L189'></a><a href='#L189'>189</a>
<a name='L190'></a><a href='#L190'>190</a>
<a name='L191'></a><a href='#L191'>191</a>
<a name='L192'></a><a href='#L192'>192</a>
<a name='L193'></a><a href='#L193'>193</a>
<a name='L194'></a><a href='#L194'>194</a>
<a name='L195'></a><a href='#L195'>195</a>
<a name='L196'></a><a href='#L196'>196</a>
<a name='L197'></a><a href='#L197'>197</a>
<a name='L198'></a><a href='#L198'>198</a>
<a name='L199'></a><a href='#L199'>199</a>
<a name='L200'></a><a href='#L200'>200</a>
<a name='L201'></a><a href='#L201'>201</a>
<a name='L202'></a><a href='#L202'>202</a>
<a name='L203'></a><a href='#L203'>203</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span></td><td class="text"><pre class="prettyprint lang-js">import custom_utils from './utils'
&nbsp;
const {debugLog} = custom_utils
&nbsp;
let listOfBooleanKeys = [
"prise_type_ef",
"prise_type_2",
"prise_type_combo_ccs",
"prise_type_chademo",
"gratuit",
"paiement_acte",
"paiement_cb",
"cable_t2_attache"
]
&nbsp;
export default class {
mapping_config: any = {}
&nbsp;
constructor(mappingConfig) {
this.setConfig(mappingConfig)
}
&nbsp;
setConfig(mappingConfig) {
this.mapping_config = mappingConfig
}
&nbsp;
<span class="fstat-no" title="function not covered" > mapFeaturePoint(featurePointGeoJson) {</span>
<span class="cstat-no" title="statement not covered" ></span>
<span class="cstat-no" title="statement not covered" > let geoJSONConvertedPoint: any = {}</span>
<span class="cstat-no" title="statement not covered" > geoJSONConvertedPoint.properties = {...this.mapping_config.default_properties_of_point}</span>
<span class="cstat-no" title="statement not covered" > geoJSONConvertedPoint.type = featurePointGeoJson.type</span>
<span class="cstat-no" title="statement not covered" > geoJSONConvertedPoint.geometry = featurePointGeoJson.geometry</span>
<span class="cstat-no" title="statement not covered" ></span>
<span class="cstat-no" title="statement not covered" > let props = featurePointGeoJson.properties</span>
<span class="cstat-no" title="statement not covered" ></span>
<span class="cstat-no" title="statement not covered" > props.forEach((key, value) =&gt; {</span>
<span class="cstat-no" title="statement not covered" ></span>
<span class="cstat-no" title="statement not covered" > })</span>
<span class="cstat-no" title="statement not covered" ></span>
<span class="cstat-no" title="statement not covered" > return geoJSONConvertedPoint</span>
<span class="cstat-no" title="statement not covered" > }</span>
&nbsp;
/**
* TODO convert to mapping config property to transform_truthy
* @param pointKeyName
* @returns {boolean}
*/
<span class="fstat-no" title="function not covered" > isBooleanKey(pointKeyName): boolean {</span>
<span class="cstat-no" title="statement not covered" ></span>
<span class="cstat-no" title="statement not covered" > return listOfBooleanKeys.indexOf(pointKeyName) !== -1</span>
<span class="cstat-no" title="statement not covered" > }</span>
&nbsp;
truthyValues = ['true', 'True', 'TRUE', '1', 1]
falsyValues = ['false', 'False', 'FALSE', '0', 0]
&nbsp;
/**
* reduce number of features
* @param offsetCount
* @param listOfFeatures
*/
<span class="fstat-no" title="function not covered" > filterFeaturesByOffset(offsetCount: number, listOfFeatures): Array&lt;any&gt; {</span>
<span class="cstat-no" title="statement not covered" > let filteredList = listOfFeatures</span>
<span class="cstat-no" title="statement not covered" > // TODO</span>
<span class="cstat-no" title="statement not covered" > return filteredList</span>
<span class="cstat-no" title="statement not covered" > }</span>
&nbsp;
// filterFeaturesByPropertyRegex(bboxConfig, listOfFeatures) {
// console.log('bboxConfig', bboxConfig)
// let filteredList = listOfFeatures
// // TODO
// return filteredList
// }
&nbsp;
<span class="fstat-no" title="function not covered" > filterFeaturesByPropertyRegex(propertyName, criteriaRegex, listOfFeatures) {</span>
<span class="cstat-no" title="statement not covered" > let filteredList = listOfFeatures.filter(feature =&gt; {</span>
<span class="cstat-no" title="statement not covered" > return criteriaRegex.test(feature?.properties[propertyName])</span>
<span class="cstat-no" title="statement not covered" > })</span>
<span class="cstat-no" title="statement not covered" > return filteredList</span>
<span class="cstat-no" title="statement not covered" > }</span>
&nbsp;
/**
* retuns the converted element from mapping config if present, null otherwise
*/
mapElementFromConf(featurePoint: any):any {
if (!this.mapping_config) <span class="branch-0 cbranch-no" title="branch not covered" >{</span>
<span class="cstat-no" title="statement not covered" > throw new Error('no config was loaded in the mapping engine. use setConfig(my_mapping_config) on this instance of mapping engine before using this.')</span>
<span class="cstat-no" title="statement not covered" > }</span>
&nbsp;
console.log('mapping_config tags', this.mapping_config.tags.length)
debugLog('config_name', this.mapping_config.config_name)
let mappingKeys = Object.keys(this.mapping_config.tags)
// let mappingKeys = (this.mapping_config.tags)
let featurePointPropertiesKeys = Object.keys(featurePoint.properties)
&nbsp;
debugLog('============= mapping config tags', this.mapping_config.tags)
debugLog('============= keys mappingKeys:', this.mapping_config.tags.length, mappingKeys.length)
debugLog('============= keys featurePointPropertiesKeys :', featurePoint.properties.length, featurePointPropertiesKeys.length)
&nbsp;
let newProperties = Object.create(this.mapping_config.default_properties_of_point)
&nbsp;
<span class="branch-0 cbranch-no" title="branch not covered" > return;</span>
<span class="cstat-no" title="statement not covered" > // reinit properties of current point</span>
<span class="cstat-no" title="statement not covered" > let basePoint = Object.create(featurePoint)</span>
<span class="cstat-no" title="statement not covered" > basePoint.type = featurePoint.type</span>
<span class="cstat-no" title="statement not covered" > basePoint.geometry = featurePoint.geometry</span>
<span class="cstat-no" title="statement not covered" ></span>
<span class="cstat-no" title="statement not covered" > // apply new properties if found in mapping config</span>
<span class="cstat-no" title="statement not covered" > featurePointPropertiesKeys.forEach(pointKeyName =&gt; {</span>
<span class="cstat-no" title="statement not covered" ></span>
<span class="cstat-no" title="statement not covered" > this.convertProperty(pointKeyName, mappingKeys, featurePoint, newProperties)</span>
<span class="cstat-no" title="statement not covered" ></span>
<span class="cstat-no" title="statement not covered" > })</span>
<span class="cstat-no" title="statement not covered" ></span>
<span class="cstat-no" title="statement not covered" > basePoint.properties = newProperties</span>
<span class="cstat-no" title="statement not covered" ></span>
<span class="cstat-no" title="statement not covered" > debugLog('basePoint', basePoint)</span>
<span class="cstat-no" title="statement not covered" > return basePoint</span>
<span class="cstat-no" title="statement not covered" > }</span>
&nbsp;
<span class="fstat-no" title="function not covered" > convertProperty(pointKeyName, mappingKeys, featurePoint, newProperties) {</span>
<span class="cstat-no" title="statement not covered" > console.log('pointKeyName', pointKeyName)</span>
<span class="cstat-no" title="statement not covered" > if (!mappingKeys.indexOf(pointKeyName) !== -1) {</span>
<span class="cstat-no" title="statement not covered" > // debugLog('found element', pointKeyName, '=&gt;', this.mapping_config[pointKeyName], 'value : ', featurePoint.properties[pointKeyName])</span>
<span class="cstat-no" title="statement not covered" > let convertedValue = ''</span>
<span class="cstat-no" title="statement not covered" ></span>
<span class="cstat-no" title="statement not covered" > let valueConvertedFromMapping = featurePoint.properties[pointKeyName]</span>
<span class="cstat-no" title="statement not covered" > let typeofValue = typeof valueConvertedFromMapping</span>
<span class="cstat-no" title="statement not covered" > let isStringValue = typeofValue === 'string'</span>
<span class="cstat-no" title="statement not covered" > debugLog('- pointKeyName', pointKeyName)</span>
<span class="cstat-no" title="statement not covered" > debugLog('- valueConvertedFromMapping', valueConvertedFromMapping)</span>
<span class="cstat-no" title="statement not covered" > // debugLog('typeof featurePoint.properties[pointKeyName] === \'string\'', typeofValue)</span>
<span class="cstat-no" title="statement not covered" ></span>
<span class="cstat-no" title="statement not covered" > let isConfigMappingObject = typeofValue === 'string'</span>
<span class="cstat-no" title="statement not covered" ></span>
<span class="cstat-no" title="statement not covered" > if (isStringValue) {</span>
<span class="cstat-no" title="statement not covered" > debugLog('-- string value')</span>
<span class="cstat-no" title="statement not covered" > if (this.isBooleanKey(pointKeyName)) {</span>
<span class="cstat-no" title="statement not covered" > let lowerValue = (valueConvertedFromMapping + '').toLowerCase()</span>
<span class="cstat-no" title="statement not covered" > debugLog('isBooleanKey: lowerValue', lowerValue)</span>
<span class="cstat-no" title="statement not covered" > convertedValue = this.truthyValues.indexOf(lowerValue) ? 'yes' : 'no'</span>
<span class="cstat-no" title="statement not covered" ></span>
<span class="cstat-no" title="statement not covered" > } else {</span>
<span class="cstat-no" title="statement not covered" > convertedValue = valueConvertedFromMapping</span>
<span class="cstat-no" title="statement not covered" > }</span>
<span class="cstat-no" title="statement not covered" > debugLog('-- convertedValue', convertedValue)</span>
<span class="cstat-no" title="statement not covered" > if (convertedValue) {</span>
<span class="cstat-no" title="statement not covered" > newProperties[this.mapping_config[pointKeyName]] = convertedValue</span>
<span class="cstat-no" title="statement not covered" > }</span>
<span class="cstat-no" title="statement not covered" > } else if (isConfigMappingObject) {</span>
<span class="cstat-no" title="statement not covered" > let newKey = ''</span>
<span class="cstat-no" title="statement not covered" > let configObject = valueConvertedFromMapping</span>
<span class="cstat-no" title="statement not covered" ></span>
<span class="cstat-no" title="statement not covered" > if (configObject.key_converted) {</span>
<span class="cstat-no" title="statement not covered" > newKey = configObject.key_converted</span>
<span class="cstat-no" title="statement not covered" > }</span>
<span class="cstat-no" title="statement not covered" ></span>
<span class="cstat-no" title="statement not covered" > /**</span>
<span class="cstat-no" title="statement not covered" > * gestion des valeurs conditionnelles</span>
<span class="cstat-no" title="statement not covered" > * nous pouvons renseigner une string ou un objet décrivant les transformations à réaliser</span>
<span class="cstat-no" title="statement not covered" > */</span>
<span class="cstat-no" title="statement not covered" > if (configObject.conditional_values) {</span>
<span class="cstat-no" title="statement not covered" > let keysConditionnalValues = Object.keys(configObject.conditional_values)</span>
<span class="cstat-no" title="statement not covered" > let isFoundValue = keysConditionnalValues.indexOf(valueConvertedFromMapping)</span>
<span class="cstat-no" title="statement not covered" > if (isFoundValue !== -1) {</span>
<span class="cstat-no" title="statement not covered" > let conditionnalConfig :any = keysConditionnalValues[isFoundValue]</span>
<span class="cstat-no" title="statement not covered" ></span>
<span class="cstat-no" title="statement not covered" > if (conditionnalConfig.tags_to_add) {</span>
<span class="cstat-no" title="statement not covered" > // on peut définir un ensemble de tags à rajouter</span>
<span class="cstat-no" title="statement not covered" > newProperties.push(...conditionnalConfig.tags_to_add)</span>
<span class="cstat-no" title="statement not covered" > }</span>
<span class="cstat-no" title="statement not covered" > if (conditionnalConfig.truthy_value) {</span>
<span class="cstat-no" title="statement not covered" > // convertir la valeur, si elle est truthy, la transformer en ce que donne la propriété truthy_value</span>
<span class="cstat-no" title="statement not covered" > // exemple: le jeu de données dit que la colonne cable_t2_attache vaut "True", mais on veut le convertir en "1".</span>
<span class="cstat-no" title="statement not covered" > // on met donc truthy_value: '1'</span>
<span class="cstat-no" title="statement not covered" > if (this.truthyValues.indexOf(valueConvertedFromMapping) !== -1) {</span>
<span class="cstat-no" title="statement not covered" > convertedValue = conditionnalConfig.truthy_value</span>
<span class="cstat-no" title="statement not covered" > }</span>
<span class="cstat-no" title="statement not covered" > }</span>
<span class="cstat-no" title="statement not covered" > if (conditionnalConfig.falsy_value) {</span>
<span class="cstat-no" title="statement not covered" > if (this.falsyValues.indexOf(valueConvertedFromMapping) !== -1) {</span>
<span class="cstat-no" title="statement not covered" > convertedValue = conditionnalConfig.falsy_value</span>
<span class="cstat-no" title="statement not covered" > }</span>
<span class="cstat-no" title="statement not covered" > }</span>
<span class="cstat-no" title="statement not covered" > if (conditionnalConfig.transform_function) {</span>
<span class="cstat-no" title="statement not covered" > // une transformation de la valeur</span>
<span class="cstat-no" title="statement not covered" > // apply transformation to value</span>
<span class="cstat-no" title="statement not covered" > convertedValue = conditionnalConfig.transform_function(valueConvertedFromMapping)</span>
<span class="cstat-no" title="statement not covered" > }</span>
<span class="cstat-no" title="statement not covered" > // use the value converted</span>
<span class="cstat-no" title="statement not covered" > else if (conditionnalConfig.value_converted) {</span>
<span class="cstat-no" title="statement not covered" > convertedValue = conditionnalConfig.value_converted</span>
<span class="cstat-no" title="statement not covered" > }</span>
<span class="cstat-no" title="statement not covered" > }</span>
<span class="cstat-no" title="statement not covered" > }</span>
<span class="cstat-no" title="statement not covered" ></span>
<span class="cstat-no" title="statement not covered" > if (newKey &amp;&amp; !configObject.ignore_this_data) {</span>
<span class="cstat-no" title="statement not covered" > newProperties[newKey] = convertedValue</span>
<span class="cstat-no" title="statement not covered" > }</span>
<span class="cstat-no" title="statement not covered" > }</span>
<span class="cstat-no" title="statement not covered" > }</span>
<span class="cstat-no" title="statement not covered" > }</span>
&nbsp;
}</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2023-08-05T09:17:25.573Z
</div>
<script src="../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../sorter.js"></script>
<script src="../block-navigation.js"></script>
</body>
</html>

View File

@ -1,131 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for mappings</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../prettify.css" />
<link rel="stylesheet" href="../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../index.html">All files</a> mappings</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">38.53% </span>
<span class="quiet">Statements</span>
<span class='fraction'>79/205</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">66.66% </span>
<span class="quiet">Branches</span>
<span class='fraction'>4/6</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">44.44% </span>
<span class="quiet">Functions</span>
<span class='fraction'>4/9</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">38.53% </span>
<span class="quiet">Lines</span>
<span class='fraction'>79/205</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
<template id="filterTemplate">
<div class="quiet">
Filter:
<input oninput="onInput()" type="search" id="fileSearch">
</div>
</template>
</div>
<div class='status-line low'></div>
<div class="pad1">
<table class="coverage-summary">
<thead>
<tr>
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
</tr>
</thead>
<tbody><tr>
<td class="file low" data-value="engine.ts"><a href="engine.ts.html">engine.ts</a></td>
<td data-value="37.93" class="pic low">
<div class="chart"><div class="cover-fill" style="width: 37%"></div><div class="cover-empty" style="width: 63%"></div></div>
</td>
<td data-value="37.93" class="pct low">37.93%</td>
<td data-value="203" class="abs low">77/203</td>
<td data-value="66.66" class="pct medium">66.66%</td>
<td data-value="6" class="abs medium">4/6</td>
<td data-value="44.44" class="pct low">44.44%</td>
<td data-value="9" class="abs low">4/9</td>
<td data-value="37.93" class="pct low">37.93%</td>
<td data-value="203" class="abs low">77/203</td>
</tr>
<tr>
<td class="file high" data-value="mapping-config.type.js"><a href="mapping-config.type.js.html">mapping-config.type.js</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="2" class="abs high">2/2</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="0" class="abs high">0/0</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="0" class="abs high">0/0</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="2" class="abs high">2/2</td>
</tr>
</tbody>
</table>
</div>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2023-08-05T09:17:25.573Z
</div>
<script src="../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../sorter.js"></script>
<script src="../block-navigation.js"></script>
</body>
</html>

View File

@ -1,91 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for mappings/mapping-config.type.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../prettify.css" />
<link rel="stylesheet" href="../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../index.html">All files</a> / <a href="index.html">mappings</a> mapping-config.type.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>2/2</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>0/0</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>0/0</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>2/2</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
<template id="filterTemplate">
<div class="quiet">
Filter:
<input oninput="onInput()" type="search" id="fileSearch">
</div>
</template>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2023-08-05T09:17:25.573Z
</div>
<script src="../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../sorter.js"></script>
<script src="../block-navigation.js"></script>
</body>
</html>

View File

@ -1,289 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for mappings/utils.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../prettify.css" />
<link rel="stylesheet" href="../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../index.html">All files</a> / <a href="index.html">mappings</a> utils.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">69.11% </span>
<span class="quiet">Statements</span>
<span class='fraction'>47/68</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">50% </span>
<span class="quiet">Branches</span>
<span class='fraction'>3/6</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">50% </span>
<span class="quiet">Functions</span>
<span class='fraction'>2/4</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">69.11% </span>
<span class="quiet">Lines</span>
<span class='fraction'>47/68</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
<template id="filterTemplate">
<div class="quiet">
Filter:
<input oninput="onInput()" type="search" id="fileSearch">
</div>
</template>
</div>
<div class='status-line medium'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a>
<a name='L32'></a><a href='#L32'>32</a>
<a name='L33'></a><a href='#L33'>33</a>
<a name='L34'></a><a href='#L34'>34</a>
<a name='L35'></a><a href='#L35'>35</a>
<a name='L36'></a><a href='#L36'>36</a>
<a name='L37'></a><a href='#L37'>37</a>
<a name='L38'></a><a href='#L38'>38</a>
<a name='L39'></a><a href='#L39'>39</a>
<a name='L40'></a><a href='#L40'>40</a>
<a name='L41'></a><a href='#L41'>41</a>
<a name='L42'></a><a href='#L42'>42</a>
<a name='L43'></a><a href='#L43'>43</a>
<a name='L44'></a><a href='#L44'>44</a>
<a name='L45'></a><a href='#L45'>45</a>
<a name='L46'></a><a href='#L46'>46</a>
<a name='L47'></a><a href='#L47'>47</a>
<a name='L48'></a><a href='#L48'>48</a>
<a name='L49'></a><a href='#L49'>49</a>
<a name='L50'></a><a href='#L50'>50</a>
<a name='L51'></a><a href='#L51'>51</a>
<a name='L52'></a><a href='#L52'>52</a>
<a name='L53'></a><a href='#L53'>53</a>
<a name='L54'></a><a href='#L54'>54</a>
<a name='L55'></a><a href='#L55'>55</a>
<a name='L56'></a><a href='#L56'>56</a>
<a name='L57'></a><a href='#L57'>57</a>
<a name='L58'></a><a href='#L58'>58</a>
<a name='L59'></a><a href='#L59'>59</a>
<a name='L60'></a><a href='#L60'>60</a>
<a name='L61'></a><a href='#L61'>61</a>
<a name='L62'></a><a href='#L62'>62</a>
<a name='L63'></a><a href='#L63'>63</a>
<a name='L64'></a><a href='#L64'>64</a>
<a name='L65'></a><a href='#L65'>65</a>
<a name='L66'></a><a href='#L66'>66</a>
<a name='L67'></a><a href='#L67'>67</a>
<a name='L68'></a><a href='#L68'>68</a>
<a name='L69'></a><a href='#L69'>69</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-yes">8x</span>
<span class="cline-any cline-yes">8x</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">"use strict";
var __spreadArray = (<span class="branch-0 cbranch-no" title="branch not covered" >this &amp;&amp; this.__spreadArray)</span> || function (to, from, pack) {
if (pack || arguments.length === 2) <span class="branch-0 cbranch-no" title="branch not covered" >for (var i = 0, l = from.length, ar; i &lt; l; i++) {</span>
<span class="cstat-no" title="statement not covered" > if (ar || !(i in from)) {</span>
<span class="cstat-no" title="statement not covered" > if (!ar) ar = Array.prototype.slice.call(from, 0, i);</span>
<span class="cstat-no" title="statement not covered" > ar[i] = from[i];</span>
<span class="cstat-no" title="statement not covered" > }</span>
<span class="cstat-no" title="statement not covered" > }</span>
return to.concat(ar || Array.prototype.slice.call(from));
};
Object.defineProperty(exports, "__esModule", { value: true });
var fs_1 = require("fs");
var show_debug = 0;
show_debug = 1;
var output_folder = 'output';
/**
* wrapper de log qui se montre uniquemnt si show_debug a été activé
* @param args
*/
function debugLog() {
var args = [];
for (var _i = 0; _i &lt; arguments.length; _i++) {
args[_i] = arguments[_i];
}
if (!show_debug) <span class="branch-0 cbranch-no" title="branch not covered" >{</span>
<span class="cstat-no" title="statement not covered" > return;</span>
<span class="cstat-no" title="statement not covered" > }</span>
console.log.apply(console, __spreadArray(['debug: '], args, false));
}
var listOfBooleanKeys = [
"prise_type_ef",
"prise_type_2",
"prise_type_combo_ccs",
"prise_type_chademo",
"gratuit",
"paiement_acte",
"paiement_cb",
"cable_t2_attache"
];
/**
*
* @param pointKeyName
* @returns {boolean}
*/
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >function isBooleanKey(pointKeyName) {</span></span>
<span class="cstat-no" title="statement not covered" > return listOfBooleanKeys.indexOf(pointKeyName) !== -1;</span>
<span class="cstat-no" title="statement not covered" >}</span>
/**
* crée un fichier dans le dossier par défaut, output
* @param fileName
* @param fileContent
*/
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >function writeFile(fileName, fileContent) {</span></span>
<span class="cstat-no" title="statement not covered" > debugLog('write file ', fileName);</span>
<span class="cstat-no" title="statement not covered" > return fs_1.default.writeFile("./".concat(output_folder, "/").concat(fileName), fileContent, 'utf8', function (err) {</span>
<span class="cstat-no" title="statement not covered" > if (err) {</span>
<span class="cstat-no" title="statement not covered" > debugLog("Error writing file: ".concat(err));</span>
<span class="cstat-no" title="statement not covered" > }</span>
<span class="cstat-no" title="statement not covered" > else {</span>
<span class="cstat-no" title="statement not covered" > debugLog("File ".concat(fileName, " is written successfully!"));</span>
<span class="cstat-no" title="statement not covered" > }</span>
<span class="cstat-no" title="statement not covered" > });</span>
<span class="cstat-no" title="statement not covered" >}</span>
exports.default = {
debugLog: debugLog,
isBooleanKey: isBooleanKey,
writeFile: writeFile
};
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2023-08-05T09:14:41.123Z
</div>
<script src="../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../sorter.js"></script>
<script src="../block-navigation.js"></script>
</body>
</html>

View File

@ -1 +0,0 @@
.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 B

View File

@ -1,196 +0,0 @@
/* eslint-disable */
var addSorting = (function() {
'use strict';
var cols,
currentSort = {
index: 0,
desc: false
};
// returns the summary table element
function getTable() {
return document.querySelector('.coverage-summary');
}
// returns the thead element of the summary table
function getTableHeader() {
return getTable().querySelector('thead tr');
}
// returns the tbody element of the summary table
function getTableBody() {
return getTable().querySelector('tbody');
}
// returns the th element for nth column
function getNthColumn(n) {
return getTableHeader().querySelectorAll('th')[n];
}
function onFilterInput() {
const searchValue = document.getElementById('fileSearch').value;
const rows = document.getElementsByTagName('tbody')[0].children;
for (let i = 0; i < rows.length; i++) {
const row = rows[i];
if (
row.textContent
.toLowerCase()
.includes(searchValue.toLowerCase())
) {
row.style.display = '';
} else {
row.style.display = 'none';
}
}
}
// loads the search box
function addSearchBox() {
var template = document.getElementById('filterTemplate');
var templateClone = template.content.cloneNode(true);
templateClone.getElementById('fileSearch').oninput = onFilterInput;
template.parentElement.appendChild(templateClone);
}
// loads all columns
function loadColumns() {
var colNodes = getTableHeader().querySelectorAll('th'),
colNode,
cols = [],
col,
i;
for (i = 0; i < colNodes.length; i += 1) {
colNode = colNodes[i];
col = {
key: colNode.getAttribute('data-col'),
sortable: !colNode.getAttribute('data-nosort'),
type: colNode.getAttribute('data-type') || 'string'
};
cols.push(col);
if (col.sortable) {
col.defaultDescSort = col.type === 'number';
colNode.innerHTML =
colNode.innerHTML + '<span class="sorter"></span>';
}
}
return cols;
}
// attaches a data attribute to every tr element with an object
// of data values keyed by column name
function loadRowData(tableRow) {
var tableCols = tableRow.querySelectorAll('td'),
colNode,
col,
data = {},
i,
val;
for (i = 0; i < tableCols.length; i += 1) {
colNode = tableCols[i];
col = cols[i];
val = colNode.getAttribute('data-value');
if (col.type === 'number') {
val = Number(val);
}
data[col.key] = val;
}
return data;
}
// loads all row data
function loadData() {
var rows = getTableBody().querySelectorAll('tr'),
i;
for (i = 0; i < rows.length; i += 1) {
rows[i].data = loadRowData(rows[i]);
}
}
// sorts the table using the data for the ith column
function sortByIndex(index, desc) {
var key = cols[index].key,
sorter = function(a, b) {
a = a.data[key];
b = b.data[key];
return a < b ? -1 : a > b ? 1 : 0;
},
finalSorter = sorter,
tableBody = document.querySelector('.coverage-summary tbody'),
rowNodes = tableBody.querySelectorAll('tr'),
rows = [],
i;
if (desc) {
finalSorter = function(a, b) {
return -1 * sorter(a, b);
};
}
for (i = 0; i < rowNodes.length; i += 1) {
rows.push(rowNodes[i]);
tableBody.removeChild(rowNodes[i]);
}
rows.sort(finalSorter);
for (i = 0; i < rows.length; i += 1) {
tableBody.appendChild(rows[i]);
}
}
// removes sort indicators for current column being sorted
function removeSortIndicators() {
var col = getNthColumn(currentSort.index),
cls = col.className;
cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, '');
col.className = cls;
}
// adds sort indicators for current column being sorted
function addSortIndicators() {
getNthColumn(currentSort.index).className += currentSort.desc
? ' sorted-desc'
: ' sorted';
}
// adds event listeners for all sorter widgets
function enableUI() {
var i,
el,
ithSorter = function ithSorter(i) {
var col = cols[i];
return function() {
var desc = col.defaultDescSort;
if (currentSort.index === i) {
desc = !currentSort.desc;
}
sortByIndex(i, desc);
removeSortIndicators();
currentSort.index = i;
currentSort.desc = desc;
addSortIndicators();
};
};
for (i = 0; i < cols.length; i += 1) {
if (cols[i].sortable) {
// add the click event handler on the th so users
// dont have to click on those tiny arrows
el = getNthColumn(i).querySelector('.sorter').parentElement;
if (el.addEventListener) {
el.addEventListener('click', ithSorter(i));
} else {
el.attachEvent('onclick', ithSorter(i));
}
}
}
}
// adds sorting functionality to the UI
return function() {
if (!getTable()) {
return;
}
cols = loadColumns();
loadData();
addSearchBox();
addSortIndicators();
enableUI();
};
})();
window.addEventListener('load', addSorting);

View File

@ -1,290 +0,0 @@
TN:
SF:data_other/testing/mappings_to_test.ts
FNF:0
FNH:0
DA:1,1
DA:2,1
DA:3,1
DA:4,1
DA:5,1
DA:6,1
DA:7,1
DA:8,1
DA:9,1
DA:10,1
DA:11,1
DA:12,1
DA:13,1
DA:14,1
DA:15,1
DA:16,1
DA:17,1
DA:18,1
DA:19,1
DA:20,1
DA:21,1
DA:22,1
DA:23,1
DA:24,1
DA:25,1
DA:26,1
DA:27,1
DA:28,1
DA:29,1
DA:30,1
DA:31,1
DA:32,1
DA:33,1
DA:34,1
LF:34
LH:34
BRF:0
BRH:0
end_of_record
TN:
SF:mappings/engine.ts
FN:16,<instance_members_initializer>
FN:19,_default
FN:23,setConfig
FN:27,mapFeaturePoint
FN:48,isBooleanKey
FN:61,filterFeaturesByOffset
FN:74,filterFeaturesByPropertyRegex
FN:84,mapElementFromConf
FN:120,convertProperty
FNF:9
FNH:4
FNDA:1,<instance_members_initializer>
FNDA:1,_default
FNDA:1,setConfig
FNDA:0,mapFeaturePoint
FNDA:0,isBooleanKey
FNDA:0,filterFeaturesByOffset
FNDA:0,filterFeaturesByPropertyRegex
FNDA:1,mapElementFromConf
FNDA:0,convertProperty
DA:1,1
DA:2,1
DA:3,1
DA:4,1
DA:5,1
DA:6,1
DA:7,1
DA:8,1
DA:9,1
DA:10,1
DA:11,1
DA:12,1
DA:13,1
DA:14,1
DA:15,1
DA:16,1
DA:17,1
DA:18,1
DA:19,1
DA:20,1
DA:21,1
DA:22,1
DA:23,1
DA:24,1
DA:25,1
DA:26,1
DA:27,1
DA:28,0
DA:29,0
DA:30,0
DA:31,0
DA:32,0
DA:33,0
DA:34,0
DA:35,0
DA:36,0
DA:37,0
DA:38,0
DA:39,0
DA:40,0
DA:41,0
DA:42,1
DA:43,1
DA:44,1
DA:45,1
DA:46,1
DA:47,1
DA:48,1
DA:49,0
DA:50,0
DA:51,0
DA:52,1
DA:53,1
DA:54,1
DA:55,1
DA:56,1
DA:57,1
DA:58,1
DA:59,1
DA:60,1
DA:61,1
DA:62,0
DA:63,0
DA:64,0
DA:65,0
DA:66,1
DA:67,1
DA:68,1
DA:69,1
DA:70,1
DA:71,1
DA:72,1
DA:73,1
DA:74,1
DA:75,0
DA:76,0
DA:77,0
DA:78,0
DA:79,0
DA:80,1
DA:81,1
DA:82,1
DA:83,1
DA:84,1
DA:85,1
DA:86,0
DA:87,0
DA:88,1
DA:89,1
DA:90,1
DA:91,1
DA:92,1
DA:93,1
DA:94,1
DA:95,1
DA:96,1
DA:97,1
DA:98,1
DA:99,1
DA:100,1
DA:101,1
DA:102,0
DA:103,0
DA:104,0
DA:105,0
DA:106,0
DA:107,0
DA:108,0
DA:109,0
DA:110,0
DA:111,0
DA:112,0
DA:113,0
DA:114,0
DA:115,0
DA:116,0
DA:117,0
DA:118,0
DA:119,1
DA:120,1
DA:121,0
DA:122,0
DA:123,0
DA:124,0
DA:125,0
DA:126,0
DA:127,0
DA:128,0
DA:129,0
DA:130,0
DA:131,0
DA:132,0
DA:133,0
DA:134,0
DA:135,0
DA:136,0
DA:137,0
DA:138,0
DA:139,0
DA:140,0
DA:141,0
DA:142,0
DA:143,0
DA:144,0
DA:145,0
DA:146,0
DA:147,0
DA:148,0
DA:149,0
DA:150,0
DA:151,0
DA:152,0
DA:153,0
DA:154,0
DA:155,0
DA:156,0
DA:157,0
DA:158,0
DA:159,0
DA:160,0
DA:161,0
DA:162,0
DA:163,0
DA:164,0
DA:165,0
DA:166,0
DA:167,0
DA:168,0
DA:169,0
DA:170,0
DA:171,0
DA:172,0
DA:173,0
DA:174,0
DA:175,0
DA:176,0
DA:177,0
DA:178,0
DA:179,0
DA:180,0
DA:181,0
DA:182,0
DA:183,0
DA:184,0
DA:185,0
DA:186,0
DA:187,0
DA:188,0
DA:189,0
DA:190,0
DA:191,0
DA:192,0
DA:193,0
DA:194,0
DA:195,0
DA:196,0
DA:197,0
DA:198,0
DA:199,0
DA:200,0
DA:201,0
DA:202,1
DA:203,1
LF:203
LH:77
BRDA:16,0,0,1
BRDA:19,1,0,1
BRDA:23,2,0,1
BRDA:84,3,0,1
BRDA:85,4,0,0
BRDA:101,5,0,0
BRF:6
BRH:4
end_of_record
TN:
SF:mappings/mapping-config.type.js
FNF:0
FNH:0
DA:1,1
DA:2,1
LF:2
LH:2
BRF:0
BRH:0
end_of_record

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,34 +0,0 @@
import MappingConfigType from "../../mappings/mapping-config.type";
/**
* configurations de mapping pour les cas de tests
*/
export const mappingRemoveAll: MappingConfigType = {
config_name: 'testing config',
config_author: 'tykayn <contact@cipherbliss.com>',
default_properties_of_point: {
'amenity': 'charging_station'
},
tags: {
nom_amenageur: {
key_converted: 'autre_nom_amenageur',
conditional_values: {
'Accessibilité inconnue': {
ignore_this_data: true, // ne pas ajouter de tag si la valeur est égale à Accessibilité inconnue.
},
}
}
}
}
export const mappingIgnore: MappingConfigType = {
config_name: 'testing config',
config_author: 'tykayn <contact@cipherbliss.com>',
default_properties_of_point: {
'amenity': 'charging_station'
},
tags: {
nom_amenageur: {
ignore_this_data: true,
}
}
}

View File

@ -1,21 +0,0 @@
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
4.822159,
45.635079
]
},
"properties": {
"nom_amenageur": "ELECTRA",
"siren_amenageur": "891624884",
"consolidated_commune": "S\u00e9r\u00e9zin-du-Rh\u00f4ne",
"consolidated_is_lon_lat_correct": true
}
}
]
}

View File

@ -1,315 +0,0 @@
# info sur les jeux de données
D'après le jeu de données Etalab
## liste des 310 opérateurs
270 AGENCY
2Ed Coutances
2F Production
ABSOLUT CONCEPT
Acelec Charge
advenir@zeborne.com
Aeroports de lyon
Allego
ALLENERGIES
alterna energie
ALU GRANON
Ambroise Avocat
ANYOS
AQUA LOISIRS
AREA Tech
ART DECO FINITION
arteco44
ATELIERS PROVENCE LOISIRS
Atlante | FR*ATL
ATRACHATA
Autel Netherlands B.V. | FR*AUT
Automobile de l'Est
AUTORECHARGE
AUTORECHARGE
AUTORECHARGE SAS
Avomarks
Bastide beaudinard & tours (BBT)
BAUDUCEL
Bénédictines du Sacré-Coeur de Montmartre
BH RESTAURATION
BIARS DISTRIBUTION
BORNECO
Borneco | FR*BHM
Bornevo
Bornevo Connect
Bouygues Energies et Services
BOUYGUES ENERGIES ET SERVICES
box
Camping des graniers
CAP EMPLOI
CAR2PLUG
CHAPITEAUX SERVICE
ChargePoint
Chargepoint
CHARGEPOLY
CHARRIERE DISTRIBUTION
CHATEAU DE RONZIERE
COMMUNAUTE DE COMMUNE LE DOURDANNAIS EN HUREPOIX (CCDH)
contact@autorecharge.fr
COPRODEX
Daltoner Avranches
Daltoner Caen
DALTONER CHERBOURG
Daltoner Granville
Daltoner Vire
DIDIER CHARTON-VACHET
Dropnplug
e-nergyze
E-TOTEM
E-totem
Easycharge services
Ecophi mobility
EcoPhi mobility
EDF
EDFRAY
EGE NOEL BERANGER
EGSM
EIZMENDI TRAITEUR EVENEMENTS
Ekoplug
ELEC eCONNECT
ELECTRA
ELECTRIC 55 CHARGING
Electriox Groupe
electromaps
ELECTROMAPS
Electromaps
ELEK BORDEAUX
ENERGEM
ENERGIE Eure-et-Loir
ENERGIE EURE-ET-LOIR
ENNESSER ET FILS
ENTREPRISE ADAM
ESPACE AUTO COURNON
Est Auto
EURO TAXI LINE
EV MAP SAS
EVBOX
EVERON
EVzen (SMEG Développement)
evzen (SMEG Développement)
evZen | FR*EVZ
F.B. AUTOMOBILES
Festilight
Freshmile
FRESHMILE
freshmile
FReshmile
Freshmile SAS
GABMAG17
GABORIT BOCAGE SERVICES
Gamba et Rota
GARAGE HENRY
garage Henry herve
Garage lefebvre
GEDIBOIS BATI COLMAN
GENE ELEC 35
GF3e
Golf de La Wantzenau
Green Diffusion
Green Technologie
GREEN TECHNOLOGIE
Green To Wheel
GreenYellow | FR*GYM
GROFF SAS
GROUPE COURTOIS SOCOHY
GROUPE LGE
GROUPE LGE SOCIETE AUTOPLUG
Grunzke Beate
Guerin
H alu concept
HABT
HAEFELI
HERVE THERMIQUE
HFOOD PESSAC
HFOOD VILLENAVE
Hostellerie
Hotel Le Moulin
Hôtel MACCHI
Hôtel Restaurant Hubert Kieffer
ICS Scgilthigheim
IFERRO
INOUID
IONITY
Ispo france
IXINA Le Cres
IXINA Saint Jean de Védas
ixina Villeneuve-lès-Béziers
Izivia
JAV INVESTISSEMENT
jmd
JONNARD LES ISSAMBRES
Kallista BDR
KIEHL
Kotelon
LA CONCIERGERIE D'ISA.
La dilettante
La jabotte
La jardinerie d'aveze sarl
LA PRAIRIE
Lacotte
Lacotte Pierre
LANGON DISTRIBUTION
Last Mile Solutions
LE BISTRO D'HUGO
Le Capelan
Le Grand Large
Le Manoir de l'Isle
le Relais
LE REVE DE JANINE
Leclerc Millau
LEGA
LEGELEUX
Leroux Damien
Les jardins maraichers des bords de rance
LIDL, Nicolas Barbarin
LMS Informatique
LUMI'IN
M. Yannick PIERRE
M.A.J.U.
ma borne auto
ma Borne Auto
MABORNEAUTO
MAS DES OLIVES
MAS DU TERME
MAS GALOFFRE
Masseria
MEA ENERGIES
MEDIODENT
Mickael Auto
MOBELEC
Modulo
MODULO
Modulo énergies
MONTA
MOVIVE_Izivia
NEXTENEO
NM SECURELEC
NON CONCERNE
Non concerné
non concerné
Normatech
Normatech Lodmi
NVH
NW IECharge
OCR MAINTENANCE ELECTRONIQUE
PAS DITINERANCE
Pascal Chene
Perrin
perrin
PHARMACIE DE HUNDLING
Pilotage Maritime
PLAGECO DISTRIBUTION
Polybati
Prodici
ProperPhi
Provibat
PROVIRIDIS
Proviridis | FR*PVD
PTBG et associés
QoWatt
R3
Ramsay Pole Lille métropole
RechargerMonAuto
REGIE MUNICIPALE D'ELECTRICITE DE LOOS
Rencontre-handi
REVE
RICOME ET SADOUL AXA FRANCE
RONALEV
Royal Champagne
RSDA mobility
SA FOOTBALL CLUB DES GIRONDINS DE BORDEAUX
sa les broyers
Sanou électricité
SAP LABS FRANCE
SARL BEAUDRE BAUDOT
SARL JUMO
SARL LAFOURCADE
SARL LES BAINS DE ROYAN
SARL VAHE
SAS CHATEAU DE MEMANAT
SAS DE L'AILETTE
sas e-motum
SAS Lujasy
SAS Miodis
SAS Sabo
SATUJO
SCI LA COLLINE
SCI LA GRANGE DESSOUS
SCI LES RUISSEAUX
SCI Lounapiou
SCI NOKI
SCI OLYMPE
SCP ACANTHE DRIMARACCI
SDC CENTRE MEDICAL ARTZAMENDI
SDC ORDINAL
SECAL
Securecharge
See You Sun
SELARL PHARMACIE CEVENOLE
Séolis
SGA Industries
SIEGE 27
SIPECC
SNAM GROUPE
SNER RHONE-ALPES
société La Clérine
Société LEVAROY, Monsieur LEROY
Societe moderne d'isolation
Société Sigma Tec
Société SIPECC
Société Y
Sodetrel
SOLIDARAUTO 49
SOREGIES
SPBR1
SPIE CITYNETWORKS
STATIONS-E
Sud Camargue
Sud Hotel
TANAY Electricité
Technic Elec
themis
Thibal Distribution
TISSERANT
total énergie
Total marketing france
TotalEnergies Charging Services
TotalEnergies Marketing France
ubitricity
UBITRICITY GMBH
Vegetalis
Vigot
Ville de Riquewihr
Vincent
Virta
VIRTA
Volta Charging
WAAT
WAAT SAS | FR*W10
WAAT SAS | FR*W11
WAAT SAS | FR*WA1
WAAT SAS | FR*WA3
WAAT SAS | FR*WA4
WAAT SAS | FR*WA5
WAAT SAS | FR*WA6
WAAT SAS | FR*WA8
WAAT SAS | FR*WA9
WAAT SAS | FR*WAT
WattzHub | FR*SMI
web services advenir
Wedom
WeDoM
WeDoM.io
WeeCharge
WICKER TP
ZEBORNE
ZEborne
ZEENCO
Zen Construction

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

View File

@ -1,125 +0,0 @@
# domaines de données IRVE
## puissance_nominale
quelle pagaille:
225
150
50
300
22
24
18
350
25
21
7
48
38
63
320
160
125
43
2
11
3
200
175
6
20
23
45
17
44
56
325
90
75
120
4
36
180
54
7.4
42
12
15
60
100
30
210
126
40
9
70
80
360
124
64
115
62
22.00
22.0
0.0
50.00
12
47
24.00
7.00
7.0
5.9
71708
131524
49521
0
19
300000
22080
50000
63000
90000
60000
3.4
5
122
72
18.00
43.00
3.22
3.00
11.00
230
400
110
22
2.3
27
26
3.7
62500
22.08
7.36
11.04
1.7
14
22000
7000
3000
4.6
32
2859660
60973
5.5
12
175.00
22
22
100.00
6.9
240
149
16

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,67 +0,0 @@
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
4.822159,
45.635079
]
},
"properties": {
"nom_amenageur": "ELECTRA",
"siren_amenageur": "891624884",
"contact_amenageur": "help@electra.com",
"nom_operateur": "ELECTRA",
"contact_operateur": "help@electra.com",
"telephone_operateur": "",
"nom_enseigne": "ELECTRA",
"id_station_itinerance": "FRELCPSDRPG",
"id_station_local": "",
"nom_station": "S\u00e9r\u00e9zin-du-Rh\u00f4ne - Peugeot",
"implantation_station": "Station d\u00e9di\u00e9e \u00e0 la recharge rapide",
"adresse_station": "12 chemin d\u00e9partemental 12, Peugeot 69360 S\u00e9r\u00e9zin-du-Rh\u00f4ne",
"code_insee_commune": "69294",
"coordonneesXY": "[4.82215900,45.63507900]",
"nbre_pdc": "8",
"id_pdc_itinerance": "FRELCECURS",
"id_pdc_local": "",
"puissance_nominale": "225",
"prise_type_ef": "false",
"prise_type_2": "false",
"prise_type_combo_ccs": "true",
"prise_type_chademo": "false",
"prise_type_autre": "false",
"gratuit": "false",
"paiement_acte": "true",
"paiement_cb": "true",
"paiement_autre": "true",
"tarification": "",
"condition_acces": "Acc\u00e8s libre",
"reservation": "true",
"horaires": "24/7",
"accessibilite_pmr": "Accessibilit\u00e9 inconnue",
"restriction_gabarit": "Inconnu",
"station_deux_roues": "false",
"raccordement": "Direct",
"num_pdl": "N/A",
"date_mise_en_service": "2022-10-27",
"observations": "T\u00e9l\u00e9charger l'application ELECTRA pour r\u00e9server et payer sur go-electra.com",
"date_maj": "2023-07-29",
"cable_t2_attache": "",
"last_modified": "2023-07-29T03:05:24.360000+00:00",
"datagouv_dataset_id": "623ca46c13130c3228abd018",
"datagouv_resource_id": "e9bb3424-77cd-40ba-8bbd-5a19362d0365",
"datagouv_organization_or_owner": "electra",
"consolidated_longitude": 4.822159,
"consolidated_latitude": 45.635079,
"consolidated_code_postal": "69360",
"consolidated_commune": "S\u00e9r\u00e9zin-du-Rh\u00f4ne",
"consolidated_is_lon_lat_correct": true,
"consolidated_is_code_insee_verified": true
}
}
]
}

View File

@ -1,4 +0,0 @@
nom_amenageur,siren_amenageur,contact_amenageur,nom_operateur,contact_operateur,telephone_operateur,nom_enseigne,id_station_itinerance,id_station_local,nom_station,implantation_station,adresse_station,code_insee_commune,coordonneesXY,nbre_pdc,id_pdc_itinerance,id_pdc_local,puissance_nominale,prise_type_ef,prise_type_2,prise_type_combo_ccs,prise_type_chademo,prise_type_autre,gratuit,paiement_acte,paiement_cb,paiement_autre,tarification,condition_acces,reservation,horaires,accessibilite_pmr,restriction_gabarit,station_deux_roues,raccordement,num_pdl,date_mise_en_service,observations,date_maj,cable_t2_attache,last_modified,datagouv_dataset_id,datagouv_resource_id,datagouv_organization_or_owner,consolidated_longitude,consolidated_latitude,consolidated_code_postal,consolidated_commune,consolidated_is_lon_lat_correct,consolidated_is_code_insee_verified
ELECTRA,891624884,help@electra.com,ELECTRA,help@electra.com,,ELECTRA,FRELCPBROHI,,Bron - Hôtel Ibis Lyon Est,Station dédiée à la recharge rapide,36 avenue du Doyen Jean Lépine 69500 Bron,69029,"[4.90415400,45.74800500]",4,FRELCE2JW9,,225,false,false,true,false,false,false,true,true,true,,Accès libre,true,24/7,Accessibilité inconnue,Inconnu,false,Direct,N/A,2023-05-04,Télécharger l'application ELECTRA pour réserver et payer sur go-electra.com,2023-08-06,,2023-08-06T03:05:25.841000+00:00,623ca46c13130c3228abd018,e9bb3424-77cd-40ba-8bbd-5a19362d0365,electra,4.904154,45.748005,69500,Bron,True,True
ELECTRA,891624884,help@electra.com,ELECTRA,help@electra.com,,ELECTRA,FRELCPBLOHM,,Blotzheim - Hôtel Mercure Bâle Mulhouse Aéroport,Station dédiée à la recharge rapide,3 rue de l'industrie 68730 Blotzheim,68042,"[7.50290400,47.60821400]",8,FRELCEXY9P,,225,false,false,true,false,false,false,true,true,true,,Accès libre,true,24/7,Accessibilité inconnue,Inconnu,false,Direct,N/A,2022-09-22,Télécharger l'application ELECTRA pour réserver et payer sur go-electra.com,2023-08-06,,2023-08-06T03:05:25.841000+00:00,623ca46c13130c3228abd018,e9bb3424-77cd-40ba-8bbd-5a19362d0365,electra,7.502904,47.608214,68730,Blotzheim,True,True
ELECTRA,891624884,help@electra.com,ELECTRA,help@electra.com,,ELECTRA,FRELCPSMCLE,,Saint-Magne-de-Castillon - E.Leclerc,Station dédiée à la recharge rapide,2 chemin de Perrin 33350 Saint-Magne-de-Castillon,33437,"[-0.06340700,44.85401900]",4,FRELCEEEAW,,150,false,false,true,false,false,false,true,true,true,,Accès libre,true,24/7,Accessibilité inconnue,Inconnu,false,Direct,N/A,2023-04-28,Télécharger l'application ELECTRA pour réserver et payer sur go-electra.com,2023-08-06,,2023-08-06T03:05:25.841000+00:00,623ca46c13130c3228abd018,e9bb3424-77cd-40ba-8bbd-5a19362d0365,electra,-0.063407,44.854019,33350,Saint-Magne-de-Castillon,True,True
1 nom_amenageur siren_amenageur contact_amenageur nom_operateur contact_operateur telephone_operateur nom_enseigne id_station_itinerance id_station_local nom_station implantation_station adresse_station code_insee_commune coordonneesXY nbre_pdc id_pdc_itinerance id_pdc_local puissance_nominale prise_type_ef prise_type_2 prise_type_combo_ccs prise_type_chademo prise_type_autre gratuit paiement_acte paiement_cb paiement_autre tarification condition_acces reservation horaires accessibilite_pmr restriction_gabarit station_deux_roues raccordement num_pdl date_mise_en_service observations date_maj cable_t2_attache last_modified datagouv_dataset_id datagouv_resource_id datagouv_organization_or_owner consolidated_longitude consolidated_latitude consolidated_code_postal consolidated_commune consolidated_is_lon_lat_correct consolidated_is_code_insee_verified
2 ELECTRA 891624884 help@electra.com ELECTRA help@electra.com ELECTRA FRELCPBROHI Bron - Hôtel Ibis Lyon Est Station dédiée à la recharge rapide 36 avenue du Doyen Jean Lépine 69500 Bron 69029 [4.90415400,45.74800500] 4 FRELCE2JW9 225 false false true false false false true true true Accès libre true 24/7 Accessibilité inconnue Inconnu false Direct N/A 2023-05-04 Télécharger l'application ELECTRA pour réserver et payer sur go-electra.com 2023-08-06 2023-08-06T03:05:25.841000+00:00 623ca46c13130c3228abd018 e9bb3424-77cd-40ba-8bbd-5a19362d0365 electra 4.904154 45.748005 69500 Bron True True
3 ELECTRA 891624884 help@electra.com ELECTRA help@electra.com ELECTRA FRELCPBLOHM Blotzheim - Hôtel Mercure Bâle Mulhouse Aéroport Station dédiée à la recharge rapide 3 rue de l'industrie 68730 Blotzheim 68042 [7.50290400,47.60821400] 8 FRELCEXY9P 225 false false true false false false true true true Accès libre true 24/7 Accessibilité inconnue Inconnu false Direct N/A 2022-09-22 Télécharger l'application ELECTRA pour réserver et payer sur go-electra.com 2023-08-06 2023-08-06T03:05:25.841000+00:00 623ca46c13130c3228abd018 e9bb3424-77cd-40ba-8bbd-5a19362d0365 electra 7.502904 47.608214 68730 Blotzheim True True
4 ELECTRA 891624884 help@electra.com ELECTRA help@electra.com ELECTRA FRELCPSMCLE Saint-Magne-de-Castillon - E.Leclerc Station dédiée à la recharge rapide 2 chemin de Perrin 33350 Saint-Magne-de-Castillon 33437 [-0.06340700,44.85401900] 4 FRELCEEEAW 150 false false true false false false true true true Accès libre true 24/7 Accessibilité inconnue Inconnu false Direct N/A 2023-04-28 Télécharger l'application ELECTRA pour réserver et payer sur go-electra.com 2023-08-06 2023-08-06T03:05:25.841000+00:00 623ca46c13130c3228abd018 e9bb3424-77cd-40ba-8bbd-5a19362d0365 electra -0.063407 44.854019 33350 Saint-Magne-de-Castillon True True

View File

@ -1,17 +0,0 @@
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
2.2335179, 48.6973801
]
},
"properties": {
"accessibilite_pmr":"Mo-Fr 08:30-12:00,Mo-Fr 14:00-19:00,Sat 09:00-18:30"
}
}
]
}

View File

@ -1,8 +0,0 @@
#!/bin/bash
# get the updated geojson
wget https://www.data.gouv.fr/fr/datasets/r/7eee8f09-5d1b-4f48-a304-5e99e8da1e26 -P ./etalab_data -O ./etalab_data/all.json
wget https://www.data.gouv.fr/fr/datasets/r/8d9398ae-3037-48b2-be19-412c24561fbb -P ./etalab_data -O ./etalab_data/all.csv
# https://www.data.gouv.fr/fr/datasets/r/8d9398ae-3037-48b2-be19-412c24561fbb pour le jeu de données irve schema v2, non utilisé dans ce script
# filter its tags
echo "refresh de la data"

View File

@ -1,199 +0,0 @@
/**
* For a detailed explanation regarding each configuration property, visit:
* https://jestjs.io/docs/configuration
*/
import type {Config} from 'jest';
const config: Config = {
// All imported modules in your tests should be mocked automatically
// automock: false,
// Stop running tests after `n` failures
// bail: 0,
// The directory where Jest should store its cached dependency information
// cacheDirectory: "/tmp/jest_rs",
// Automatically clear mock calls, instances, contexts and results before every test
clearMocks: true,
// Indicates whether the coverage information should be collected while executing the test
collectCoverage: true,
// An array of glob patterns indicating a set of files for which coverage information should be collected
// collectCoverageFrom: undefined,
// The directory where Jest should output its coverage files
coverageDirectory: "coverage",
// An array of regexp pattern strings used to skip coverage collection
// coveragePathIgnorePatterns: [
// "/node_modules/"
// ],
// Indicates which provider should be used to instrument code for coverage
coverageProvider: "v8",
// A list of reporter names that Jest uses when writing coverage reports
// coverageReporters: [
// "json",
// "text",
// "lcov",
// "clover"
// ],
// An object that configures minimum threshold enforcement for coverage results
// coverageThreshold: undefined,
// A path to a custom dependency extractor
// dependencyExtractor: undefined,
// Make calling deprecated APIs throw helpful error messages
// errorOnDeprecated: false,
// The default configuration for fake timers
// fakeTimers: {
// "enableGlobally": false
// },
// Force coverage collection from ignored files using an array of glob patterns
// forceCoverageMatch: [],
// A path to a module which exports an async function that is triggered once before all test suites
// globalSetup: undefined,
// A path to a module which exports an async function that is triggered once after all test suites
// globalTeardown: undefined,
// A set of global variables that need to be available in all test environments
// globals: {},
// The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers.
// maxWorkers: "50%",
// An array of directory names to be searched recursively up from the requiring module's location
// moduleDirectories: [
// "node_modules"
// ],
// An array of file extensions your modules use
// moduleFileExtensions: [
// "js",
// "mjs",
// "cjs",
// "jsx",
// "ts",
// "tsx",
// "json",
// "node"
// ],
// A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module
// moduleNameMapper: {},
// An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
// modulePathIgnorePatterns: [],
// Activates notifications for test results
// notify: false,
// An enum that specifies notification mode. Requires { notify: true }
// notifyMode: "failure-change",
// A preset that is used as a base for Jest's configuration
// preset: undefined,
// Run tests from one or more projects
// projects: undefined,
// Use this configuration option to add custom reporters to Jest
// reporters: undefined,
// Automatically reset mock state before every test
// resetMocks: false,
// Reset the module registry before running each individual test
// resetModules: false,
// A path to a custom resolver
// resolver: undefined,
// Automatically restore mock state and implementation before every test
// restoreMocks: false,
// The root directory that Jest should scan for tests and modules within
// rootDir: undefined,
// A list of paths to directories that Jest should use to search for files in
// roots: [
// "<rootDir>"
// ],
// Allows you to use a custom runner instead of Jest's default test runner
// runner: "jest-runner",
// The paths to modules that run some code to configure or set up the testing environment before each test
// setupFiles: [],
// A list of paths to modules that run some code to configure or set up the testing framework before each test
// setupFilesAfterEnv: [],
// The number of seconds after which a test is considered as slow and reported as such in the results.
// slowTestThreshold: 5,
// A list of paths to snapshot serializer modules Jest should use for snapshot testing
// snapshotSerializers: [],
// The test environment that will be used for testing
// testEnvironment: "jest-environment-node",
// Options that will be passed to the testEnvironment
// testEnvironmentOptions: {},
// Adds a location field to test results
// testLocationInResults: false,
// The glob patterns Jest uses to detect test files
// testMatch: [
// "**/__tests__/**/*.[jt]s?(x)",
// "**/?(*.)+(spec|test).[tj]s?(x)"
// ],
// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
// testPathIgnorePatterns: [
// "/node_modules/"
// ],
// The regexp pattern or array of patterns that Jest uses to detect test files
// testRegex: [],
// This option allows the use of a custom results processor
// testResultsProcessor: undefined,
// This option allows use of a custom test runner
// testRunner: "jest-circus/runner",
// A map from regular expressions to paths to transformers
// transform: undefined,
// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
// transformIgnorePatterns: [
// "/node_modules/",
// "\\.pnp\\.[^\\/]+$"
// ],
// An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
// unmockedModulePathPatterns: undefined,
// Indicates whether each individual test should be reported during the run
// verbose: undefined,
// An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode
// watchPathIgnorePatterns: [],
// Whether to use watchman for file crawling
// watchman: true,
};
export default config;

File diff suppressed because it is too large Load Diff

View File

@ -1 +0,0 @@
console.log('hello mapper')

View File

@ -1,126 +0,0 @@
/**
prendre un CSV,
examiner toutes les colonnes et leurs valeurs,
garder en mémoire les valeurs uniques de chaque colonne
faire un nouveau csv qui ne montre que les valeurs uniques pour chacune des colonnes
et qui compte le nombre de valeurs
**/
import utils from './mappings/utils'
import {parse} from 'csv'
const fs = require('fs')
interface VarianceType {
[key: string]: Array<string>
}
let csv_content = 'variance de dataset\n';
let separator = ';';
// let columns_headings = [];
let data_variance: VarianceType = {};
const inputPath = './etalab_data/all.csv'
// const inputPath = './etalab_data/small.csv'
let columns_headings: Array<string> = [];
let lines_count = 0;
let longest_variance_count = 0;
console.log('open file ', inputPath)
fs.readFile(inputPath, function (err: any, fileData: any) {
if (err) {
throw new Error(err)
} else {
parse(fileData, {columns: false, trim: true}, function (err: any, rows: any) {
// Your CSV data is in an array of arrays passed to this callback as rows.
console.log('line ', lines_count)
rows.forEach((row: Array<any>) => {
if (lines_count === 0) {
// console.log('elem', row)
row.forEach((value: string) => {
// console.log('value', value)
columns_headings.push(value)
data_variance[value] = []
})
console.log('columns_headings.length', columns_headings.length)
lines_count++
} else {
// lignes suivantes
let column_index = 0;
row.forEach((value: string) => {
value = value.trim()
// dans chaque colonne, vérifier que la valeur n'est pas déjà présente dans les index de variance
// si la valeur est nouvelle, l'ajouter
if (data_variance[columns_headings[column_index]].indexOf(value) < 0) {
data_variance[columns_headings[column_index]].push(value)
if (
data_variance[columns_headings[column_index]].length > longest_variance_count
) {
longest_variance_count = data_variance[columns_headings[column_index]].length
}
}
column_index++
})
lines_count++
}
})
console.log('longest_variance_count', longest_variance_count)
utils.writeFile('variance.csv', writeCSVVariance())
// console.log('data_variance', data_variance)
})
}
console.log('parsing done')
// console.log('data_variance', data_variance)
})
/**
* écrit un csv avec les données de variance du dataset donné
*/
function writeCSVVariance() {
let csv_content = ';variance de ' + inputPath + ';' + new Date() + '\n'
let columns = Object.keys(data_variance);
// add headings
columns_headings.forEach((heading: string) => {
csv_content = csv_content + separator + heading
})
csv_content = csv_content + '\n'
// add max length of variance for each column
let ii = 0
columns.forEach((column: string) => {
// console.log('column', column, data_variance[column].length)
csv_content = csv_content + separator + data_variance[column].length
ii++
})
csv_content = csv_content + '\n\n'
// add content of values
for (let ii = 0; ii < longest_variance_count; ii++) {
csv_content = csv_content + '\n'
columns.forEach((column: any) => {
if (ii < data_variance[column].length) {
let currentValue = data_variance[column][ii]
csv_content = csv_content + separator + currentValue
} else {
csv_content = csv_content + separator
}
})
}
// console.log('csv_content', csv_content)
return csv_content;
}

View File

@ -1,174 +0,0 @@
/**
* plan de conversion des clés du jeu de données vers les tags OSM
* détail dans le tableau
* https://wiki.openstreetmap.org/wiki/France/data.gouv.fr/Bornes_de_Recharge_pour_V%C3%A9hicules_%C3%89lectriques
*/
import MappingConfigType from "../mapping-config.type";
const MappingIRVE: MappingConfigType = {
config_name: "IRVE config",
config_author: "tykayn <contact@cipherbliss.com>",
default_properties_of_point: {
'amenity': 'charging_station'
},
source: {
geojson_path: "etalab_data/all.json",
url: 'https://www.data.gouv.fr/fr/datasets/r/7eee8f09-5d1b-4f48-a304-5e99e8da1e26'
},
/**
* select only certain points from the source
*/
filters: {
enable_coordinates_filter: false,
enable_properties_filter: true,
// add only geojson points who are found having this regex in the zipcode properties
properties: {
consolidated_code_postal: '^[76|27]'
},
bounding_box: [
{}
]
},
add_not_mapped_tags_too: false,
tags: {
// ******* nombres
nbre_pdc: 'capacity',
// ******* textes
amenity: 'amenity', // conserver le tag de base
capacity: 'capacity', // conserver le tag de base
nom_amenageur: 'operator',
siren_amenageur: 'owner:ref:FR:SIREN',
nom_operateur: 'operator',
telephone_operateur: 'phone',
contact_operateur: 'email', // ici, on souhaite convertir la clé contact_operateur=bidule en email=bidule
// id_station_itinerance: 'ref:EU:EVSE',
id_station_local: 'ref',
gratuit: {
key_converted: 'fee',
convert_to_boolean_value: true,
},
paiement_acte:
{
key_converted: 'authentication:none',
convert_to_boolean_value: true, // convertit en yes ou no
},
reservation: {
convert_to_boolean_value: true, // convertit en yes ou no
},
// observations: 'note',
// nom_station: 'name',
nom_enseigne: 'network',
// ******* dates
date_mise_en_service: 'start_date',
// date_maj: 'source:date',
// ******** champs booléens
cable_t2_attache:
{
key_converted: 'socket:type2_cable',
// socket:type2_cable vaut 1 dans OSM si vrai
truthy_value: '1',
ignore_if_falsy: true,
}
,
prise_type_ef: {
key_converted: 'socket:typee',
ignore_if_falsy: true,
convert_to_boolean_value: true,
},
prise_type_2: {
key_converted: 'socket:type2',
ignore_if_falsy: true,
convert_to_boolean_value: true,
},
prise_type_combo_ccs: {
key_converted: 'socket:type2_combo',
ignore_if_falsy: true,
convert_to_boolean_value: true,
},
prise_type_chademo: {
key_converted: 'socket:chademo',
ignore_if_falsy: true,
convert_to_boolean_value: true,
},
// ******** champs plus complexes
horaires: 'opening_hours', // déjà au bon format
// accessibilite_pmr: 'wheelchair',
paiement_cb: {
key_converted: 'payment:credit_cards',
// ignore_if_falsy: true,
convert_to_boolean_value: true,
},
// accessibilite_pmr: {
// key_converted: "wheelchair",
// conditional_values: {
// "Accessibilité inconnue": {
// // value_converted: "",
// ignore_this_data: true, // ne pas ajouter de tag si la valeur est égale à Accessibilité inconnue.
// // transform_function : (original_value) => original_value.toLowerCase(),
// },
// "Accessible mais non réservé PMR": {
// value_converted: "yes"
// },
// "Réservé PMR": {
// value_converted: "yes"
// },
// "Non accessible": {
// value_converted: "no"
// },
// "Mo-Fr 08:30-12:00,Mo-Fr 14:00-19:00,Sat 09:00-18:30": {
// value_converted: "Mo-Fr 08:30-12:00,Mo-Fr 14:00-19:00,Sat 09:00-18:30"
// },
// "24/7": {
// value_converted: ""
// }
station_deux_roues: {
remove_original_key: true,
conditional_values: {
// ajout de trois tags si la valeur est yes
"yes": {
tags_to_add: [
{bicycle: "yes"},
{scooter: "yes"},
{motorcar: "no"},
]
}
}
}
// TODO gestion des puissances de bornes
// avec une fonction de transformation des valeurs
// parmi le domaine du jeu de données
// nécessite une clé conditionnelle à la valeur true d'autres clés converties.
// c'est compliquay.
},
}
// "nom_amenageur": "ELECTRA",
// "siren_amenageur": "891624884",
// "consolidated_commune": "S\u00e9r\u00e9zin-du-Rh\u00f4ne",
// "consolidated_is_lon_lat_correct": true,
// "cable_t2_attache": "True"
// "goal": "jeu de données pour tester la mapping engine",
// "prise_type_2": "yes",
// "station_deux_roues": "yes",
// "accessibilite_pmr": "Non accessible",
// "amenity": "charging_station",
// "capacity": 12,
// "reservation": "False",
// "nom_amenageur": "Bob Lenon",
// "siren_amenageur": "12345678",
// "socket:typee": "False",
// "prise_type_combo_ccs": "no",
// "fee": "no",
// "authentication:none": "yes"
export default MappingIRVE;

View File

@ -1,45 +0,0 @@
/**
* plan de conversion des clés du jeu de données vers les tags OSM
* détail dans le tableau
* https://wiki.openstreetmap.org/wiki/France/data.gouv.fr/Bornes_de_Recharge_pour_V%C3%A9hicules_%C3%89lectriques
*/
const mappingIRVE:any = {
// ******* nombres
nbre_pdc: 'capacity',
amenity: 'amenity', // conserver le tag de base
capacity: 'capacity', // conserver le tag de base
nom_amenageur: 'operator',
siren_amenageur: 'owner:ref:FR:SIREN',
nom_operateur: 'operator',
telephone_operateur: 'phone',
// ici, on souhaite convertir la clé contact_operateur=bidule en email=bidule
contact_operateur: 'email',
id_station_itinerance: 'ref:EU:EVSE',
id_station_local: 'ref',
gratuit: 'fee',
paiement_acte: 'authentication:none',
reservation: 'reservation',
observations: 'note',
nom_station: 'name',
nom_enseigne: 'network',
// ******* dates
date_mise_en_service: 'start_date',
date_maj: 'source:date',
// ******** champs booléens
prise_type_ef: 'socket:typee',
prise_type_2: 'socket:type2',
prise_type_combo_ccs: 'socket:type2_combo',
prise_type_chademo: 'socket:chademo',
// ******** champs plus complexes
horaires: 'opening_hours', // déjà au bon format
}
export default mappingIRVE;

View File

@ -1,326 +0,0 @@
import custom_utils from './utils'
import MappingConfigType from "./mapping-config.type";
const {debugLog} = custom_utils
let listOfBooleanKeys = [
"prise_type_ef",
"prise_type_2",
"prise_type_combo_ccs",
"prise_type_chademo",
"gratuit",
"paiement_acte",
"paiement_cb",
"cable_t2_attache"
]
export default class {
mapping_config: any = {}
constructor(mappingConfig: MappingConfigType) {
this.setConfig(mappingConfig)
}
setConfig(mappingConfig: MappingConfigType) {
this.mapping_config = mappingConfig
}
mapFeaturePoint(featurePointGeoJson: any) {
let geoJSONConvertedPoint: any = {}
geoJSONConvertedPoint.properties = {...this.mapping_config.default_properties_of_point}
geoJSONConvertedPoint.type = featurePointGeoJson.type
geoJSONConvertedPoint.geometry = featurePointGeoJson.geometry
// let props = featurePointGeoJson.properties
// props.forEach((key, value) => {
//
// })
return geoJSONConvertedPoint
}
/**
* TODO convert to mapping config property to transform_truthy
* @param pointKeyName
* @returns {boolean}
*/
isBooleanKey(pointKeyName: string): boolean {
return listOfBooleanKeys.indexOf(pointKeyName) !== -1
}
truthyValues = ['true', 'True', 'TRUE', '1', 'yes', 1]
falsyValues = ['false', 'False', 'FALSE', '0', 'no', 0]
/**
* reduce number of features
* @param offsetCount
* @param listOfFeatures
*/
filterFeaturesByOffset(offsetCount: number, listOfFeatures: any): Array<any> {
let filteredList = listOfFeatures
// TODO
return filteredList
}
// filterFeaturesByPropertyRegex(bboxConfig:any, listOfFeatures:any) {
// debugLog('bboxConfig', bboxConfig)
// let filteredList = listOfFeatures
// // TODO
// return filteredList
// }
filterFeaturesByPropertyRegex(propertyName: string, criteriaRegex: any, listOfFeatures: any) {
let filteredList = listOfFeatures.filter((feature: any) => {
return criteriaRegex.test(feature?.properties[propertyName])
})
return filteredList
}
/**
* retuns the converted element from mapping config if present, null otherwise
*/
mapElementFromConf(featurePoint: any): any {
// debugLog('mapElementFromConf: mapElementFromConf', featurePoint)
if (!this.mapping_config) {
throw new Error('no config was loaded in the mapping engine. use setConfig(my_mapping_config) on this instance of mapping engine before using this.')
}
debugLog('mapElementFromConf: config_name', this.mapping_config.config_name)
let mappingKeys = Object.keys(this.mapping_config.tags)
let featurePointPropertiesKeys = Object.keys(featurePoint.properties)
debugLog('mapElementFromConf: ============= keys mappingKeys:', this.mapping_config.tags.length, mappingKeys.length)
debugLog('mapElementFromConf: ============= keys featurePointPropertiesKeys :', featurePoint.properties.length, featurePointPropertiesKeys.length)
let newProperties = {...this.mapping_config.default_properties_of_point}
// reinit properties of current point
let basePoint = Object.create(featurePoint)
basePoint.type = featurePoint.type
basePoint.geometry = featurePoint.geometry
basePoint.properties = {...this.mapping_config.default_properties_of_point}
// apply new properties if found in mapping config
featurePointPropertiesKeys.forEach(pointKeyName => {
debugLog('mapElementFromConf: convert', pointKeyName)
this.convertProperty(pointKeyName, mappingKeys, featurePoint, newProperties)
})
basePoint.properties = newProperties
// debugLog('mapElementFromConf: basePoint', basePoint)
return basePoint
}
/**
* convertit une propriété en une autre selon la config de mapping
* @param pointKeyName
* @param mappingKeys
* @param featurePoint
* @param newProperties
*/
convertProperty(pointKeyName: string, mappingKeys: any, featurePoint: any, newProperties: any) {
let originalValue = featurePoint.properties[pointKeyName]
let mappingValueObject: any = '';
if (mappingKeys.indexOf(pointKeyName) > 0) {
mappingValueObject = this.mapping_config.tags[pointKeyName]
debugLog('convertProperty: mappingValueObject ', mappingValueObject)
}
debugLog(' ------ convertProperty: pointKeyName', pointKeyName)
// debugLog('convertProperty: mappingKeys', mappingKeys)
if (this.mapping_config.add_not_mapped_tags_too && (mappingKeys.indexOf(pointKeyName) === -1)) {
/**
* add all unmapped tags is enabled
*/
newProperties[pointKeyName] = originalValue;
} else {
/**
* only use existing keys
*/
if (mappingKeys.indexOf(pointKeyName) > 0) {
let valueConvertedFromMapping = featurePoint.properties[pointKeyName]
let keyConvertedFromMapping = mappingKeys[mappingKeys.indexOf(pointKeyName)]
let mappingConfigOfTag = this.mapping_config.tags[pointKeyName]
debugLog('========== mappingConfigOfTag', mappingConfigOfTag)
debugLog('convertProperty: found element', pointKeyName, '=>', keyConvertedFromMapping, 'value : ', valueConvertedFromMapping)
let convertedValue = originalValue
let typeOfConfigForKey = typeof mappingConfigOfTag
let isStringValue = typeOfConfigForKey === 'string'
let isConfigMappingObject = typeOfConfigForKey === 'object'
debugLog('convertProperty: - typeofValue', typeOfConfigForKey)
debugLog('convertProperty: - pointKeyName', pointKeyName)
debugLog('convertProperty: - valueConvertedFromMapping', valueConvertedFromMapping)
debugLog('typeof valueConvertedFromMapping === \'string\'', typeOfConfigForKey)
debugLog('convertProperty: isStringValue?', valueConvertedFromMapping, isStringValue)
debugLog('convertProperty: isStringValue?', valueConvertedFromMapping, isStringValue)
debugLog('mappingConfigOfTag', mappingConfigOfTag)
debugLog('typeOfConfigForKey', typeOfConfigForKey)
/**
* conversion si la clé à une config d'une string, on ne change que la clé, pas la valeur
*/
if (isStringValue) {
debugLog('convertProperty: -- string value')
debugLog('convertProperty: -- string value')
debugLog('convertProperty: -- simple conversion : ', pointKeyName, '=> ', mappingConfigOfTag, '_', originalValue, '=>', valueConvertedFromMapping)
debugLog('convertProperty: -- convertedValue', convertedValue)
convertedValue = valueConvertedFromMapping
if (convertedValue) {
newProperties[mappingConfigOfTag] = convertedValue
}
} else {
debugLog('convertProperty: no string value')
}
if (isConfigMappingObject) {
let configObject = mappingConfigOfTag
debugLog('convertProperty: is config object', configObject)
let newKey: any = '' + pointKeyName
let remove_original_key = false;
if (configObject.key_converted) {
newKey = configObject.key_converted
}
if (configObject.truthy_value) {
// convertir la valeur, si elle est truthy, la transformer en ce que donne la propriété truthy_value
// exemple: le jeu de données dit que la colonne cable_t2_attache vaut "True", mais on veut le convertir en "1".
// on met donc truthy_value: '1'
debugLog('truthy_value', originalValue)
if (this.truthyValues.indexOf(originalValue) !== -1) {
convertedValue = configObject.truthy_value
}
}
if (configObject.falsy_value) {
if (this.falsyValues.indexOf(originalValue) !== -1) {
convertedValue = configObject.falsy_value
}
}
/**
* conversion booléenne
*/
if (mappingValueObject.convert_to_boolean_value) {
debugLog('convertProperty: is boolean_value_conversion')
debugLog('convertProperty: ==========> original value', originalValue)
if (this.truthyValues.indexOf(originalValue) !== -1) {
convertedValue = 'yes'
}
if (this.falsyValues.indexOf(originalValue) !== -1) {
convertedValue = 'no'
}
} else {
debugLog('convertProperty: is NOT having boolean_value_conversion', mappingValueObject)
}
if (configObject.remove_original_key) {
remove_original_key = true
}
if (configObject.ignore_if_falsy && this.falsyValues.indexOf(originalValue) !== -1) {
remove_original_key = true
}
/**
* config pour une clé
* nous pouvons renseigner une string ou un objet décrivant les transformations à réaliser
*/
if (!remove_original_key && configObject.conditional_values) {
debugLog('convertProperty: conditional_values__________',
configObject.conditional_values)
let keysConditionnalValues: any = Object.keys(configObject.conditional_values)
let isFoundValue = keysConditionnalValues.indexOf(originalValue)
debugLog('isFoundValue', isFoundValue, originalValue)
debugLog('keysConditionnalValues', keysConditionnalValues)
if (isFoundValue > -1) {
let conditionnalConfig: any = configObject.conditional_values[keysConditionnalValues[isFoundValue]]
/** ----------------------
* gestion des valeurs conditionnelles
* ---------------------- */
debugLog('conditionnalConfig', conditionnalConfig)
if (conditionnalConfig.ignore_this_data) {
debugLog(`on ignore cette clé car sa valeur "${originalValue}" est à exclure: `, pointKeyName, '=>', newKey)
remove_original_key = true;
}
if (conditionnalConfig.tags_to_add) {
// on peut définir un ensemble de tags à rajouter
let tagKeys = Object.keys(conditionnalConfig.tags_to_add)
debugLog('conditionnalConfig.tags_to_add', conditionnalConfig.tags_to_add)
conditionnalConfig.tags_to_add.forEach((object: any, pair: any) => {
debugLog('object', object)
debugLog('pair', pair)
let key: any = Object.keys(object)
key = key[0]
let value = object[key]
debugLog('key', key)
debugLog('value', value)
newProperties[key] = value
})
}
if (conditionnalConfig.truthy_value) {
// convertir la valeur, si elle est truthy, la transformer en ce que donne la propriété truthy_value
// exemple: le jeu de données dit que la colonne cable_t2_attache vaut "True", mais on veut le convertir en "1".
// on met donc truthy_value: '1'
if (this.truthyValues.indexOf(originalValue) !== -1) {
convertedValue = conditionnalConfig.truthy_value
}
}
if (conditionnalConfig.falsy_value) {
if (this.falsyValues.indexOf(originalValue) !== -1) {
convertedValue = conditionnalConfig.falsy_value
}
}
if (conditionnalConfig.transform_function) {
// une transformation de la valeur
// apply transformation to value
convertedValue = conditionnalConfig.transform_function(originalValue)
}
// use the value converted
else if (conditionnalConfig.value_converted) {
convertedValue = conditionnalConfig.value_converted
}
}
}
debugLog('convertProperty: convertedValue ==========> {', newKey, ':', convertedValue, '}')
debugLog(' =============== remove_original_key',newKey, remove_original_key)
if (!remove_original_key && newKey && convertedValue && !configObject.ignore_this_data) {
debugLog('convertProperty: added')
newProperties[newKey] = convertedValue.trim()
}
}
}
}
}
}

View File

@ -1,74 +0,0 @@
interface GeoJsonGeometry {
type:string,
coordinates:Array<number>,
}
interface GeoJsonProperties {
[key:string]: any,
}
interface GeoJsonFeature {
type:string,
geometry:GeoJsonGeometry,
properties:GeoJsonProperties,
}
export interface FeatureCollection{
type:string,
features:Array<GeoJsonFeature>,
}
export interface BoundingBoxCoordinatesType{
xMin: number,
xMax: number,
yMin: number,
yMax: number,
}
export default interface MappingConfigType{
config_name: string,
config_author: string,
add_not_mapped_tags_too: boolean,
default_properties_of_point: object,
source: object,
filters: object,
tags: FeaturePropertyMappingConfigType
}
/**
* configuration concernant toutes les valeurs
*/
export interface FeaturePropertyMappingConfigType{
[key:string]: any,
convert_to_boolean_value?:boolean,
remove_original_key?:boolean,
conditionnal_values?:ConditionnalValuesType,
transform_function?:Function,
}
/**
* choix de conversion de la valeur originale selon des critères donnés
*/
export interface ConditionnalValuesConfigType{
key_converted?:string,
value_converted?:string,
truthy_value?:any,
falsy_value?:any, // si la valeur originale est falsy, la convertir en la valeur donnée ici
ignore_this_data?:boolean,
tags_to_add?:TagsToAddConfig,
transform_function?:Function,
}
export interface ConditionnalValuesType{
[key:string]: ConditionnalValuesConfigType,
}
interface OneOSMTag {
[key:string]: string,
}
export interface TagsToAddConfig{
tags_to_add: Array<OneOSMTag>
}

View File

@ -1,69 +0,0 @@
import fs from 'fs'
let show_debug = 0
// show_debug = 1
let output_folder = 'output';
// console.log('----------------------show_debug', show_debug)
/**
* wrapper de log qui se montre uniquemnt si show_debug a é activé
* @param args
*/
function debugLog(...args: any[]) {
if (show_debug) {
console.log('### debug: ', ...args)
}
}
let listOfBooleanKeys = [
"prise_type_ef",
"prise_type_2",
"prise_type_combo_ccs",
"prise_type_chademo",
"gratuit",
"paiement_acte",
"paiement_cb",
"cable_t2_attache"
]
/**
*
* @param pointKeyName
* @returns {boolean}
*/
function isBooleanKey(pointKeyName: string): boolean {
return listOfBooleanKeys.indexOf(pointKeyName) !== -1
}
/**
* crée un fichier dans le dossier par défaut, output
* @param fileName
* @param fileContent
*/
function writeFile(fileName: string, fileContent: any) {
debugLog('write file ', fileName)
return fs.writeFile(
`./${output_folder}/${fileName}`,
fileContent,
'utf8',
(err) => {
if (err) {
console.log(`Error writing file: ${err}`)
} else {
console.log(`File ${fileName} is written successfully!`)
}
}
)
}
export default {
debugLog,
isBooleanKey,
writeFile
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
<osm version="0.6" generator="geojsontoosm"><node id="-1" lat="45.635079000000005" lon="4.822158999999999"><tag k="amenity" v="charging_station"/><tag k="operator" v="ELECTRA"/><tag k="owner:ref:FR:SIREN" v="891624884"/><tag k="email" v="help@electra.com"/><tag k="network" v="ELECTRA"/><tag k="socket:type2_combo" v="yes"/><tag k="fee" v="false"/><tag k="authentication:none" v="true"/><tag k="reservation" v="yes"/><tag k="opening_hours" v="24/7"/><tag k="start_date" v="2022-10-27"/></node></osm>

Some files were not shown because too many files have changed in this diff Show More