To create Compact Maps equivalent on a single server, you need MapTiler server that comes with NodeJS engine, huge PostgreSQL Nominatim database with PHP HTTP request mapper, and GraphHopper Java engine. Finally, GraphHopper is a routing engine written in Java that needs preprocessed map data optimized for its routing algorithm. The WEB service exposing geocoding functionality is then a mapping from WEB request to SQL procedure call written in PHP. Nominatim imports OSM data into the PostgreSQL database once, creating appropriate database structures suitable for subsequent textual searches. Textual address search provided by Nominatim is implemented within the PostgreSQL database with PostGIS extension. But, you have to pre-generate tiles in advance using some other tool and deal with large resulting SQLite database (~30 GB for OSM Europe). MapTiler is the simplest one since it only fetches pre-generated vector map tiles from the SQLite database (mbtiles format). MapTiler is a tile retrieval service, Nominatim is a geocoding (textual search) engine, and GraphHopper is a routing service. A popular choice for the OSM data-based WEB map services would be MapTiler + Nominatim + GraphHopper. We have to restrict to OpenStreetMaps (OSM) data since there are no open-source projects that deal with commercial map data (Compact Maps, on the other hand, can serve maps from OSM, HERE, TomTom, and myriad other map data providers). To put all of these into the perspective, let's compare Compact Maps with an open-source system that would provide similar functionality. Comparison with an open-source alternative If you need to serve other WEB content from the Compact Maps instance and need more complex HTTP request parsing/rule matching, you may install Nginx and configure it to act as a reverse proxy for map requests. Each Compact Maps instance is self-contained, and it does not communicate with other instances because there is no shared storage or any other shared resource among them. Or make more replicas, should you need them, and scale the service indefinitely. If your demand exceeds those numbers, you just need to clone the instance and put an HTTP load balancer (HAProxy, for example) in front of them both. This instance may generate about 300 (vector) tiles and calculate 50 routes per second at burst (1 - 300 km). Performance? A single virtual AWS instance running on Intel(R) Xeon(R) Platinum 8124M CPU 3.00GHz with 16 GB RAM can handle up to 500.000.000 mixed tile/geocoding/routing requests monthly. The size of files is roughly three times smaller than the popular "mbtiles" format, which contains only map tiles data, without geocoding indices or routing data overlays.įor example, to turn any Linux box into a full-blown WEB map API service provider for European maps, you need one single executable and 47 map files, with a total size of about 10 GB. These are read-only files that contain all information required for map tile rendering, geocoding, and routing. Maps are stored in files, one file per country, in a highly compressed format. Yes, Compact Maps runs on Raspberry Pi 2. The ARM version of Compact Maps runs on any CPU with an instruction set compatible with ARM Cortex-A7, which, for all practical purposes, nowadays means any ARM processor. The binary runs unchanged on 圆4 CPU under Debian, Gentoo, Ubuntu, Mint, Red Hat, CentOS, Fedora, etc. The same Compact Maps executable runs out of the box on any Linux distribution having kernel version 3.2 or newer. Its size is about 12MB, and it does not have external dependencies (except a few Linux standard shared libraries, of course). That single executable is also a standalone HTTP server. Map data is stored separately, but they are also highly optimized and compressed (more about map data format later). The complete set of standard WEB map APIs - map tile retrieval, geocoding/reverse geocoding, and routing - is embedded into one single Linux executable. Why do we call our self-hosted mapping solution "Compact Maps"? Well, because it is.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |