1.0.20230619 • Published 11 months ago

@ideditor/nsi-collector v1.0.20230619

Weekly downloads
-
License
ISC
Repository
github
Last release
11 months ago

npm version

nsi-collector

Scripts to collect names for the name-suggestion-index project.

Collecting names from the OSM planet

This takes a long time (~1-2h) and a lot of disk space (~75GB). It can be done occasionally by project maintainers.

Get the planet file

  • Download the planet
    • Mirrors are likely faster than the main repo
    • curl -L -o planet-latest.osm.pbf https://planet.openstreetmap.org/pbf/planet-latest.osm.pbf

Filter and collect names

2 choices:

Use docker and run.py

  • Make sure your dockermachine has at least 2GB of RAM
  • Place the pbf of the planet osm file you wish to process in the same directory as input-planet.osm.pbf
  • Remove the node_modules directory if it exists from a former run (the script will remind you)
  • Run ./run.py
  • This will also run md5 of the input planet file and write it to last_run.md5 on success.
  • That way you can see if it's even worth a bunch of resources to run this script
  • Md5 hashes of pbf files are available: https://planet.openstreetmap.org/pbf/

Manually

  • Install osmium command-line tool (may only be available on some environments)
    • apt-get install osmium-tool or brew install osmium-tool or similar
  • Prefilter the planet file to only include named items with keys we are looking for:
    • osmium tags-filter planet-latest.osm.pbf -R name,brand,operator,network --overwrite -o filtered.osm.pbf
  • Run the collection script
    • This is complicated because node-osmium is available prebuilt only for older environments. It seems to work ok on Node 10.
    • node collect_osm.js /path/to/filtered.osm.pbf

Check in the collected names

  • git add . && git commit -m 'Collected common names from latest planet'

License

This project is available under the ISC License. See the LICENSE.md file for more details.

1.0.20230528

12 months ago

1.0.20230522

12 months ago

1.0.20230513

1 year ago

1.0.20230510

1 year ago

1.0.20230619

11 months ago

1.0.20230409

1 year ago

1.0.20230317

1 year ago

1.0.20230424

1 year ago

1.0.20230304

1 year ago

1.0.20230428

1 year ago

1.0.20230429

1 year ago

1.0.20230225

1 year ago

1.0.20230205

1 year ago

1.0.20230129

1 year ago

1.0.20230217

1 year ago

1.0.20221229

1 year ago

1.0.20221112

2 years ago

1.0.20221119

2 years ago

1.0.20230116

1 year ago

1.0.20221204

1 year ago

1.0.20221127

1 year ago

1.0.20230115

1 year ago

1.0.20230108

1 year ago

1.0.20221219

1 year ago

1.0.20221217

1 year ago

1.0.20221106

2 years ago

1.0.20221001

2 years ago

1.0.20221008

2 years ago

1.0.20221016

2 years ago

1.0.20221025

2 years ago

1.0.20220910

2 years ago

1.0.20220924

2 years ago

1.0.20220903

2 years ago

1.0.20220823

2 years ago

1.0.20220829

2 years ago

1.0.20220619

2 years ago

1.0.20220716

2 years ago

1.0.20220614

2 years ago

1.0.20220813

2 years ago

1.0.20220612

2 years ago

1.0.20220704

2 years ago

1.0.20220801

2 years ago

1.0.20220625

2 years ago

1.0.20220709

2 years ago

1.0.20220522

2 years ago

1.0.20220508

2 years ago

1.0.20220528

2 years ago

1.0.20220416

2 years ago

1.0.20220423

2 years ago

1.0.20220409

2 years ago

1.0.20220403

2 years ago

1.0.20220430

2 years ago

1.0.20220306

2 years ago

1.0.20220313

2 years ago

1.0.20220219

2 years ago

1.0.20220109

2 years ago

1.0.20220205

2 years ago

1.0.20220129

2 years ago

1.0.20211226

2 years ago

1.0.20220115

2 years ago

1.0.20220213

2 years ago

1.0.20220122

2 years ago

1.0.20220101

2 years ago

1.0.20211120

2 years ago

1.0.20211204

2 years ago

1.0.20211127

2 years ago

1.0.20211106

3 years ago

1.0.20211211

2 years ago

1.0.20211113

3 years ago

1.0.20211218

2 years ago

1.0.20211024

3 years ago

1.0.20211016

3 years ago

1.0.20211003

3 years ago

1.0.20210919

3 years ago