-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Lines 3 to 10 in 0594a60
| // This script will process a planet file and collect frequently occuring tags that we care about. | |
| // It produces files containing all the top names and tags: `dist/collected/names_all.json` | |
| // | |
| // `names_all.json` contains a dictionary object in the format: | |
| // "key/value|name": count | |
| // "amenity/cafe|Starbucks": 159 | |
| // | |
| // Please see README.md for more info |
root@LAOSHU-LAPTOP:/mnt/e/Data/OSM/nsi-collector# node collect_osm.js ../filtered.osm.pbf
🏗 Collecting names from OSM planet...
collecting names from amenity=*
filtering amenity
collecting names from club=*
filtering club
collecting names from craft=*
filtering craft
collecting names from healthcare=*
filtering healthcare
collecting names from leisure=*
filtering leisure
collecting names from office=*
filtering office
collecting names from shop=*
filtering shop
collecting names from tourism=*
filtering tourism
fs.js:114
throw err;
^
Error: ENOENT: no such file or directory, open 'dist/osm/names_all.json'
at Object.openSync (fs.js:443:3)
at Object.writeFileSync (fs.js:1194:35)
at collect (/mnt/e/Data/OSM/nsi-collector/collect_osm.js:91:6)
at Object.<anonymous> (/mnt/e/Data/OSM/nsi-collector/collect_osm.js:33:1)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
(This is the first time I run it, because I saw that tas50 has not uploaded collected data for several weeks(sorry. just found commits uploaded 1 hours ago: 0ef28f5), so I want to try it myself, so I meet with those kind of error.)
Because I am worried that the files in dist will affect the result, in order to "clean run" during operation, I deleted the /dist folder
If can't find {what}_all.json, is it okay to create one at this situation?
In other words, if the existing file must be used, why not prompt at the beginning of the operation but report an error after the time consuming collection is completed?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels