The International Simutrans Forum

PakSets and Customization => General Resources and Tools => Maps and Citylists => Topic started by: ZéQuimTó on August 29, 2014, 02:16:08 AM

Title: Tutorial - Easy city-lists
Post by: ZéQuimTó on August 29, 2014, 02:16:08 AM
Here is a short tutorial on how to create easy city-lists.

1 - Go to wikipedia, and search for the list you need. One link that has a lot of countries is this one (http://en.wikipedia.org/wiki/Category:Lists_of_municipalities)

As an example, we'll use Switzerland (http://en.wikipedia.org/wiki/List_of_municipalities_of_Switzerland)

As you see, we know have to strip those regions out of the list, to get only the city names.
We have two ways of doing that. If you are not using linux, proceed. Otherwise, jump to Linux section.

(Windows)
2 - Copy-paste the table into excel/libreoffice calc

3 - Copy-paste the first column (we don't want the regions) into notepad, and save the file.


(Linux)

2 - Copy-paste the table into a text file (lets say, switzerland.txt)

3 - Run

sed -r 's/  .*//' switzerland.txt > citylist_ch.txt


Hope this helps!  ;D