want to visualize maps offline but i can't

hi, i’m trying to download a full map of a country to then visualize it offline

i first tried downloading a country map (for example, germany: http://download.openstreetmap.fr/extracts/europe/germany.osm.pbf)), then i looked for software that’s able to open and visualize .PBF files. The only ones i could find were JOSM, Maperitive and Mainfold viewer, but well, they all just froze in the loading process.

further checking the wiki, i read “It is suggested not to use very large areas because Maperitive loads all the data into RAM. Cut the data off with Osmosis or Osmconvert you do not need.”, so well, those programs don’t want to load the map because it is very big, so it seems i have to do an extra step in order to, at least, be able to visualize a smaller fragment of a country map.

i successfully cropped a medium-sized city with less than 200K inhabitants (specifically a square of 10x8 Km) with the extract function in osmconvert. the resulting file is a 2,9 MB .PBF file. i also changed the parameters to generate a 72,5 MB .OSM file. This time all 3 programs loaded the map file, but there was still a problem: both maperitive and josm were painfully slow, it ran like at 4 FPS, and the city isn’t that big… The only one that ran smoothly is mainfold, but the color scheme and presentation is horribe, you can’t check roads or streets, it’s all filled with lines and dots (looks like a wireframe or something)

at this point i don’t know what else to try. the thing i want is being able to visualize country maps offline, so if i don’t have internet connection i still can find a route or just make a consult. any ideas?

hope i explained myself well.
thanks in advance.

Hi Victor.
It’s not clear in your text what is your main purpose for having an offline map.
If you need to have data to do analysis or other stuff in your computer, I can suggest you https://osmaxx.hsr.ch/
From there you can download Countries, Cities or custom extracts that also contains styles to be used in QGIS (https://www.qgis.org).
If you want to have something offline while you’re in your car or hicking in the mountains, I suggest you look at OsmAnd (https://osmand.net/) and install its app: you’ll have everything you need offline in your smartphone.

Countries vary in size - what size country do you want to load?

What do you want to do with the data:

o Look at a map?
o Perform mathematical calculations on the data (like “percentage of landuse that is woodland” or “number of towns”)
o Calculate driving or other routes?
o Something else?

hi. the reason i want an offline map is just to visualize and consult it. maybe i want to eye check the nearby villages, nature spaces, or further inspect a road. Just casually taking a look at the map as you would do in osm.org, nothing more. i do NOT need to calculate a route or manipulate it’s data, so techincally i would only read-only the map.

I’ve take a look at https://osmaxx.hsr.ch/, but i don’t know which format i should choose to get the desired results, the ones available are:
Esri File Geodatabase, Esri Shapefile, GeoPackage, SpatiaLite, Garmin navigation & map data, OSM Protocolbuffer Binary Format
And also every region it just tells the file isn’t available and you have to request it, which i find annoying in comparaison with the process i did (downloading extracts from official osm, converting a smaller chunk with osmconvert).

On the other side, i gave QGIS a try, and i managed to load an .osm extract successfully. it is quick to render, but the thing is that the map view is also similar to the other program: it is a wireframe of the map borders and roads, not very practical for observation.
here’s a screenshot: what i want is this (what i did with my QGIS):

to look like a regular map, like this (it’s the same location, osm.org):

But i don’t know how to exactly do it, i’ve already looked at some QGIS guides but i couldn’t figure it out exactly. what i did is load the .osm file from the vector > openstreemap > import xml topology menu. then i later added a shapefile. maybe that’s the reason the map has no format but it’s the only way i could make it load. also the map proportions seems misshaped for some reason…

I’ve checked osmand but it seems it’s only oriented to mobile phones. there’s a “osmand editor” app for desktop but when i load the .osm file, it doen’t do anything and the program has barely a couple options. probably osmand covers the purpose i’m looking for, but i have to do it on desktop due to system storage constrains on my phone. thanks for your help

hi. i’m mostly interested in europe, so i would like to be able to load most of it’s countries individually (germany, france, italy…).
i just want to look at the map, as in read only.
i don’t want to manipulate its data or feed it into a function to do some processing, neither calculate a route, it is just that, being able to take a look at the map and nothing much appart from that really.

thanks for your patience.

I don’t understand why you want a off line map, don you have not always a internet connection?

outside home i only depend on a limited data plan, and in roaming it’s even worse. Some ISP’s will throttle your speed or even block your connection.
the same question could be applied to those who like to have a copy of the full wikipedia. many do for that reason too.
also not so extreme situations, local government doing internet cut off to say the least, just see what happened on belaurs a mere weeks ago.

Viking is a very nice program and store the maps on your computer, and if you are online you can synchronise them with OSM to update.

I know it’s years later but I too wanted to do the same thing and saw that these people here weren’t helpful at all and said things like “Why do you need this” “why don’t you have unlimited internet 247 mobile in every part of the country”. So many forums with the same type of people asking “why” a person needs something rather then just trying to be helpful and answer the damn question at hand, which would only grow the community and user base. Don’t you people have lives and jobs, why waste so much time any energy? It’s a forum. So when you ask “why?”, it may take the person 24 to 48 hours to jump back on the forum because they have a life, you’re not just wasting 5 minutes of this persons time, you’re turning a 5 minute question into a 4 week ordeal to get an answer that should take 30 seconds!

Solution (as of QGIS 3.20)

For Aerial Satellite Imagry

Add google satellite layer connection using the XYZ tile options in the browser box: https://mt1.google.com/vt/lyrs=y&x={x}&y={y}&z={z}

Covered here: https://freegistutorial.com/how-to-add-google-satellite-layer-to-qgis-3/

Then zoom into the area that you want to download, then click export.

Follow directions here: https://www.geodose.com/2020/08/how-to-save-google-map-satellite-imagery-qgis.html

Note: I noticed that medium sized cities downloaded at high resolution are about 3 to 6GB per city. However countries in Europe could be quite small, so when you say "I want to download a whole country, that could easily be a 10GB download… Burgers can’t fathom this.

For Open Street Maps Road Networks

Add OpenStreetMaps connection.

You can’t do right click export like you can with google sat layers, instead goto toolbox and “generate XYZ tiles (MBTiles)”.

The process explained here in step 1: https://gvlt.wordpress.com/2019/07/26/offline-hiking-maps-with-qgis-3-and-geopaparazzi/

Take into consideration zoom levels, the difference between zoom level 17x for me in a city, versus zoom level 20x, was 17x = 1GB (30 minutes of CPU processing) while 20x = 50GB (2 days processing, which I quit after an hour and changed zoomed levels instead).

More on zoom level processing explained: http://maperitive.net/docs/Commands/GenerateMBTiles.html

Hope that helps the original user, if not him then anyone else searching for a solution to this often seen question but sadly answered with more questions and no answers.

To answer this person asking “why” and then not give an answer after he clearly stated why, this really is a waste of time and in the context of the open source community as it hurts would-be developers and contributors who may go on to find alternatives because they can’t get their questions answered when they are still evaluating the software before getting more deeply involved.

If I had to waste my time and creative mental energy and speculate on the reasons why a person might need offline mapping in any country, loss of internet connection for any of the following reasons. 1. power blackouts that also down 4G antennas, 2. any number of disaster scenarios that destroy the mobile internet infrastructure, 3. spotty mobile data coverage, 4. a person who crosses many borders and their sim card doesn’t always work in new country, I know americans don’t get this at all because none of them have passports or leave their country, but there are other people out there that have to frequent five, eight, ten countries per week for their jobs, 4. The person intends to travel in the mountains or rural areas where this is no cell phone converage, I’ve been to America and even to this day there is spotty cell phone coverage in the appliances for instances, idiots…, 5. Or for SPEED REASONS! God forbid he wants to download these maps for offline use because it’s faster!!! This is the most simple logical benefit. Have you ever used QGIS with offline maps? It’s so damn fast! 6. Privacy concerns… why? None of your damn business. If you have to ask why somebody else needs privacy, that’s just because you have no power or real wealth, you’re not a human rights defender, you don’t fight tyrants and thus have no any adversaries because you don’t matter in the grand scheme of things. 7… No seven, just help or shut up. /rant.

Thank you very much Son Egi, I was also looking for a way to have an offline version of the maps I normally need for my job and personal life, and was also disappointed to see that some members of the forum weren’t willing to answer but instead tried to discourage the original question user by asking “why”; you yourself explained many of the reasons why someone may need to do this.

Anyway, your method worked wonderfully for me, so I encourage anyone looking for the same to try their method with QGIS and XYZ Tiles.

The reason why people asked the question “why” is so that they could better understand victor3911’s goals and be able to suggest the best options. Initially, it wasn’t clear whether they needed this for PC, mobile, etc. The options would vary widely depending on just the answer to that question. The users here could have made an assumption that they wanted a mobile app and given a quick answer, but it turns out that this would have been a waste of time because this isn’t what they wanted. In the end, they would have had to wait until victor3911 came back to clarify, at which point we’re back to the same place.

In technical support, often some questions need to be asked to clarify the user’s requirements before a solution can be provided. Otherwise, incorrect or unhelpful information could be provided, wasting the time of all parties.

It’s also worth noting that everyone on here is answering questions as a volunteer on their own time. Some questions may go hours, days, weeks, or longer before getting addressed. Expecting an answer in 5 minutes is unreasonable.