Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Qwant/qwantmaps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QwantMaps

🗺️ Qwant Maps is a map application that respects your privacy 🔍

Qwant Maps screenshot

Qwant Maps URLs

Qwant Maps provides links you can share with your friends to help them to #SwitchToQwant and #SwitchToOSM. For instance, you can:

A routing request

This endpoint points to a routing form and can pre-fill some of the fields.
For instance: https://www.qwant.com/maps/routes/?origin=latlon:48.8459543:2.3714015&destination=latlon:48.8702200:2.27863300&mode[]=walking#map=18.00/48.8459543/2.3714015

The parameters corresponding to this endpoint are the following:

Name Required Description
origin id of some place to use as the starting point
destination id of some place to use as the ending point
mode if you want to pre-select a routing mode in the routing form. One of walking, cycling, driving, public_transport

Architecture

Qwant Maps can be seen as 4 separated components:

  • a tile server,
  • a search engine (geocoder),
  • an API to detail points of interest and places,
  • a front end.

global architecture

NB: To provide the Qwant Maps service, Qwant hosts instances of the tile server, the geocoder and the Idunn API on its own servers.

Please note that Qwant instances are internal components and are not meant (yet) to be used directly other than as part of Qwant Maps. You can learn more in our Terms of services

Tile server

A tile server is a service whose job is to give all that is needed to display a fraction of a map.

Qwant Maps provides only vector tiles so the tile server does not serve images (as it is done with raster tiles) but raw data. It is the front end, Erdapfel, that takes the data and renders it into a user browsable map.

The tile server is a combination of 2 great opensource projects:

  • Planetiler, a flexible tool to build planet-scale vector tilesets from OpenStreetMap data fast without database
  • OpenMapTiles, for their great and flexible tile schema.

OpenMapTiles makes it possible for Qwant Maps to have an easy to define/extend vector tile schema.

Geocoder

The geographical search engine (also called geocoder) used for Qwant Maps is Bragi.

Bragi is a geocoder based on Elasticsearch and rust components developed by Kisio Digital.

Places API

To get more details on places and Points Of Interest (POIs), Qwant Maps uses an additional API: Idunn, that combines the information in the geocoder with external APIs to format detailed POIs data to display in the front end.

Front end

Qwant Maps's front, Erdapfel, is a Javascript single page app that allows to browse the map, search for places, see your position on the map, etc.

The front end uses Mapbox GL to render the map, using both the tiles from the tile server, and Qwant Maps custom map style.

Data

Tiles data

The main source of data for the tile server is the awesome OpenStreetMap (OSM) data ❤️ but other data like natural earth, better water polygon... are also used.

To run the tileserver, we utilize a custom version of Openmaptiles adapt to work with Planetiler: we have a fork project of Planetiler Openmaptiles.

This configuration leverages the PMtiles format, served by Martin

Geocoder data

The data import process in Mimirsbrunn is defined in a python script.

First, the OSM data is given to Cosmogony which outputs a big JSON file with all the world's administrative regions.

This file is then imported in Mimir by cosmogony2mimir.

We then import addresses using addresses-importer. It downloads datasets of addresses (from OpenAddresses and OpenStreetMap mostly), deduplicate them and then import them into our geocoder using openaddresses2mimir.

The streets are imported afterwards, from the OSM pbf file with osm2mimir.

Finally, the POIs are extracted from the PostgreSQL database created thanks to imposm using Fafnir.

Places API data

Idunn does not need its own data import process, but the API depends on:

  • the data of the geocoder,
  • Wikipedia data, fetched either on the Wikipedia APIs or in a custom Elasticsearch database.
OSM updates

The world keeps moving and OpenStreetMap data is getting better and better every day, so we need to update the data in all our components on a regular basis. We update the tiles entirely on weekly basis from OSM planet pbf

In the same time we have to up-to-date data in PostgreSQL, we can import again the geocoder POIs data with the current version of the tiles.

We update the remaining geocoder data (administrative regions, streets and addresses) on a monthly basis.

How to run

Qwant maps use to be fully Opensource but migrate to internal repository. Our idea is to keep update version on Github.