OpenStreetMap vs. Google Maps

OpenStreetMap vs. Google Maps

Times have changed

In the past, many people used Google Maps as their preferred map backend for their web application. But since 2018, Google now forces everybody who wants to use Google Maps to provide them their payment information (e.g. your credit card) so that Google can charge you as soon as your API quota is exceed. And believe me, this will be a big deal for most of us. For example, Google's Dynamic Maps API — used to add an map to an web page or application via JavaScript — currently (September 2019) contains a free quota of 28,000 map loads per month. After that, Google will charge you $7 per 1,000 requests (or $5.60 in case you produce more than 100,000 requests). That my be suitable for bigger projects or companies, but not for private persons or smaller projects.

So are there alternatives? Of course, there are some. But there is only one that is as nearly as powerful than Google Maps: It's OpenStreetMap.

OpenStreetMap is collaborative project to create a free editable map of the world that is made available under the ODbL license (more details can be found under https://www.openstreetmap.org/copyright). This means, you can use OSM not only to display map tiles or to render your own map, you can also use its data to create statistics (e.g. density of electric car loading stations) or to make your very own data extracts (e.g. a list of all sushi restraurants in Poland).

And as you will see later on, the pure data quality of the map is as as good as Google's map — if not even better.

Also, OpenStreetMap can be totally free for you — depending on your requirements:

  • If you just want to display the official OSM tiles on your web page, feel free to use the tile server provided by the OpenStreetMap Foundation (more infos can be found under https://switch2osm.org/using-tiles/getting-started-with-leaflet/). Please consider a donation to the OSMF in case you rely on their server hardware.
  • You can also rely on companies like Mapbox. They provide great technologies like WebGL-based map renderers with 3D view etc. but they can also be expensive though and possibily similar to Google's pricing plans.
  • In case you want to provide your own tiles, you can also do that easily with a Linux machine. But please be aware of the (annualy increasing!) hardware requirements (see https://switch2osm.org/serving-tiles/):
Serving your own maps is a fairly intensive task. Depending on the size of the area you’re interested in serving and the traffic you expect the system requirements will vary. In general, requirements will range from 10-20GB of storage, 4GB of memory, and a modern dual-core processor for a city-sized region to 300GB+ of fast storage, 24GB of memory, and a quad-core processor for the entire planet.

If you would like to do the latter, then please be aware of the possibility to only process and render a part of the world, e.g. only Germany. This will of course dramatically reduce the hardware requirements. Also compare the price of a root server with the Google costs. It will be most likely much cheaper to host it on your own.

Optical comparison of 2D default maps

Doing an purely optical comparison is not easy as Google Maps allows users to modify the look of the Map (what shall be rendered? in which color?) whilst OpenStreetMap itself is only a huge database of geodata consumed by a lot of services to provide the information you want (e.g. render a map or do some routing). In my comparison, I am using the default OSM map theme rendered by Mapnik and available at https://www.openstreetmap.org/.

Hint: I will only compare the level of detail of the 2D map. The 3D models of some buildings available in Google Maps are out of scope for me. Please note that there are also a lot of OSM projects providing free 3D models and rendering (https://wiki.openstreetmap.org/wiki/3D).

Vohenstrauß, Germany:

Winner: OpenStreetMap, because there are even streets missing in Google Maps!

Sanssouci castle, Berlin, Germany:

Winner: Definitely OpenStreetMap. There are a LOT more details on the map.

Madrid, Spain:

Winner: Google Maps. At the first look there is the same level of detail. But then, one core feature is missing in OSM: The house numbers. At least in this part of Madrid.

Ryugyŏng hotel, Pjongjang, North Korea:

Winner: OpenStreetMap, even if the level of detail is not as good as elsewhere on the world.

Waldau, Vohenstrauß, Germany:

Winner: Google Maps because that small hamlet of Waldau lacks of all addresses and houses in OSM. But there are also building etc. in the south of Waldau that are not known to Google.

Kathmandu area, Nepal:

Winner: Clearly OpenStreetMap. Nothing more to say.

Conclusion — 1:0 for OpenStreetMap

Normally, the level of detail in OpenStreetMap is much better than in Google Map. If you use it for navigation, you will also reach your target address. But as OSM is most likely community-driven, it can happen that some house numbers are still missing in some specific regions. Whilst Google can just pay for the address data, OpenStreetMap depends on open data (e.g. governments releasing some address data sets) or volunteers walking through the streets , recording all house numbers and manually inserting them into the database. Nevertheless, from my point of view, the winner here is clearly OpenStreetMap.

Is there OSM Street View and a satellite map?

Lets start with satellite data: There is none for OSM. But this is not a flaw at all as OpenStreetMap is only a database of physical circumstances and political boundaries. There is no imagery stored anywhere inside OpenStreetMap. If you own world satellite data or if you have a license for such, you can use it of course. But this has nothing to do with OpenStreetMap. But as many people like to use the satellite view for navigation — me included —, the point clearly goes to Google Maps.
But please don't forget that there are companies like Mapbox who provide you OSM data as well as license satellite imaginery if you want:

Taken from: https://docs.mapbox.com/mapbox-gl-js/example/satellite-map/

Now what about an OpenStreetMap version of Google StreetView? Well, there are some free, open projects like OpenStreetCam (former OpenStreetView) or Mapillary, but at the moment, they can't really compete with Google's massive StreetView power. So, if you rely on the Google StreetView API, switching to OpenStreetMap may not be an option for you.

Conclusion — Google wins here, 1:1

The OpenStreetMap community is working hard on providing free and open alternatives at least to Google StreetView, but there is a long way to be a real competitor to Google. If they ever will be, as nobody can compete will the power of Google's money. So, Google is the winner when it's about satellite photos and street view.

Comparison of geocoding functionality

The counterpart to Google's well known Geocoding-API is Nominatim. Like Google's API, Nominatim provides search by name or address (forward search) or lookup of data by its geographic coordinates (reverse search).

Like for every OpenStreetMap technology, you can consume it in three ways:

  • Just use the public API endpoint and rely on OSM to handle everything for you. This is fine for personal use or smaller project. In every case, please check the usage policy page before thinking about embedding Nominatim into your application or webpage.
  • Use an thirdparty provider like Mapbox to handle your search requests. This can or will cost of course money, depending on their plans.
  • Nominatin itself is open source. Thus, you can simply install one instance on your own machine. Like for the OSM map tile renderer mentioned before, this may take a lot of hardware power. So make sure that you have enough of bare metal in your data center ;-)

Conclusion — Both do their job very well, 2:2

You will find a convinient geocoding solution in both worlds. If you have enough free hardware, then Nominatim should be the geocoder of your choice in case you have to handle a lot of requests.

Routing capabilities of OSM and Google Maps

Routing someone through a wide network of streets is not easy from and IT point of view. You need all the street data (the streets itself, its texture, the speed limits, etc.) and you need a lot of algorithms like A* or Dijkstra combined.

Lets talk about OpenStreetMap first. OSM as a database provides all static data required to do the routing. And there are many really good solutions availabe. There are online routers like Open Source Routing Machine or GraphHopper and there are offline routers like the one embedded into OsmAnd.

When doing some simple navigation, e.g. from my home to the next shopping center, the Open Source Routing Machine (OSRM) on the official OpenStreetMap page tells me that I have to drive 17 km meaning 17 minutes in time. This sounds reasonable. Also, the proposed route is exactly the right one:

Doing the same routing on Google Maps produces and nearly equal route and time:

But this is just one simple example. Routing can be much more complex. Think about traffic jams, car accidents and so on. OpenStreetMap as a pure data supplier provides you everything you need to plan the route. But when it's about the time of arrival and so on, Google Maps is much more reliable there in my opinion. The fact that Google uses the transaction data of all Android smartphones alone to calculate how dense the traffic at a specfic section of a street is.. well, that is crazy and super helpful.

Conclusion — Google wins here, 2:3 for OpenStreetMap

Whilst the core routing functionality is at the same level — and possibly more a little bit more accurate with OpenStreetMap in some places where mappers were very stickler for details. But Google makes this more than up with the spice called real-time data. I love the real-time traffic information and routing forecasts based on big data. So, Google Maps wins here.

Location information comparison

That will be a short one. Both platforms allow users to maintain location information, but in different ways:

  • Google is organized more like an social network. Every location owner can add a POI for his/her place and enrich it with information. Other users can provide corrections (like the type of of served food, etc.) that can be accepted by the owner or not. Also, users can rate locations with 1-5 stars plus an optional comment.
  • OpenStreetMap also allows people to provide basic location information, like contact information (phone, e-mail, webpage, Facebook page, etc.) or opening times. What it does not provide is the more social part that is included in Google Maps, namely the rating and end-user editing functionality.

Conclusion — Draw, 3:4 for OpenStreetMap

Both, Google Maps and OpenStreetMap provide the basic and relevant static location information. Whilst shop owners etc. maintain their data on their one in Google Maps, the location information in OpenStreetMap is most likely maintained by the mappers only. But the local mappers are very active with high response times to changes.

Handling of divergent boundaries for the same region

Country borders are a very sensitive topic as many state have long had disputed borders or are currently facing military conflicts. As a globally active company, Google naturally has to adapt to the laws of the respective countries. This affects the map in two ways:

Normally when you search for a region or country, Google will highlight the region boundaries in red color. In case you search for a region with unclear borders, Google will not highlight it at all. For example, when you search for Ruanda, Google will highlight it's borders as expected:

But when you search for South Sudan, Google Maps will not highlight the border for you:

Why? Because there is an disputed region called Abyei between the north of South Sudan and the south of Sudan. Google marks the region with dashed outlines:

This is just one example why displaying maps globally is really hard. Also think of the Kashmir conflict, where India, Pakistan and China are fighting for that specific region since 1947 (China does not claim whole Kashmir, but only the Aksai Chin region). Also, if you are located in Pakistan, Google will render the map so that Kashmir is part of the Pakistan. If you are opening Google Maps from an location in India, Kashmir will be of course part of India.

The conclusion is that you have to take care of how you render borders. Borders rendered for country A may be perfectly fine, but the same border outlines could be totally illegal in country B.

In my opinion, Google has solved the issue very well.

But what did OpenStreetMap? In 2013, the OpenStreetMap Foundation released an information for officials and diplomats of countries with disputed territories. In detail, the paper can be summarized as follows:

  • OpenStreetMap is only a database and not a map at all.
  • The existence of a name, boundary location or description in the OpenStreetMap database does not imply that that it is legally correct in any jurisdiction.
  • The OpenStreetMap community operates under the on the ground principle, recording what is actually currently used in a particular area, giving pre­eminence to data collected in­-situ.
  • OpenStreetMap recognizes the importance of names, borders and descriptions to different national, ethnical, cultural or language groups. Everybody's free to contribute.
  • However, to remain neutral and to provide a practically useful service to a global community, OSM cannot delete base data to suit a particular legal jurisdiction.

So, OpenStreetMaps generally operates after the so-called on the group principle. Politics have no place in OSM. If a name appears on the ground, e.g. a street sign, then that is the preferred name to use since a navigation system that does not use the same street names as those that are signposted is just clearly impratical — and somehow stupid. The same applies for borders, which is a more sensitive topic. OpenStreetMap mappers (and the Foundation and control groups behind it) always try to maintain borders that are widely internationally recognized and/or meet the on the group principle — generally meaning physical control of the land. It can also happen that the national boundaries of two countries overlap, like in Sudan and South Sudan:


But I also have to criticize the OSM community (or better: the OSMF DWG) at this point. We all know the Crimea conflict, what happend and what the current status is: Russia has annexed Crimea and it is now part of Russia. Period. Love it or hate it, the on the ground rule cleary says that this is Russian territory. At the beginning of the conflict in 2014, the DWG voted for a temporary solution where two independent administrative boundaries shall be implemented: One for Ukraine and one for Russia. This was okay for me, because nobody knew what will happen in the near future. Then, in 2018, the DWG stated that Crimea shall be mapped as a part of Russia in order to follow OpenStreetMap's on the group rule. But this — in my opinion absolutely correct — decision lasted not that long... I don't want to talk about politics here, but I think the foundation was not stanch enough to stand up for their own resolution as some pro-Ukrainian activists (or whatever) started to whine. I can of course feel with the Ukrainian OSM contributors, but the OSM project cannot resolve your conflict, nor virtual borders will do so. Nevertheless, we all now have to live with the rolled back 2014 solution:

The good thing here is also that OpenStreetMap is only a geo database. Thus, if you require your borders rendered in a specific way — or differently based on the requestor country — you can simply render your own tiles with your very own rules and correct such a bullshit if you want. Great.

Conclusion — OSM is more flexible, 4:4 for OpenStreetMap

Google's solution is great but handling OpenStreetMap data is more flexible. You can decide for yourself, which borders shall be rendered in which way. Thats why the point goes to OpenStreetMap.

Working with map data

Now it is getting really interesting. What if you don't only want to render simple map tiles or do routing via a program? What if you need the map (or better world) information to extract specific data out of it. May it be for scientific/statistic reasons or just because you only need a very specific part of the map.

We are entering territory where OpenStreetMap can play out it's open data joker: Just do what you want and extract what you want. The easiest solution to do so is the Overpass API. Overpass is an read-only API allowing the consumer to fetch specific data within a defined area of the world. There also exists an web interface called Overpass turbo. You can host your own Overpass server or you can use the public Overpass turbo endpoint to do your requests.

There exists also an own imperative and procedural scripting language called Overpass Query Language (short: Overpass QL). Alternatively, you can build your search requests with XML. I don't want to deep dive into that topic (have a look at https://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL to do so), but here is an simple example for a pub tour in Berlin Kreuzberg. We define a starting point (pub) and search now for pubs surrounding that initial pub (maximum 500 meters). Then, pubs that are again reachable within 500 meters from that pub and so on — until we reached at maximum 100 pubs:

node(1528499450); // pre-defined starting pub
complete(100) { nwr[amenity=pub](around:500); };
out center;

This requests results to the following result, where every circle is a possible pub:

And can Google compete here? Not even a little bit. Also because they don't want you to do that. Google owns the data and they don't want to share it with you. Even not under a permissive license. And they are possible also not allowed to in case they have purchased some data from external suppliers with restrictive license agreements.

Google only provides you a so-called Places API allowing you to search for specific locations like restaurants. Like all other Google API's, there is a  free quota and then you have to pay quite a lot of money to them for your usage.

Conclusion — OSM wins here cleary, 5:4 for OpenStreetMap

Whilst Google's search API for their map is quite limited and can only be used for very specific searches, OpenStreetMap's full power is brought to bear here: You can do want you want and extract what you want. And if Overpass is not your tool, you can use another or build your own. When it's about raw data access, OpenStreetMap rules out Google Maps by far.

So, whats better now?

It depends. OpenStreetMap won by points and is clearly the better solution for ...

  • ... someone who needs to extract raw information out of the map
  • ... people who love free software and free data
  • ... private persons, non-profit or small projects
  • ... big/huge projects expecting a very high number of map or map-related requests by their clients

But there are also critera that may have to be met and where no way leads past Google:

  • You expect high load (also on map requests) but you don't want to maintain your own server(s)
  • You need to work with Google StreetView (as the alternatives are not really production ready)

In the end it is totally up to you. I am a huge Google fan and all my online data relies on Google's cloud. But I cannot or will not use their map in my personal projects because I fear a huge invoice from the big G because there was more traffic on my page then expected (and thus the free quota was exceeded) and of course because I am also a regular OpenStreetMap contributor and love the idea of an open map of the whole earth that can be used and edited by everyone.

Show Comments