Skip to content

Data and packages

miracle091 edited this page Nov 30, 2026 · 4 revisions

Data and packages

English · Italiano

This page explains where the data of Pocket Travel comes from and why it reaches the device in separate packages. The pipeline commands are in the README of tools/data-pipeline.

Where the data comes from

Data Source License
Guides Wikivoyage in Italian and, for the app in English, in English CC BY-SA 4.0
Maps OpenStreetMap, Natural Earth and the ESA WorldCover land cover (z0-7, not drawn), in the daily Protomaps build ODbL; Natural Earth public domain; ESA WorldCover CC BY 4.0
Points of interest (with opening hours, addresses, contacts and translated names) OpenStreetMap ODbL
House numbers OpenStreetMap and the official address registries of dozens of countries, collected by Overture Maps (a foundation that publishes open geographic data merged from several sources) ODbL for OpenStreetMap; for the others, the license of each registry (mostly CC BY 4.0, Licence Ouverte or public domain), listed in the Licenses screen
Road network BRouter segments (from OpenStreetMap) ODbL
Public transport timetables GTFS networks of the agencies (GTFS is the standard format of public transport timetables): copy of the Mobility Database, websites and open data portals of the agencies, opentransportdata.swiss, Bus Open Data Service that of each network, listed in the Licenses screen: CC0, CC BY, CC BY-SA, ODbL, Licence Ouverte, OGL, MIT, the Croatian Otvorena dozvola, the terms of the Spanish NAP (the national transport data portal), of CRTM, of opentransportdata.swiss and of data.gov.gr, some agencies' own terms, such as BART and MBTA
Embassies and consulates (in addition to those among the points of interest) Wikidata CC0
City history and climate Wikipedia (Italian or English, like the guide) CC BY-SA 4.0
Cuisine, traditions, media and telecommunications in the guides Wikipedia, the region's article (Italian or English, like the guide) CC BY-SA 4.0
Population, capital and coordinates of the cities Wikivoyage and Wikidata CC BY-SA 4.0 and CC0
Quick facts: capital, dialing code, driving side and the fields the Wikivoyage page lacks Wikidata CC0
Popularity and heritage status of the points of interest (protected property, UNESCO World Heritage; Pocket Travel is not affiliated with UNESCO) Wikidata; UNESCO heritage also from the OpenStreetMap tag ref:whc CC0, ODbL
Vaccinations for your trip Travel.gc.ca and TravelHealthPro, reworded; for the polio entry requirement of Egypt, India, Nepal and Iran, France Diplomatie and GOV.UK Open Government Licence - Canada 2.0 and v3.0, Licence Ouverte 2.0
Travel advice in the English guides Travel.gc.ca; gov.uk Foreign travel advice (FCDO) for Palestine, Pitcairn and Wallis and Futuna and, for all countries, for entry and consular assistance for British citizens Open Government Licence - Canada 2.0 and v3.0
Indicative exchange rates in the quick facts Frankfurter (average of the central banks' rates; the Cuban peso from the Central Bank of Cuba), signed file published every day free to use
Weather Open-Meteo, downloaded by the app while reading the guide CC BY 4.0
Active alerts GDACS, U.S. Geological Survey, Meteoalarm (Europe), National Weather Service and NOAA tsunami centers, Environment and Climate Change Canada, GeoNet (New Zealand), Japan Meteorological Agency, downloaded by the app GDACS terms of use, public domain (USGS, NOAA), Meteoalarm terms (equivalent to CC BY 4.0), ECCC Data Servers End-use Licence, CC BY 3.0 NZ, JMA terms of use (compatible with CC BY 4.0)
Emergency numbers fixed table built from government sources (Canada, United Kingdom) and compared with Wikipedia, Wikidata and Wikivoyage various (Open Government Licence, CC BY-SA, CC0)

The data starts from open sources, goes through the pipeline in the GitHub workflows and reaches the app as signed static files: packages in the releases, the catalog on GitHub Pages.

flowchart LR
    accTitle: Data path
    accDescr: OpenStreetMap, Wikivoyage, Wikidata, Overture and the GTFS feeds enter the publish-regions pipeline, which publishes the packages in the GitHub releases and the signed catalog on GitHub Pages; the app downloads the catalog, verifies its signature and then downloads the packages.
    osm["OpenStreetMap"] --> pipe["Pipeline<br/>publish-regions"]
    wv["Wikivoyage"] --> pipe
    wd["Wikidata"] --> pipe
    ov["Overture Maps"] --> pipe
    gtfs["GTFS feeds"] --> pipe
    pipe --> rel["GitHub releases<br/>region packages"]
    pipe --> pages["GitHub Pages<br/>signed catalog"]
    pages --> app["App: verifies the signature"]
    rel --> app
Loading

Static files, no server

Everything is published as static files on GitHub. The catalog (manifest.json, transit.json and address-grid.json) is on GitHub Pages. The packages are attachments of the repository's releases. There is nothing to keep running, and no user data passes through the project. The catalog and the other JSON indexes are signed, and the app rejects those without a valid signature (see Privacy and security).

The 1,000-file limit per release

A GitHub release holds at most 1,000 files. For this reason the region packages are distributed over 32 releases (region-data-r00 … region-data-r31). Each region always stays on the same release, chosen from its identifier. This gives about 140 files per release: there is room for twice as many regions without splitting anything by hand. The car-only road network is on 32 other parallel releases (region-data-car-r00 … region-data-car-r31).

The per-continent releases, used previously, empty out as the regions are regenerated, and are removed when they are empty. Old files are removed only when neither the new catalog nor the previous one uses them: this way, anyone downloading during the update is not left halfway.

Contents of a region

Country list

In the Countries screen the downloaded countries have the same names and the same groups as the continents. The regions of a divided country (France, United States, Equatorial Guinea) are under the name of the country, even when the section has only one. Each group counts the regions of its section; the counter of downloaded countries counts countries. Among the downloaded ones the regions are open by default, and the countries to update come first.

Downloaded countries and the others divided by continent, with search at the top and the button for the country map

Content downloaded separately

Each region has content that is downloaded and updated on its own, each item separately, from the Content for sheet:

Content for Monaco: Map and Light map, Road network with the choice between Car, Bike & walk and All, Points of interest, Extra points of interest, House numbers and Public transport with the CAM bus network, each with its size and the button to download or delete it
  • map: extracted on the device from the Protomaps build, only for the bounding box of the region;
  • points of interest and extra points of interest (drinking fountains, picnic tables… optional), in a compact format: categories as codes, coordinates as integers;
  • city guides: the pages of the cities of the region, from the weekly Wikivoyage dump;
  • house numbers: assembled on the device from cells shared between regions (see House number cells);
  • road network: BRouter segments clipped to the region, to calculate routes;
  • overview map: a low-resolution map (at most 10 MB) that always comes with the region;
  • public transport: the timetables of the networks of the region, one per package.

The content is separate because all of Italy takes gigabytes, while someone who needs only the guide and the restaurants needs just a few megabytes.

Road network

The BRouter segments (the engine that calculates routes offline) are clipped to the region: Luxembourg goes from 415 to 6 MB.

The pipeline checks that each segment from brouter.de has the same major lookups version as the app's lookups.dat (today 11). The lookups are the table that translates the OpenStreetMap tags into the segment codes. With a different version BRouter would not read the segment: the region is not republished and the previous package stays. With only a higher minor version there is a warning.

The road network is not in the normal download ("Download"). It is added from the Content of the region, from the Navigator or, with "Navigation routes" on, with every region.

Variants by mode

In Content you choose which travel modes need the road network:

  • Car downloads only the roads for cars. It weighs about 60% of the full network: from 24% to 89% across the 90 regions of the Oct 4, 2026 catalog, with a median of 57%. Northeast Italy goes from 199 to 86 MB.
  • Bike & walk and All download the full package, which works for every mode. A variant without cars would save only 0.7%.

The two variants have the same file names and the same version. Their preparation on the device is separate: a canceled download does not make the hash check of the other variant's download fail. The installed variant is recorded from what was downloaded, not from the current choice. Changing the choice with the road network installed downloads it again.

Without a choice in the Content, the variant follows the travel modes (RoutingVariantChoices):

  • car or camper only: the car variant;
  • only modes without an engine: the full package, with "Bike & walk";
  • mixed choices: "All".

A choice in the Content always wins. From the Navigator, on foot or by bike, "Download" always takes the full package.

Public transport

Each public transport network is a separate content item, with 90 days of timetables in transit.db. Included and excluded networks, choice of networks, real time and content version are in Public transport.

Download at first launch

At first launch, several regions can already be downloaded. At the top are those of your own country and of the neighboring countries, that is, those whose bounding box touches that of the country: there is no table of borders. A search follows and, for each chosen region, the packages to download, with the total in MB.

The proposed packages follow the travel modes:

  • the public transport timetables with a mode without a car (walking, cycling, hiking or public transport);
  • the road network with "Navigation routes".

With "Download and continue" the downloads start in the background, and the first launch goes on without waiting for them.

In the country list, a region downloading or queued already counts among the downloaded ones. The downloads have the tag region-download and one with their own regionId, read by RegionSyncScheduler.observeDownloadingRegions. Without a catalog (offline, or not yet read) the list shows the installed countries with the name translated into the language of the app. At first launch the country names follow the language chosen at the first step, not that of the device.

The flags are vector images shown in a circle. Width and height follow the proportion of the drawing. With another proportion the circle would crush some flags at the sides, such as those of the Cook Islands and Montserrat (3:2 on a 2:1 drawing).

Only a zone of large countries

For a region with a bounding box of over 200,000 km² (Italy, Spain, France...) "Download" asks whether to download the whole country or a zone. The zone is the visible area of a full-screen map with cities and main roads. The map moves and zooms with double tap and pinch; below it is the measurement ("About 1005 × 1315 km").

For the zone, the map, the road network (only the .rd5 tiles that touch it) and the house numbers (only its cells) are downloaded. Points of interest and guides stay those of the whole country. The zone (RegionZonePreferences, RegionManifestEntry.restrictedTo) applies to every download of the region, updates included. In the list it also applies to the sizes and to the house numbers version.

The zone can also include other countries of the catalog, for example San Marino. Their share is estimated on a grid of points, where the sea does not count. The app lists these countries and offers "Only " or "Download all". "Download all" does not reduce to the zone the neighboring countries already downloaded in full.

In the Content, the "Zone" row changes the zone: map and road network are redone immediately, reusing what is already there.

Download phases

After the download of the files and the extraction of the map, the notification and the row of the country show "Installing…" without a percentage, while points of interest and guides are imported. This way they do not stay stuck at 100%.

If the app is closed partway through, no incomplete packages are left:

  • if the system closes the app during the extraction of the map, the temporary extraction file (.tiles.tmp, tens of MB) is deleted at the next attempt;
  • if the app closes between the deletion of the files of a package and its removal from the database, at startup RegionStartupRecovery forgets the packages registered without files on disk. This way no "Installed · 0 B" remain, and the Navigator offers to download the road network;
  • without addresses.pmtiles, all the house number cells are downloaded, instead of being treated as already installed.

Files of 32 MB and up are downloaded over 4 connections, in 16 MB segments, resuming from the finished segments, like the assistant's models (see Model downloads). A server that does not answer range requests is used over a single connection.

Android can restrict the app's network with Data Saver or with the phone's firewall. In that case the reason and the button for the settings appear:

  • under the row of the country, in the list and in Updates;
  • in the Navigator, when it downloads the road network, even if what fails is reading the catalog;
  • in Updates, for the APK of the app;
  • in the country list, in place of "Catalog unreachable", when the catalog cannot be read.

Data Saver counts only if the active network is metered. With the app in the foreground it never blocks: reading the catalog (country list, "Download the map", the Navigator's road network) gives its message only for the suspicion of a block on the app's network. After a network block the files already downloaded stay in the staging folder and serve the next attempt. If the installed country is no longer in the catalog, "Download the map" says "The catalog no longer offers this country's map", instead of "Couldn't reach the country catalog".

Islands and autonomous cities

The Canary Islands are a region of their own (Spain reaches as far as the Strait of Gibraltar), with the Fred. Olsen ferry timetables between the islands. Ceuta and Melilla, the Spanish autonomous cities in Africa, are two regions of the "Ceuta and Melilla" group. They have the Spanish flag and the points of interest clipped at the border of Spain.

Archipelagos far from their country are regions of their own in the country's group:

  • San Andrés and Providencia for Colombia;
  • Azores and Madeira (with the Savage Islands) for Portugal;
  • Galápagos for Ecuador;
  • Easter Island and Juan Fernández for Chile;
  • Bioko and Annobón for Equatorial Guinea;
  • Lord Howe for Australia.

A country bounding box stretched over the ocean to the islands would be mostly sea. The main region has only the name of the country ("Portugal" next to "Azores"). The exception is Equatorial Guinea, where it is called "Río Muni" because the capital Malabo is on Bioko. Rodrigues is in the Mauritius region. Agaléga is left out: in OpenStreetMap it has no points of interest.

Guides: one package for the whole world

The guides are a single package for the whole world. They weigh little: about 2.6 MB compressed in Italian and 4.5 MB in English. This way the guide of any country can be read, including the "See" and "Do" sections of the country.

The same guides.db (and guides-en.db) also contains:

  • the table of the embassies and consulates of the whole world (see Embassies & consulates from Wikidata);
  • the sections of the Wikivoyage topic pages on health, jet lag, documents, scams, phone abroad and similar: ten pages in Italian, eleven in English, which add tipping.

The topic sections have regionId _general, and the assistant uses them for general questions (see General guide). They weigh about 5% of the compressed file. A page that is not downloaded keeps the sections already published.

If two guide updates start together, the second does not download or import the guides again. An interrupted download in one language does not spoil the one in the other.

Embassies & consulates from Wikidata

OpenStreetMap has many diplomatic missions, but often without type, website or email, and in many countries they are missing. For this reason the guides also carry the diplomatic_missions table: about 10,000 embassies, consulates general and consulates from Wikidata (CC0).

Each row has sending country and host country (ISO codes), type, name in Italian and English (or, if missing, in another language), city, address, phone, website, email and, when available, the coordinates.

In the pipeline

wikidata_missions.py queries the Wikidata SPARQL endpoint (SPARQL is the query language of its data). It uses one query per type and one per property: a single query with all the OPTIONAL clauses times out. The script discards closed missions (end date in the past) and those without the ISO code of the country. It has a cap of 15 minutes in total. It rejects a result under 6,000 rows, which would almost certainly be an error.

The values are checked before being written: rows with wrong columns or empty required fields are skipped, out-of-range coordinates are removed. The file is written atomically. If Wikidata does not answer, the table is copied again from the guides.db already published. Without even that, the guides are released without the table, with a warning: they never fail because of this.

On the device

How the Guide merges and sorts the missions is in Embassies & consulates.

Vaccinations for your trip

Vaccinations are calculated on the device with the vacc_* tables of the guides package; screen and rules are in Vaccinations.

Data

The data is TSV files curated by hand in the repository: yellow fever on entry, on exit and by risk, polio, special requirements such as Hajj and Umrah, recommended vaccines by country. They contain all the rows, not only those of the published regions, because departure and stopovers can be countries without a region.

The sources are Travel.gc.ca (Open Government Licence - Canada 2.0) and TravelHealthPro (Open Government Licence v3.0), reworded. vaccinations_draft.py produces only drafts to review by hand. The doubtful countries were reread one by one against the two sources (Oct 4, 2026, 25 countries).

Polio on entry without a list

Egypt, India, Nepal and Iran can require vaccination from those arriving from countries where polio circulates. No open, current source says from which countries (about twenty sources searched on Oct 8, 2026).

For these four countries polio-entry.tsv has one row with origin UNLISTED. The sources are France Diplomatie for Egypt and GOV.UK for the others. The row becomes a "worth considering" entry for any departure, with the link to the foreign affairs site of the chosen nationality (or to GOV.UK, with the note that the requirements are for British citizens). Earlier apps read UNLISTED as a nonexistent country, and ignore the row.

Weekly source check

The vaccinations-check job of publish-regions.yml runs on Mondays and in manual runs. It compares with a snapshot in the repository:

  • Travel.gc.ca: yellow fever, polio (including the polio section of the entry page) and vaccines by country;
  • the Saudi PDF for Hajj and Umrah.

It also checks that the WHO has not published a polio statement more recent than the one recorded. If something has changed, it leaves a warning and the report in the run summary. It does not touch the TSVs and does not block publication, because the data is updated by hand.

Weather, alerts and city data

Weather

The data comes from Open-Meteo (CC BY 4.0, no key or account), requested by the app without going through the project; card and cache are in Weather.

Active alerts

The alerts of the card come from these sources, read by the app; card, choice and notifications are in Active alerts.

Worldwide sources

  • Disasters from GDACS (Global Disaster Alert and Coordination System): orange and red of every type; green only for cyclones, floods, volcanoes and droughts, because there are hundreds of green wildfire alerts a week.
  • Earthquakes from the U.S. Geological Survey: the daily feed from magnitude 2.5 and the weekly feed of significant earthquakes.
  • For all regions, the latest CAP messages (Common Alerting Protocol, the standard format of alerts) of the two NOAA tsunami centers: warnings, watches, advisories and threats, never informational messages.

Meteoalarm in Europe

In Europe the weather alerts come from Meteoalarm, with one request per country. The regions that are part of a country keep only their own alert areas (MeteoalarmZones.kt). EMMA_ID is the Meteoalarm code for alert areas.

  • Azores and Madeira are recognized by the name of the area.
  • The Canary Islands (EMMA_ID from ES120 to ES132 on land, from ES879 to ES889 on the coast), Ceuta (ES250, ES871) and Melilla (ES251, ES872) have a code of their own (ic, ea), but read the feed of Spain.
  • Svalbard and Jan Mayen (code sj, feed of Norway) are recognized by the polygon of the alert, because the Norwegian feed has no area codes: alerts north of 74°N or west of Greenwich apply.
  • Each region of France recognizes its departments from the 2010 NUTS3 code (the European statistical classification of provinces), which the French feed gives in place of EMMA_ID.

The Portugal, Spain and Norway regions do not receive the areas of the islands, of Ceuta and of Melilla. In the large regions an alert with an unknown code stays.

National services

In the regions these national services cover, their alerts are added:

  • National Weather Service, for the US state (area= with the state code, User-Agent with the project's contact). Sea-only alerts, such as Gale Warning and Small Craft Advisory, are left out.
  • Environment and Climate Change Canada, for the bounding box of the region (MSC GeoMet, weather-alerts collection). The English text of the source is always under the title.
  • GeoNet, for the volcanoes of New Zealand from alert level 2.
  • Japan Meteorological Agency, for the whole of Japan, with a map.json file of about 150 kB. Warnings, danger warnings and special warnings are included, never advisories. The English names of the zones come from a table copied from area.json.

City history and climate

The sections come from the Wikipedia article of the city (IT or EN, like the guide). The article is found from the Wikidata sitelink of the Wikivoyage page, that is, from the link Wikidata keeps between the articles on the same subject. It is read from the Wikipedia API, in batches, because the full dumps (5 and 24 GB) do not fit in the runners.

The sections are new rows of cities.db, in the categories STORIA and CLIMA, with the article as source. Only the beginning of the history is kept, up to the last paragraph within 4,000 characters. Old apps skip the categories they do not know. A network error leaves the city without the two sections, never without a guide. The time is limited to 20 minutes per shard (the part of the regions processed by one job) and per language.

Monthly averages of the cities

The climate table comes from the same wikitext of the article (wikitext is the source text of wiki pages):

  • in Italian {{ClimaAnnuale}}, with the months in separate parameters or in a list;
  • in English {{Weather box}}, with °F and inches converted, or a separate template such as {{Paris weatherbox}}, read with one more request.

The table becomes city_climate in cities.db: high, low, rain in mm and rainy days by city and month, with the article as source. If the article has several tables (one per station), the first applies. Of 25 Italian cities, the table is present in 22 Italian articles and in 23 English ones.

The card of the city guide is in Monthly averages.

Wikipedia sections in the guides

The sections come from the Wikipedia article of the region (IT or EN, like the guide). The article is found in the same way, from the English Wikivoyage page. These sections are taken:

  • in Italian Gastronomia or Cucina, Tradizioni e Festività, Media or Mezzi di comunicazione, Telecomunicazioni or Comunicazioni;
  • in English Cuisine, Traditions, Holidays and Festivals, Media, Telecommunications or Communications.

They are rows of guides.db in the categories the app already has (Food and drink, Culture and etiquette, Daily life, Connectivity). They are at the bottom of the guide, with the article as source, even where Wikivoyage has the category. App versions that show Wikipedia sources show them without an app update.

Sections shorter than 200 characters (usually only the pointer to the separate article) are discarded. Long ones stop at the last paragraph within 4,000 characters. An article that is not read leaves the sections already published. With the October 2026 articles there are about 250 sections from 160 regions in Italian, and 390 from 250 regions in English.

Local terms

Local terms are dishes, drinks, festivals, customs, clothing and instruments that the guide of the region names. Each has the introduction of its Wikipedia article (up to 600 characters), the URL and the revision of the article. They are produced by local_terms.py, in the guide_terms table of guides.db.

Where the terms come from

The first source is the Wikipedia categories of the country that Wikidata links to the country's topics (P971) and to its cuisine. A term counts if the guide names it as a whole word, with the title of the article or one of its redirects (an alternative title leading to the same article). Lists, disambiguation pages, people, places and names that are the title of another article are discarded. The name shown is the one the guide uses.

The second source is the bold or italic texts of the sections on eating, drinking, events, shopping and customs. They are included if they are Wikipedia articles linked to the country on Wikidata (country of origin, or country if they are not a place), and if they are of a food, festival, clothing or instrument type. On the ten test countries it adds 12 terms in Italian and 14 in English.

Discarded entries

Generic entries are discarded by the number of languages in which Wikipedia has the article (sitelinks, in the same request to Wikidata):

  • in the first source, entries with 80 languages or more and no country (Christmas, New Year's Day, Ginger) and lists ("Public holidays in India");
  • in the second source, entries with at least two countries of origin and 80 languages or more (coffee, cider).

On 21 regions in Italian and 23 in English (Nov 19, 2026) this filter removes 17 terms out of 349 in Italian and 43 out of 742 in English. The precision, on 50 terms per language checked by hand, is 94-96% in Italian and 90-94% in English. The filter also loses a few correct entries without a country on Wikidata (Biryani, Shinto, Epiphany and All Saints in Italy).

Also discarded are the cuisines of a country, music and film festivals, and entries that on Wikidata are places, bodies, companies, buildings or television programs. This also applies when the type is more specific, such as a brewery or a pizzeria chain.

Measured precision

  • On the English terms of the regions reread on Nov 20, 2026 the precision is 94% on 300 terms checked by hand. Entries on a dish of several countries (Goulash, Strudel) also count as correct.
  • On ten test countries (November 2026) about 190 terms come out in Italian and 400 in English. The precision is 96-98% on 100 terms per language checked by hand. Morocco has 0.

Regions read in each run

A region that is not read keeps the terms already published. Each run has 20 minutes per language, which is not enough for all the regions. The regions never read come first, then those read least recently. The order is in the guide_terms_read table of guides.db, which the app does not read.

Terms in the Guide

How the Guide shows the terms is in Local terms.

Main cities and coordinates

The card of the cities shows the five most populous, with a star on the capital. Population and capital come from Wikivoyage (the "Abitanti" field) or from Wikidata (P1082 and P36), and end up in cities.db.

The coordinates come from Wikidata (P625), with the same request as the population. They are in the latitude and longitude columns of cities.db, repeated on every section of the city like the population. The assistant needs them for the distance between two cities (see Distance between two cities).

The coordinates arrive as the regions are regenerated. The app also reads the cities.db files without the columns, and there the cities stay without coordinates. A network error leaves the coordinates already in the file.

Two languages

Guides and cities exist in Italian and in English. The English ones come from the English Wikivoyage pages, they are not translated from Italian: they are texts written by native speakers, often much richer. The "Buy" section of Germany, for example, has 734 characters in Italian and 21,000 in English.

Packages by language

  • Guides: a separate package (guidesEn in the catalog), not a "language" column in the same file, because old apps would also import the English rows. The app downloads the one of the chosen language and, when the language changes, immediately downloads the other (a few MB).
  • Cities: one English package per region (citiesEn).

The installed versions carry the language in front ("en-…"). Italian and English guides are released in the same publication with the same version: without the prefix, a language change would not download anything again.

Cities in the right region

On the English Wikivoyage the pages do not say directly which country they are in. The city is recognized from the {{usablecity}}/{{guidecity}} template, and {{isPartOf}} is followed up to the first region of the catalog: Kyoto → Kyoto (prefecture) → … → Japan. Tenerife stops at the Canary Islands and does not also enter Spain.

On the Italian Wikivoyage the city's Quickbar counts: the Region or federated State, if it is a region of the catalog, comes before the State. The whole English dump (130 MB) is read in about 40 seconds.

Quick facts

The fields of the Italian Wikivoyage page come first, because they are richer: regional languages, plugs by name, time zones of the large countries. In the Italian guide they are language, electricity, time zone and currency.

The English pages do not have these fields in the text: they take them from Wikidata when opened. The English guide takes electricity and time zone from the Italian page, only if they are neutral values ("230V/50Hz", "UTC+1"); the "European" and "British" plugs are translated. It also takes the language, translated with the JDK language names.

The rest comes from Wikidata (CC0): capital, dialing code, driving side and the fields the page lacks. The data is in countries.tsv, a curated file with one row per region, which is regenerated by hand with wikidata_countries.py. In US states, in the provinces of Canada and China, in the regions of France and in the Canary Islands, capital and time zone are those of the region.

A correction table in the script covers the known gaps and errors of Wikidata (time zones, currencies, plugs). The emergency numbers stay those of the curated table.

Exchange rate

The rate comes from exchange-rates.json, signed and published every day on the app-status release (see Publishing). How the Guide shows it is in Exchange rate.

Travel advice in the English guides

Sections from travel.gc.ca

build-guides.sh en downloads the travel.gc.ca open data JSON for each country. GenerateTravelAdvice.kt makes four sections of it, each with the link to the page and the update date:

  • safety, with the risk level and the notices for zones to avoid at the top;
  • laws and culture;
  • natural disasters and climate;
  • health.

Entry and exit, consular offices, the vaccines (they are in the Vaccinations screen) and the phrases written for Canadians are left out. Of the health part, what remains are the outbreak notices, the health facilities, the medicines and, for each disease, the risk in the country, without the prevention that is the same for everyone. The generic travel.gc.ca notice on Ebola measures stays only in African countries and where the health part of the page names Ebola.

Countries that Canada does not cover

Palestine, Pitcairn and Wallis and Futuna take the same sections from the FCDO page of the GOV.UK Content API, without the parts for British citizens. The FCDO page covers "Israel and Palestine". Zones and risks that concern Israel only go in a section with the link ending in #for-nationality=IL. This section is shown, also to the assistant, only with Israeli nationality; the others see a pointer to the guide of Israel. Earlier apps do not know this suffix: guides and app must be published together.

Sections for a single nationality

For all countries, the parts that the two governments write for their own citizens become sections visible only with that nationality, also to the assistant:

  • from the FCDO page of each country, "Entry requirements" and "Getting help", in full, even with the title written with different spaces or capitals. The link ends in #for-nationality=GB. The slugs are in fcdo-slugs.tsv; Greenland and the Faroe Islands use the page of Denmark, Svalbard that of Norway, which talk about them in the entry part;
  • from travel.gc.ca, entry and exit and the consular offices, with the link ending in #for-nationality=CA.

The Canadian text on consular assistance names the emergency center in Ottawa without numbers. The pipeline adds right after that sentence the phone, SMS and email, read at each update from the travel.gc.ca page on emergency assistance. If the page cannot be downloaded, the ones already published stay.

Measurements and sources shown

On the data of Oct 17, 2026 there are 680 British sections and 668 Canadian, +0.27 MB of compressed guides-en.db. The Italian guides do not have the sections for a single nationality.

In the Sources and in the assistant's citations the sections appear as advice from the Government of Canada or the United Kingdom. In the Sources the United Kingdom has one row for each of its pages: safety, health and, with British nationality, entry requirements and consular assistance.

Advice newer than the package

With a network connection the English guide checks whether the FCDO has more recent advice than the package: see Updated travel advice.

Travel advice republished at most once a week

The travel.gc.ca text changes for almost all countries every two weeks, the risk rarely. The travel_advice_meta table of guides-en.db keeps risk level, notices and download date per region; the apps ignore it.

The pipeline keeps the published guides-en.db when only the advice has changed, downloaded less than 7 days ago, with no risk change. A risk change publishes immediately, with a warning in the job; so does a Wikivoyage change. A country that is not downloaded keeps the published advice. With the advice, guides-en.db weighs 20.5 MB (3.8 MB compressed).

Language change

After a language change the country list rereads the catalog. The cities installed in the other language show "Update available". A download always takes the cities of the current language, even if it starts before the list has been reread.

Guides and cities download again on their own (LanguageChangeReload in core/sync; the part of the app that reacts to the change is described in the Architecture page). Map, road network, points of interest, house numbers and timetables are the same in every language and stay. Alerts and weather do not depend on the language: the requests do not contain it, and the app writes the texts in the current language when it shows them.

The cities installed in the other language are compared with the saved catalog, offline. The manifest.json (about 3.7 MB) is downloaded only if there is something to fetch. A region that in the catalog has no cities in the new language is skipped: it keeps those it has.

Each region is a download of the cities package alone: up to 5 MB on any network, above that only on Wi-Fi, like the guides. A later language change cancels the downloads still queued (tag cities-language-reload).

City copies

Each downloaded city package also stays as a compressed file (cities-copies/<sha256> in the region folder, CityPackageCopies). When returning to a language already used, the reload reinstalls it offline; offline it uses the versions of the saved catalog. Beyond 20 MB in total, the least recently used copies are removed.

The copies count in the size of the cities of the region (RegionStorage.CITIES_COPIES_DIR). The size is read from disk every time the country list or Storage shows it (RegionRepository.regionBytes), because the download of another region can remove some copies. The copies are deleted with the cities or with the region.

Government of Canada advice in the Italian guides

The Italian guides have at the bottom the Government of Canada advice translated from English with an AI model, and thin Wikivoyage sections replaced by the translated English ones. Model, checks and assets are described in Guide translation.

Points of interest: what they carry

Categories: an allowlist

The categories are decided in core:poi, a module shared with the pipeline. "To see" is divided by type. The rules are an allowlist: only what has a precise category is published. What is of no use to travelers (social services, depots, parcel lockers…) is not published or shown, and neither is any tag that the rules do not know (ALTRO).

OpenStreetMap has hundreds of rare types, and every region brings new ones: on 14 regions "Other" had 825 different types, 617 with fewer than 5 points. So that the allowlist does not lose useful types, these have a category:

  • sports facilities, swimming pools and spas in Sports & wellness;
  • dance halls, escape rooms, karaoke and live music in Leisure;
  • aquariums, planetariums, named cemeteries, money transfer and mobile money, car sharing, barbecues, dispensaries, health posts… in other existing categories;
  • Currency exchange and Internet cafes as categories of their own.

On 42 regions, 90,072 points out of 5.66 million (1.6%) are left out: mostly civic centers, colleges, private schools, public offices and courthouses.

Rule check

The poiCategoryReport task rereads poi.db files already published with the current rules. It prints how many points remain per category and the tags that would no longer be published. It is useful to look at before republishing the regions (command in developer guide docs/GUIDA.md (Italian), section «Provare con dati tuoi»).

Border

Countries and territories

The points of interest of a country are clipped to its OpenStreetMap border, not to the bounding box of the region. The bounding box also includes neighboring countries: half of the points of San Marino were in Italy.

  • Territories (Réunion, Puerto Rico, Hong Kong) are clipped to their own border.
  • The Canary Islands, Bonaire and Sint Eustatius and Saba stay on the bounding box, which does not touch other countries. In OpenStreetMap they are parts of Spain and the Netherlands, not countries. The border of the Canary Islands follows the coast, so it would leave out ports, ferry terminals and marine areas.
  • The states of the United States and the provinces and regions of Canada, China and France are clipped to their own border: this way two neighboring regions do not repeat the same points.
  • The economic regions of Russia, which have no border in OpenStreetMap, are clipped to the border of the country. Kaliningrad, which is a province, is clipped to its own.

Overlapping regions of Russia

The bounding boxes of the Russian regions overlap. A point of interest that lies in several bounding boxes goes to the region with the nearest bounding box center: Nizhny Novgorod and Kazan to Volga-Vyatka, Chelyabinsk to the European Urals. This way, there too, every point is in a single region.

Land outside any region

Some land areas are in no region: map, routes and points of interest do not include them.

  • The lands beyond the 180° meridian of a country with a single region: Chatham and Kermadec for New Zealand, Attu and Shemya for Alaska, the tip of Chukotka and Wrangel Island for Russia, the western Phoenix Islands for Kiribati.
  • Agaléga, which in OpenStreetMap has no points of interest.
  • Uninhabited or disputed territories: Spratly, Paracel, Western Sahara.

The point of each object

Each point of interest has a single point on the map, always on the feature itself:

  • for a node, the node;
  • on an open way, the point at the middle of its length;
  • in an area (also a closed way forming a ring), the center of its bounding box if it falls inside the area, otherwise an interior point (C-shaped or L-shaped areas);
  • for a relation that is not an area, the point of its member with the lowest id.

The point of interest is in the region whose border contains that point, and in no other. Ways and areas straddling the border appear only once. The distant stretches of long relations are in their own region: the Great Wall crosses Inner Mongolia, Shanxi, Hebei, Beijing and Tianjin, and appears in each only with its own stretches.

Full polygon and fallback sources

The border is the full OpenStreetMap polygon. The simplified polygons of two neighboring regions overlap by a few meters, and a point on the border would end up in both. If the OpenStreetMap geocoder (Nominatim) does not return the full polygon, the clipping uses the simplified one, and the region is regenerated at the next generation.

Usually the points of interest come from the Geofabrik extracts, the service that publishes OpenStreetMap clipped by region. When the extracts are not usable, they come from Overpass, the OpenStreetMap query API. In that case the border and the rule for the Russian regions are applied to the center of the object's bounding box, which for open ways and C-shaped areas is not the point on the object. The stretches of the same relation stay separate points.

Each region receives these rules when its points of interest are regenerated.

Opening hours, address and contacts

Opening hours and address are present for food, lodging, pharmacies, hospitals, clinics, shops and diplomatic missions. Website and email are present for lodging and missions. If the name is missing, for these categories the brand (brand) is used.

Famous places

A measurement on 486 famous places in 11 regions (the most cited by Wikipedia) found 45 of them missing. For this reason the Overpass query and the filter of geofabrik_pois.py also take:

  • churches and mosques drawn as relations;
  • national parks, including protected areas of class 2;
  • only with the wikidata tag: bridges, squares, gardens, religious complexes and the other values of historic.

PoiRules gives a category to the new tags, which would otherwise end up in ALTRO and not be published. Previous versions of the app do not show bridges, squares, religious complexes and national parks.

Other objects with the wikidata tag

Also only with the wikidata tag, these are included:

  • pedestrian squares (highway=pedestrian as an area: place de la Bastille);
  • street relations (type=associatedStreet) with a square name and also a Wikipedia article (place des Vosges). Without the article they would be thousands of village squares;
  • monumental sites as a relation (type=site: Nikko shrines);
  • libraries drawn as areas (Bibliotheca Alexandrina);
  • mountain ranges (Olympus);
  • peaks that also have a Wikipedia article: in Italy about 3,600 instead of 13,800.

The filter does not require type=multipolygon for pedestrian squares as a relation. osmium export removes that tag from the areas it derives: with the requirement, 122 squares were left out in Île-de-France, including place de la Bastille.

Relations and areas across several extracts

The relations that osmium export does not assemble as areas (type=building, site, collection: Rialto Bridge, Palmeral of Elche) take the center from their members, like Overpass's out center. The clipping completes all relations (-S types=any): this way a national park that extends beyond the region does not disappear.

A park that extends across several Geofabrik regional extracts has in each only a part of the outline, and no extract alone reassembles its area. This is the case of the Picos de Europa, between Asturias, Cantabria and Castile and León, and of Fuji-Hakone-Izu, between several prefectures. These areas are reassembled from the union of the extracts and appear only once.

Winning key

When a place has several points-of-interest keys, the first in the list that gives a published point wins. This way a tourism=yes or a protected area not of class 2 next to leisure=garden or place=square do not hide the garden or the square: New York Botanical Garden, Hiroshima Peace Memorial Park, Piazza dei Miracoli.

Measurements

  • Oct 24, 2026, on the regenerated packages: 18 places out of 484 were missing (3.7%).
  • Nov 7, 2026: 9 were missing (1.9%), almost all of them articles that are not places or that have no OSM object.

Each region receives these places when its points of interest are regenerated.

Diplomatic missions

The missions are also included with the more recent tag office=diplomatic, with the represented country. How the Guide shows them is in Embassies & consulates.

Published count

The catalog carries the number of points of interest of each region (poi.count). The pipeline rejects an empty poi.db or one with fewer than half the points of the published one, and keeps the previous one. Such a drop is almost always a valid but empty answer from a source, not a region that has really lost half its points.

Translated names

Translated names (name:en, name:it) are included when OpenStreetMap has them, only if different from the name. A name:it equal to the name stays if there is also a name:en: this way the app in Italian does not show the English name. With different alphabets the translated names make the difference ("Kiyomizu-dera" instead of "清水寺"). Addresses and house numbers stay in the language of the place, as on street signs.

The shelters of stops (shelter_type=public_transport) are discarded: they would be hundreds of markers.

Format of poi.db

The poi.db file grows only with additional optional columns: old versions of the app read only the columns they know.

The app reads only the compact format: PRAGMA user_version 1, poi_code table, coordinates in microdegrees. The previous format (user_version 0, published until Sep 27, 2026) makes the installation fail with a permanent error. MergeManifests still produces it when it converts a v1 region.

House number cells

House numbers are not published by region but in cells of a grid. Each cell is a whole file of at most about 10 MB compressed.

How the cells are divided

Where house numbers are many, the cell is divided into four, down to bounding boxes of a few kilometers. Where they are few, a cell covers a larger territory, but never more than a zoom 7 cell (about 313 km on a side at the equator).

A larger cell is also divided if it weighs little, and only the children that have house numbers remain. This way, anyone downloading a distant island does not also download those of a nearby archipelago: Madeira, for example, goes from about 7.7 to about 1.3 MB. Areas with no house numbers at all, such as Annobón or the Galápagos, stay without a cell. The division is automatic (ADDRESS_CELL_MIN_ZOOM): each cell is divided in its turn, starting from the file already published.

Cells on the device

The app downloads the cells that cover the region and merges them into a single file. At updates it downloads again only the changed cells. For a trip a few files are needed: Rome 1, Lazio 5, Italy 109, continental United States 474.

The cells are assigned to regions when the app reads the catalog (attachAddressGridCells). The calculation involves hundreds of regions and thousands of cells: for this reason it runs off the main thread and reads the cell ids only once.

Why cells

  • With Overture the house numbers are many more (in Rome about 8 times those of OpenStreetMap) and grow from release to release. With cells a growing area divides by itself, without redrawing the regions.
  • Rejected: dividing the largest countries into macro-areas. It solves today's weight, but not the growth.
  • Rejected: reading a large file in pieces from the GitHub releases, as is done for the map with Protomaps. GitHub's request limits would be at risk. Each cell is instead a normal download, checked with sha256.

Overture sources

The Overture sources were read one by one. Only those on a list in the repository are included, overture-address-sources.tsv. A new source or one with a changed license stays out until it is reviewed; the pipeline reports it with an issue.

The criterion is a license written by the body that publishes the data, found in its texts or in the metadata of its catalog. For this reason Brazil (IBGE says only that the files are public) and Mississippi (only a disclaimer) are missing: there the OpenStreetMap house numbers stay. A source can be admitted except for one zone. Minnesota is included without Lake County, which declares its data "not for third parties"; the county is removed with its official Census border.

Duplicates between Overture and OpenStreetMap

Duplicates are removed before publishing: an Overture house number is discarded if within 30 meters there is already the same number in OpenStreetMap.

The "same number" is compared without spaces or capitals, with bis, ter and quater written as a letter. In France, for example, Overture (from the BAN) writes "12B" where OpenStreetMap has "12 bis", "12bis" or "12b". An OpenStreetMap house number with several numbers ("12;14") or a range ("20-24") covers every number of the list and the two endpoints, not those in between. "12", "12A" and "12B" remain different house numbers. The number shown in the app is always written as in the source.

Measurement on real data (October 2026), share of the Overture house numbers that remain as new, without and with the comparison rules described above:

Place Without With
Paris, 11th arrondissement 23.1% 17.7%
Utrecht 5.5% 5.0%
Bologna 4.7% 4.7%

Almost all the rest are really different, nearby house numbers. A number without a letter and one with the letter ("12" and "12a") are deliberately not merged. In the Netherlands Overture has no letters, but merging them would also remove the real "12" next to the "12a".

Cell releases

The cells are on 24 releases (address-cells-0 … address-cells-23), to stay far from the 1,000-file limit per release. The release is chosen with a stable hash of the cell id.

Twenty-four is a multiple of 12, the number of releases used previously. A cell with hash modulo 24 less than 12 stays where it was. The others move to release n+12 only when they are regenerated. The addresses already published in address-grid.json stay valid until then.

Tiles and failing sources

In the addresses.pmtiles file merged on the device the tiles are always gzip-compressed, the format MapLibre reads. PMTiles is a single-file format for the tiles of a map. The cells can arrive with gzip tiles or uncompressed ones. During the merge the app gzips the tiles of uncompressed cells. This way a region with cells of both kinds works, and the space used on the device does not change.

If a cell is already published and one of the two sources (OpenStreetMap or Overture) fails, the cell is not republished with only the data of the other: the published version stays. A cell never published comes out anyway, with what is available.

Apps older than 0.8.0

Only the cells are published, not the per-region house numbers (OpenStreetMap only). Apps older than 0.8.0, which do not know the cells, keep the house numbers already downloaded but do not receive new ones. This is a deliberate sacrifice, to have a single way of publishing house numbers to maintain.

Address search index

To search for an address in the Navigator ("Via Roma 12", see Map) each cell publishes, next to the house numbers, a small SQLite database, addresses-search.db (format 2):

  • a street table with the street name, the city and a search key (lowercase, without accents, punctuation reduced to spaces: the same function in the pipeline and in the app). In the search the house number is also recognized when it is separated from the street by a no-break space, which some keyboards insert;
  • an address WITHOUT ROWID table, with primary key (street, house number) and coordinates relative to an origin of the cell, in 1 KB pages: small file and search by primary key;
  • the street of each house number comes from the source (Overture, OSM addr:street) or, if missing, from the nearest named road within 50 m, taken from the map tiles already downloaded for the cell.

The index in the catalog

In the cell index (address-grid.json) the search entry is optional. Cells published without search do not have it, and work all the same, only without search. The cells of the index are in order of id as text ("4/11/4" before "4/9/3"), the order the app checks. With a different order the app discards the index, and the house numbers show as not available.

A cell published without an index is regenerated in its turn, even if the house numbers have not changed. If only the index changes, the published house numbers stay and only the version of the cell changes.

The index on the device

On the device the cells of the region are merged into a single addresses-search.db per region:

  • identical streets in different cells become one;
  • the coordinates are recalculated on a single origin;
  • sorting goes through a temporary file and not through memory, which would not be enough for millions of house numbers.

The app reads the file with a read-only connection per region, outside Room. The connection is closed when the file is replaced or deleted.

The search cells stay compressed (<cell>.db.xz in addresses-search/, the downloaded and verified file). They are needed only to know which to download again and to rebuild addresses-search.db, the only one read by the search. They are decompressed into a temporary folder during the merge. Decompressed next to the merge, which is no smaller than their sum, they would take up twice the space: for Italy about 170 MB are saved.

Compression

Guides, points of interest and house numbers are downloaded compressed in xz (-9e, 16 MiB dictionary). The October 2026 guides go from 8.8 to 2.0 MB in Italian and from 19.5 to 3.7 MB in English. With the general guide and See they reach about 2.6 and 4.5 MB.

On Wi-Fi the compression makes little difference, but on mobile networks and roaming it counts. The guides update on their own on mobile networks too only under 5 MB compressed (GUIDES_METERED_MAX_BYTES); above that they wait for Wi-Fi.

Slimming down the guides without removing text yields little (measurement of Oct 11, 2026 on the English guide). The Wikivoyage text is 70% of the compressed file. The repeated paragraphs of the Canada advice are worth 20 KB. A single name column in the 10,249 diplomatic offices is worth 30 KB. VACUUM and other xz parameters are worth less than 10 KB.

The catalog gives both the compressed file and the hash (sha256) of the decompressed one: the app checks both.

The house number cells have the tiles uncompressed inside the xz file. xz finds no repetitions inside gzip streams: without gzip the cells weigh about 40% less, for the whole world from about 1.95 to about 1.15 GB. On the device they take up the same space as gzip cells. The app gzips the tiles when it merges the cells into a single file, and copies as they are those of the cells already in gzip.

Weekly updates

A pipeline in tools/data-pipeline, launched every night by GitHub Actions, redoes one seventh of the regions in turn. The house number cells have a longer turn: every night one thirtieth of them is redone. The pipeline regenerates only what has changed. If the tiles of a region have not changed, the map stays at the same version and users do not download it again.

Compatibility with old versions of the app

The catalog carries minAppVersionCode. If the data requires a newer app, the app does not try to download it. Instead of an error it shows at the bottom "Update Pocket Travel to download countries", with the "Update" action that opens Updates. The automatic download of the guides is skipped silently. The pipeline, in turn, refuses to publish data that requires an app not yet released.

The catalog today requires 0.11.0 (minAppVersionCode 12, in the file tools/data-pipeline/min-app-version-code). The threshold protects two formats:

  • the guide sections for a single nationality (#for-nationality=), which 0.9.0 would show to everyone: these require at least 0.10.0 (minAppVersionCode 11);
  • the uncompressed tiles of the house number cells: versions before 0.11.0 would copy them as they are into the merged file, which declares the tiles as gzip.

Cleaning the guide text

The guides come from the Wikivoyage wikitext, which the pipeline turns into plain text. Besides headings, lists and links, the pipeline handles:

  • HTML entities (&mdash;, &nbsp;, accented letters);
  • nested templates: values such as currencies become text ("500 ALL");
  • links inside image captions;
  • galleries and tables, which are removed;
  • line breaks inside a paragraph, which become a space, as on Wikivoyage;
  • empty lines after subheadings and between the items of a list;
  • apostrophes attached to italics ("l'Arte").

Clone this wiki locally