In this practical article, we will consider services that help download maps from the OpenStreetMap online service for subsequent conversion to other cartographic formats to use them offline without an Internet connection.
It is summer now, and for many, this is the main time to travel. Therefore, it’s time to get navigators, or put special navigation software on tablets and smartphones, so as not to get lost in unfamiliar places. Moreover, there is no shortage of such programs in the current era of GPS and mobile devices. It offers users both geographic Internet services like Google Maps and Microsoft Bing, and specialized software like “2GIS” with its own maps.
The latter option with local maps, which users pre-download and install for their navigation software, in many cases is not only more convenient, but also the only possible solution. Since the Internet in a particular area may be expensive or not work at all. But at the same time, the required offline maps of a specific area may also be missing.
Below we will consider options for downloading map data from the OpenStreetMap (OSM) online service with the subsequent purpose of converting this data into a specific map format for your navigation program. We have already covered the OpenStreetMap project in detail. It is an open-source web-based mapping service, similar to Google Maps, whose data is collected by the users themselves and is available to everyone under an open license. In this article, as an example, we will consider the conversion of OSM data for the OsmAnd program for Android devices, which we also examined in detail on the KV website.
OSM official website
So, we need to download OpenStreetMap map data for a specific area. First of all, this can be done from the official website of the service www.openstreetmap.org.
Directly on the online resource map there is a link “Export”, when you click on it, the data export panel will appear. Here, using the blue button “Manually select a different area” (manual selection of a special area), you need to select a rectangle of the desired territory on the map, then select “OpenStreetMap XML Data” from the list of formats and press the “Export” button.
As a result, a file with the osm extension will be loaded. This is a text xml file with map data, which can then be converted to other formats.
However, the official site imposes restrictions on the amount of downloaded map data. The loaded map should not contain more than 500 nodes. And any city – it will always be more than 500 nodes. But there are other services that allow you to download the desired geographic area without such restrictions.
The whole planet
There is a resource “Planet OSM”, where you can download the entire planetary database of cartographic data OpenStreetMap in one file planet.osm. This site contains the most current version of all OSM project data. A new version of planet.osm is released weekly. And then, with the help of extractor utilities, you can cut out cartographic data for a specific area.
However, for the average user, tinkering with an osm map of the entire Earth is not the easiest thing to do. The planet.osm file only in the archive takes about 30 gigabytes. You can turn to other services that make it easier to obtain OSM data.
The German site Geofabrik offers to download the latest up-to-date OpenStreetMap maps by geographic areas – Europe, Asia, Africa and so on, as well as by country. It is much more convenient, and, for example, the cartographic data of Belarus occupies only about 60 megabytes in the archive.
OSM data is offered for download, both in zipped form and in binary PBF format, which is used in some programs. And, of course, downloading a map from the Geofabrik resource is completely free.
However, there is a service that offers a free opportunity to download an even smaller osm map than a separate country – for example, a separate city or a small village. Such small maps are needed, for example, for cyclists. BBBike is a web service for fans of two-wheeled travel, which offers to download osm-maps of cities and small areas.
First, here you can download ready-made osm-maps of individual cities. But if there is no ready-made map of the required area, you can get it on the special page of the extract.bbbike.org service.
Here you need to select the desired area on the OSM map, and in the special fields indicate your e-mail address and specify the name of the selected map. It is important that the service makes it possible to download a map not only in OSM format, but also convert it to ready-made formats Garmin, Navit, Esri.
Since the “drawing” of a specific terrain map on the service comes from planet.osm, this takes some time. The result will be ready in 15-30 minutes, depending on the size of the map area and the load on the service. As soon as the card extraction process is completed, the user will be notified to the e-mail address left by him.
Thus, having received the cartographic data of a specific region in the form of a text osm file, you can start converting it into a ready-made map format with vector or raster graphics for a navigation application. For example, for the OsmAnd software GPS navigator, you need to convert OSM map data to OBF format.
There is a special converter OsmAndMapCreator for this. This application is written in Java and is cross-platform. It is launched after unzipping, depending on the operating system, by the sh or bat script. But the program has a graphical interface.
You need to convert the osm file through the menu “File” – “Create obf file from osm file”. After that, a file with the obf extension will appear in the pre-specified folder, which must be transferred to the Android device in the / sdcard / osmand / directory. Now the map of this area will be available in OsmAnd in offline mode.
Using OsmAndMapCreator, you can create OBF maps using data from other online map services. But an overview of these features of the program is beyond the scope of this article.