mirror of
https://forge.chapril.org/tykayn/wololo
synced 2025-06-20 01:34:42 +02:00
config convert panoramax up
This commit is contained in:
parent
a0f810f6db
commit
3145d30dcd
2 changed files with 24 additions and 2 deletions
|
@ -54,9 +54,11 @@ import MappingPlanningFamlial from "./mappings/converters/configPlanningFamilial
|
|||
import MappingSurveillanceRouen from "./mappings/converters/configSurveillance";
|
||||
import MappingRnb from "./mappings/converters/configRnb";
|
||||
import MappingArbresRemarquablesRouen from './mappings/converters/configArbresRemarquablesRouen'
|
||||
import MappingPanneauxMaxSpeed from './mappings/converters/configPanneauxMaxSpeed'
|
||||
const limitWarningPercentageChangeInPoints = 5; // show a warning when more than N percent of the number of points changed
|
||||
|
||||
const allowed_configs: any = {
|
||||
MappingPanneauxMaxSpeed,
|
||||
MappingArbresRemarquablesRouen,
|
||||
MappingRnb,
|
||||
mappingIssy2Roues,
|
||||
|
@ -256,7 +258,7 @@ function convertDataFromSource(sourceFilePath: string, mapping: MappingConfigTyp
|
|||
console.log('------ filter: filter_points_lesser_than_NkW', mapping.filters.filter_points_lesser_than_NkW)
|
||||
list_of_points = Mapping_engine.filterListOfPointsByExcludingIfMaxPowerIsLesserThan(mapping.filters.filter_points_lesser_than_NkW, list_of_points)
|
||||
}
|
||||
if (mapping.filters.filter_points_older_than_year && mapping.filters.filter_points_by_year_property ) {
|
||||
if (mapping.filters.filter_points_older_than_year && mapping.filters.filter_points_by_year_property) {
|
||||
console.log('------ filter: filter_points_older_than_year', mapping.filters.filter_points_older_than_year)
|
||||
list_of_points = Mapping_engine.filterListOfPointsByExcludingIfColumnBeforeSomeYear(mapping.filters.filter_points_older_than_year, mapping.filters.filter_points_by_year_property, list_of_points)
|
||||
}
|
||||
|
@ -410,7 +412,7 @@ function convertDataFromSource(sourceFilePath: string, mapping: MappingConfigTyp
|
|||
console.log('converted features:', converted_geo_json.features.length)
|
||||
console.log('différences nombre de features: ', data_transformed.features.length - converted_geo_json.features.length)
|
||||
|
||||
const percentChange = (converted_geo_json.features.length / data_transformed.features.length) * 100;
|
||||
const percentChange = 100 - ((converted_geo_json.features.length / data_transformed.features.length) * 100);
|
||||
|
||||
console.log('Changement de features', percentChange, '%')
|
||||
|
||||
|
|
20
makefile
20
makefile
|
@ -1,6 +1,21 @@
|
|||
default: irve
|
||||
get_files:
|
||||
bash ./update_scripts/get_datasets.sh
|
||||
##################
|
||||
# moving datasets to the source folder etalab_data
|
||||
##################
|
||||
echo " - déplacement des datasets des IRVE dans le dossier etalab_data/irve_bornes_recharge"
|
||||
mv latest.json etalab_data/irve_bornes_recharge/
|
||||
mv latest.csv etalab_data/irve_bornes_recharge/
|
||||
|
||||
mv irve_osm_latest.geojson etalab_data/irve_bornes_recharge/
|
||||
mv clean_french_irve.csv etalab_data/irve_bornes_recharge/
|
||||
mv osmose-item-irve-8411-intégrables.json etalab_data/irve_bornes_recharge/
|
||||
|
||||
mv "issy_les_mx_arbres.json" etalab_data/arbres/
|
||||
mv "issy_les_mx_cyclabilité.json" etalab_data/cyclabilité/
|
||||
mv "rouen_parking_velos.json" etalab_data/cyclabilité/rouen_parking_velos.json
|
||||
|
||||
echo "fichiers récupérés"
|
||||
irve:
|
||||
bash ./update_scripts/convert_irve.sh
|
||||
|
@ -14,3 +29,8 @@ osmose_irve:
|
|||
ts-node convert_to_osm_tags.ts --osmose=true --engine=true --source="etalab_data/irve_bornes_recharge/osmose-item-irve-8411-intégrables.json" --outname="_irve-latest-osmose"
|
||||
#geojson2osm "etalab_data/irve_bornes_recharge/osmose-item-irve-8411-intégrables.json" > "osm_output/osmose-item-irve-8411-intégrables.osm"
|
||||
geojson2osm "output/my_converted_data_set__irve-latest-osmose.json" > "osm_output/my_converted_data_set__irve-latest-osmose.osm"
|
||||
|
||||
panneaux:
|
||||
npx ts-node unzip_csv.ts -u https://www.data.gouv.fr/fr/datasets/r/16a20f4e-0c06-40ff-adda-54f214099e5f -o panneaux_limite_de_vitesse_fr_panoramax_detections.csv -z
|
||||
npx ts-node csv_to_geojson.ts -d etalab_data/panneaux -f panneaux_limite_de_vitesse_fr_panoramax_detections.csv --latColumn 'GPSLatitude' --lonColumn 'GPSLongitude' -h
|
||||
ts-node convert_to_osm_tags.ts --source etalab_data/panneaux/panneaux_limite_de_vitesse_fr_panoramax_detections.csv.geojson --output-file=panneaux_maxspeed_panoramax.json --engine-config=MappingPanneauxMaxSpeed
|
Loading…
Add table
Add a link
Reference in a new issue