zeke / all-the-cities

🌆 All the 138,398 cities of the world with a population of at least 1000 inhabitants, in a big JSON array.
http://npm.im/all-the-cities
MIT License
281 stars 42 forks source link

Is there a way to create a cities 500 #19

Closed multiaki closed 4 years ago

multiaki commented 4 years ago

I am trying to figure out how to get cities 500 in a pbf format.

Could you point me to the right direction, please,

Thanks

zeke commented 4 years ago

Hi there 👋

I'm not sure I understand your exact goal. Are you trying to prepare a list of all "cities" that have a population of 500 or more? If so, I think you'd need to start with the geonames.org data at http://download.geonames.org/export/dump/

@nabilashraf was working on this recently and may be able to help get you started working with that data.

multiaki commented 4 years ago

Yes. The projecct uses pbf format. I could get txt file from geonames, but can't convert to pbf format.

zeke commented 4 years ago

Ahh I see. I believe it was @mourner who converted the project to use the protobuf format. Maybe they can share some guidance. Otherwise you might want to view the old pull requests on this repo to see how the pbf migration was done.

zeke commented 4 years ago

Here's the PR that did the conversion: https://github.com/zeke/all-the-cities/pull/3 -- not sure if that's very helpful though.

multiaki commented 4 years ago

@zeke Thanks, I forked the repo and updated the code. Here is the link: https://github.com/multiaki/all-the-cities

nabilashraf commented 4 years ago

@multiaki Hi, sorry couldn't reach back sooner! Ramadan here :) You can fork this repo and replace the 1000.txt file with 500.txt file and you will have it ready to be used.