export bdd osm small city and paris 13e

This commit is contained in:
Tykayn 2022-08-03 12:18:19 +02:00 committed by tykayn
parent 743a34a3b4
commit d31d2632fd
7 changed files with 266159 additions and 41645 deletions

View File

@ -7,6 +7,12 @@ file:///home/tykayn/Nextcloud/boulot/osm/bdd_vitesses/overpass_results
## Requête source Overpass turbo
https://overpass-turbo.eu/s/1kGY
fetch http pour la zone géographique 75013
``` bash
wget https://overpass-api.de/api/interpreter?data=%2F*%0AThis+has+been+generated+by+the+overpass-turbo+wizard.%0AThe+original+search+was%3A%0A%E2%80%9Chighway+in+%22my-zone%C3%A9%22%E2%80%9D%0A*%2F%0A%5Bout%3Ajson%5D%5Btimeout%3A25%5D%3B%0A%2F%2F+fetch+area+%E2%80%9Cmy-zone%C3%A9%E2%80%9D+to+search+in%0Aarea(id%3A3610777016)-%3E.searchArea%3B%0A%2F%2F+gather+results%0A(%0A++%2F%2F+query+part+for%3A+%E2%80%9Chighway%E2%80%9D%0A++way%5B%22highway%22%5D(area.searchArea)%3B%0A)%3B%0A%2F%2F+print+results%0Aout+body%3B%0A%3E%3B%0Aout+skel+qt%3B
```
## CSV output
national_ref;way_id;osm_link;name;highway_tag;speed_limit;

View File

@ -1,13 +1,15 @@
/**
* converter of overpass results to CSV
*/
const zone_name="paris-13e-arr";
const code_postal = "75013";
const exportFileName = "bdd-vitesses-fr-osm_ways_zone-saint-mande_date-made-2022-08-03_full.csv"
const exportFileName = `bdd-vitesses-fr-osm_ways_zone-${zone_name}_date-made-2022-08-03_full.csv`
let header_csv = ["national_ref", "way_id", "osm_link", "name", "highway_tag","speed_limit"]
let lines_csv = []
const sourceFilePath = "./overpass_results/export_saint_mande.json"
const sourceFilePath = `./overpass_results/${code_postal}.json`
const overpassDataJson = require(sourceFilePath)
const reference_prefix = "V94160_";
const reference_prefix = `V${code_postal}_`;
let counter_no_speedlimit = 0;
let counter_highways = overpassDataJson['elements'].length;
@ -83,9 +85,9 @@ function writeCSVOutput() {
if (err) {
return console.log(err);
}
console.log("counter_no_speedlimit", counter_no_speedlimit)
console.log("highways without speedlimit", counter_no_speedlimit)
console.log("on", counter_highways)
console.log("missing data : ", Math.floor( counter_no_speedlimit * 100 /counter_highways ) + "%" )
console.log("missing speedlimit data : ", Math.floor( counter_no_speedlimit * 100 /counter_highways ) + "%" )
console.log(" ")
console.log('wrote output file', exportFileName);
});

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff