The city database is comprised of a total of three files. You can create your own city database by following the format required by STK. For example, the stkCityDb database (the database shipped with STK) includes the following files:
File | Contents |
---|---|
stkCityDb.cd | Main database file |
stkCityDb.cc | Countries and City Types |
stkCityDb.gd | Latest update information |
The first file contains fixed-width fields, where one row represents a single entry. The remaining are in the standard STK database file format.
stkCityDb.cd File
This is the main city database file; it contains all searchable fields. The format, starting at column zero (0) is as follows:
Column | Width | Description |
---|---|---|
0-6 | 7 | City Key. Unique integer identifier |
7-36 | 30 | City Name |
37-38 | 2 | City Type: |
39-58 | 20 | Country |
59-98 | 40 | Province/State |
99-101 | 3 | Province rank |
102-112 | 11 | Population |
113-115 | 3 | Population Rank |
116-132 | 17 | Latitude (deg) |
133-149 | 17 | Longitude (deg) |
151-162 | 12 | Central Body |
stkCityDb.cc File
This is the country and city type file. It contains a list of all the valid countries and city types. This file is used to build the list of country and city types available in the user interface. If this file isn't available, STK is unable to search for countries or city types. The file is in a basic STK data file format.
Begin Country
Albania
Antigua and Barbuda
Argentina
Armenia
Aruba
Australia
Austria
Croatia
Cuba
Czech Republic
.
.
.
Mauritania
United States
Uruguay
Uzbekistan
Vanuatu
Venezuela
Virgin Islands
Western Samoa
End Country
Begin Type
Populated Place
Administration Center
National Capital
Territorial Capital
End Type
stkCityDb.gd File
This is the generic database file. It contains information concerning the last update of the database. This file is used by the online update option to determine which records to supply. The file is in a basic STK data file format.
BEGIN DatabaseUpdate
Version 1.0
LastUpdate 19970405
END DatabaseUpdate