skip to Main Content

Geodata file format description

Data for countries, provinces and cities are stored in text files located in WorldMapPoliticalMapGlobeEdition/Resources/Geodata folder.

  • countries10.txt: data for country frontiers in high resolution

  • countries110.txt: data for country frontiers in low resolution

  • provinces10.txt: data for province borders (always in high resolution)

  • cities10.txt: data for cities.

All data is packed in string fields using separators. JSON, although more human-friendly format, is not used to reduce the file size and optimize the loading time (especially for mobile devices).

Country file format

  1. Contains a list of countries separated by |.

Example: COUNTRY0|COUNTRY1|COUNTRY2…)

  1. Each COUNTRY entry is a series of fields separated by $:

COUNTRY = {NAME $ CONTINENT $ REGIONS $ HIDDEN $ FIPS 10.4 CODE $ ISO A2 $ ISO A3 $ ISO N3 $ LABEL VISIBILITY}

Name = name of the country (as displayed on the map)

Continent = continent name (useful to group countries)

Hidden = 0 (visible) or 1 (invisible)

FIPS / ISO codes = standard id codes for country

Label visibility = 1 (visible) or 0 (invisible)

  1. REGIONS is a list of polygons, separated by *:

REGIONS = REGION0*REGION1*REGION2…

  1. Each REGION is a list of latitude/longitude coordinates in the format:

REGION = lat0 , lon0 ; lat1 , lon1 ; lat2, lon 2 ; …

  1. The stored values of latitude and longitude are multiplied by 5.000.000 and rounded.

The method SetCountryGeoData() method in WPMCountries.cs is responsible of loading and extracting the file data.

Province file format

  1. Contains a list of provinces separated by |.

Example: PROVINCE0|PROVINCE1|PROVINCE2…)

  1. Each PROVINCE entry is a series of fields separated by $:

PROVINCE = {NAME $ COUNTRY_NAME $ REGIONS }

Name = name of the country (as displayed on the map)

Country_Name = the name of the country to which the province belongs to

  1. REGIONS is a list of polygons, separated by *:

REGIONS = REGION0*REGION1*REGION2…

  1. Each REGION is a list of latitude/longitude coordinates in the format:

REGION = lat0 , lon0 ; lat1 , lon1 ; lat2, lon 2 ; …

  1. The stored values of latitude and longitude are multiplied by 5.000.000 and rounded.

The method SetProvincesGeoData() and ReadProvincePackedString() methods in WPMProvinces.cs are responsible of loading and extracting the file data.

City file format

  1. Contains a list of cities separated by |.

Example: CITY0|CITY1|CITY2…)

  1. Each CITY entry is a series of fields separated by $:

CITY = {NAME $ PROVINCE_NAME $ COUNTRY_NAME $ POPULATION $ X $ Y $ Z $ CLASS }

Name = name of the city

Province_Name = the name of the province

Country_Name = the name of the country to which the province belongs to

X, Y, Z = sphere coordinate of the city

Population = metropolitan population

Class = 1 (regular city), 2 (region capital) or 4 (country capital)

The method SetCityGeoData() method in WPMCities.cs is responsible of loading and extracting the file data.

Back To Top