GNOME Maps and the tile problem
The GNOME project's Maps application provides access to an array of mapping features (trip routing, address lookup, zoomable maps, etc.) from the desktop. Implementing that feature set requires hooking into a number of online services, but none of them is as prominent as the map tiles—the background images on top of which everything else is added in overlays. Recently, the tile provider that had served GNOME Maps well for several years ended its free service, suddenly cutting off all of GNOME Maps's users and forcing developers to consider new approaches for the future.
Since its initial public release, GNOME Maps had used the open tile API offered by commercial map vendor MapQuest to fetch its map tiles. Like a lot of online mapping providers, MapQuest incorporates OpenStreetMap (OSM) data into its own product offerings, a usage fully allowed under OSM's licensing (and surely a significant cost-saver for the company). In order to give back, MapQuest announced its OSM-based service in 2010.
GNOME Maps, in turn, made use of the MapQuest open tile data because it is end-user-ready—unlike the raw data provided by OSM itself. Although OSM does have a publicly accessible tile server, in practice that server acts as more of a technology demonstration or development aid than it does a full-blown public web service, and access to the tile server is limited. OSM's primary focus remains on creating and editing the map data itself.
To put it another way, ultimately OSM produces a data set; it does not run a public service. And the limitation is a technical one, too, not mere policy. Any end-user service built on top of the OSM database must, at the very least, perform its own filtering and other transformations (selecting which road and path types are of interest, dropping authorship and update information, perhaps selectively choosing land-usage type, points-of-interest and other metadata, and so on). On top of that, its must render the map data into images and apply appropriate labels and markers, plus undertake all of the tasks of running a large-scale public web service.
For years, MapQuest's free OSM-based service did just such processing, supplying ready-to-use PNG image tiles. But, in June, MapQuest abruptly changed its usage policy, making the existing free service unusable and steering existing users toward a new, paid service. The new MapQuest service did advertise a free tier, but with an API cap far too low to work for GNOME Maps.
The official shutdown occurred on July 11, causing GNOME Maps (and
many other services and applications) to
display a repeating display of MapQuest's shutdown announcement in
place of map tiles. On July 13, Maps co-maintainer Jonas Danielsson wrote
to the development list, calling attention to the service shutdown and
warning that the project has "no clear alternative
" for a
map-tile source.
He noted that there were patches available that could switch Maps
over to OSM as a direct tile source, but added that "we would probably
violate the terms of service
" unless GNOME could convince OSM
to grant it an exception. He asked for help contacting OSM, but
concluded: "I think we are going to need our own tiles.gnome.org for a map
application/platform to be feasible.
"
GNOME could perhaps run a server that fetched and cached OSM tiles for Maps users without raising the OSM project's ire, although it is not clear whether or not such a caching server would run afoul of OSM's rate-limiting rules and require asking for special permission. And, certainly, a caching server could act as a temporary solution, something that could be swapped out in the future for a GNOME server that generated its own image tiles directly. But, as Emmanuele Bassi noted in a Reddit discussion thread, the computing power for the server may be doable, but the bandwidth could rapidly become a problem.
PNG image tiles are typically 256 pixels square but, for any given area on the map, they must be generated at multiple resolutions—OSM supports 20 zoom levels, and users like to zoom in and out at will, expecting the image tiles to be served up nearly instantaneously. Multiplied by all of the GNOME Maps users, that adds up to a lot of network traffic.
One hypothetical alternative would be to render the tiles locally. The map server could send vector data for the region of interest and have the user's CPU or GPU render the data directly to screen. Danielsson noted that such client-side rendering is an item on the Maps roadmap, but it is several steps from being practical. OSM's vector-tile API is still in the experimental stage (as there are additional challenges to solve, such as clipping paths to bounding boxes), for one thing.
But users may not like vector-tile rendering either. Local rendering would cost battery power, and it could introduce lag. The Android app OsmAnd already uses client-side rendering, and OsmAnd users will no doubt be familiar with the delay experienced after panning or scrolling to a new area on the map, waiting for the roads and buildings to render on screen.
Another approach suggested on the list was having the application fetch map tiles in advance and store them locally. GNOME Maps can already run in local-tile mode, if one downloads tiles for the area of interest ahead of time. But this was also regarded as suboptimal; it requires the user to dedicate considerable disk space to store map tiles even in the best of circumstances, and the space required to store the entire OSM global map is hundreds of gigabytes.
In the long run, GNOME may have to run its own tile server. There would certainly be advantages to having control over that bit of critical project infrastructure. In the interim, however, the project seems to have come across a viable substitute. Przemo Firszt suggested reaching out to any of the several OSM-based service providers geared toward developers. One of those service providers, Mapbox, responded a few days later with an offer to give GNOME Maps free access to its tile server for a year.
Danielsson and Mattias Bengtsson then discussed
the offer with Mapbox and agreed to the switch, with Bengtsson adding:
"Personally I'm interested in exploring how we could continue
with Mapbox in even in the future. It might mean crowdfunding in some
way.
"
The MapQuest bug is listed as a blocker for the release of GNOME 3.22, so implementing the fix via Mapbox is a high priority. But it could still be a while before the patched application reaches end users; Ubuntu was already forced to pull Maps from its installation images for the most recent stable update to Ubuntu 16.04 (although the package could easily be restored in the next update). The Maps team has tentatively planned to discuss a long-term solution a few weeks from now at GUADEC.
The series of events is frustrating for Maps users, of course, but it is worth remembering that the root of the trouble is MapQuest's sudden reversal of its original pledge to support the open-source community. Reliance on the external service led to the disruption, which would be the case regardless of whether that service was free or proprietary.
But, at present, reliance on third-party resources for map
applications seems to be unavoidable due to the size and complexity of
global mapping. GNOME Maps already relies on quite
a few other services to provide functionality on top of the tile
layer, including Nominatim,
which converts addresses to map coordinates, GraphHopper, which calculates
routes, and so on. That makes it susceptible to interference on a
number of fronts—even if outages like the current one remain a
rare occurrence.
GNOME Maps and the tile problem
Posted Jul 28, 2016 5:35 UTC (Thu)
by javispedro (guest, #83660)
[Link] (7 responses)
Posted Jul 28, 2016 5:35 UTC (Thu) by javispedro (guest, #83660) [Link] (7 responses)
Maps were rendered almost in real time decades ago using Agg on 400Mhz computers, and there are routine demos of full speed map panning in modern desktop computers (see Qt blog). In fact, my experience with OSMand is that it is faster in almost any situation except very low latency USB links. And OSMand is not even the fastest renderer around (Java?).
Even Here maps (the web based one) is using vector maps behind the scenes; rendering them using JavaScript, and the performance is more than acceptable. I believe Google Maps is doing something similar too these days (before that, the tiles loading process was very noticeable).
It does have a cost in disk space, though.
Vector graphics maps
Posted Jul 28, 2016 12:29 UTC (Thu)
by tajyrink (subscriber, #2750)
[Link]
Posted Jul 28, 2016 12:29 UTC (Thu) by tajyrink (subscriber, #2750) [Link]
Tile based maps take huge amount of space if cached locally, while I had most of Europe on my Openmoko as vector graphics in around 6 gigabytes in 2010. I was using Navit, and yes it was especially slow at 400MHz but it did work for me for car navigation.
GNOME Maps and the tile problem
Posted Jul 28, 2016 17:50 UTC (Thu)
by andrewsh (subscriber, #71043)
[Link] (2 responses)
Maps.me have actually published the source code of their application (though I haven’t managed to build it), that could be reused I guess.
Posted Jul 28, 2016 17:50 UTC (Thu) by andrewsh (subscriber, #71043) [Link] (2 responses)
GNOME Maps and the tile problem
Posted Jul 30, 2016 0:37 UTC (Sat)
by angdraug (subscriber, #7487)
[Link] (1 responses)
OsmAnd is (and AFAIR has always been) GPL, and so is likely to have more new contributor friendly source code. Also OsmAnd is a lot more tweakable app than maps.me, which is also likely to lend to an easier to deal with code base (can't efficiently support and develop a codebase across that many combinations of options without having a process to deal with tech debt). And it's been around longer than maps.me.
Posted Jul 30, 2016 0:37 UTC (Sat) by angdraug (subscriber, #7487) [Link] (1 responses)
GNOME Maps and the tile problem
Posted Aug 4, 2016 14:01 UTC (Thu)
by moltonel (guest, #45207)
[Link]
Posted Aug 4, 2016 14:01 UTC (Thu) by moltonel (guest, #45207) [Link]
Or they could get inspiration from KDE's Marble, which has been able to use multiple providers (tiles and routing) from the start, has a good caching mechanism, has made good progress with vector rendering, and has basic OSM editing functionality.
GNOME Maps and the tile problem
Posted Jul 28, 2016 20:15 UTC (Thu)
by zlynx (guest, #2285)
[Link] (1 responses)
Posted Jul 28, 2016 20:15 UTC (Thu) by zlynx (guest, #2285) [Link] (1 responses)
The data does need to be structured properly. One trick for fast vector rendering I recall reading about is to make sure long lines have points even where they don't need them in order to guarantee at least one point in each visible area of the space partition tree. And I think those extra points can be dynamically generated from the previous zoom level. Otherwise your code is back at calculating all kinds of extra line intersections just to see if it's visible or not. And of course priority levels so that tiny features aren't being included when zoomed far out.
I suspect that, like much modern software, lots of programmers just go for brute force instead of cleverness. "Let's just draw EVERY line and find its intersection with the view! Yeah! And instead of a regular BSP with an insanely fast binary search we'll have these local object bundles with irregular edges (eg, the state of Maryland) and we'll run a view intersection test against every bundle to see if we should be drawing those." Etc.
GNOME Maps and the tile problem
Posted Jul 31, 2016 8:03 UTC (Sun)
by alex (subscriber, #1355)
[Link]
Posted Jul 31, 2016 8:03 UTC (Sun) by alex (subscriber, #1355) [Link]
Maybe the circle can be squared with having a public GIS web-service to supply the vector data but I suspect that still runs into the same problems of maintaining a web-service getting hammered for data with no monetary backing to keep it running.
GNOME Maps and the tile problem
Posted Aug 4, 2016 14:35 UTC (Thu)
by moltonel (guest, #45207)
[Link]
Posted Aug 4, 2016 14:35 UTC (Thu) by moltonel (guest, #45207) [Link]
GNOME Maps and the tile problem
Posted Jul 28, 2016 7:49 UTC (Thu)
by TomH (subscriber, #56149)
[Link] (3 responses)
Posted Jul 28, 2016 7:49 UTC (Thu) by TomH (subscriber, #56149) [Link] (3 responses)
At zoom 19 there are over 250 billion tiles just for that level, so over 500 billion in total for all levels up to 19 but at the higher levels very few are ever looked at - just 0.023% of z19 tiles had been recently viewed last time we checked (all figures from https://wiki.openstreetmap.org/wiki/Tile_disk_usage) because of course much of the world is water, or otherwise largely empty and hence not commonly viewed at large scale.
All of which goes to explain why we absolutely prohibit any bulk downloading of the tiles from tile.openstreetmap.org - because doing so forces us to render things that would otherwise likely never be rendered.
Many people assume that the tiles are all prerendered and they are just downloading what already exists but that isn't actually what happens at all - rather tile.openstreetmap.org is a network of currently about 18 reverse proxy caches around the world (https://hardware.openstreetmap.org/#tile-caches) which sit in front of two rendering servers that render tiles on demand, and expire ones that haven't been requested recently.
Currently at peak times that cache network is delivering a little over 1Gbit/s of tile data to our users and (as you can see at http://munin.openstreetmap.org/openstreetmap/tile.openstr...) that rose 10% or more when MapQuest shutdown their service.
Network of mirrors?
Posted Jul 28, 2016 9:56 UTC (Thu)
by Yenya (subscriber, #52846)
[Link] (2 responses)
Posted Jul 28, 2016 9:56 UTC (Thu) by Yenya (subscriber, #52846) [Link] (2 responses)
FWIW, I maintain a moderately-sized mirror site (ftp.linux.cz), and I am willing to donate a disk space in the order of several terabytes and bandwith in order of about 1-5 Gbit/s.
Having the tiles rsyncable is probably not feasible because of their large number, but the simpler the contribution set up would be, the more contributors the Openstreetmap project gets. Maybe the data set should be split geographically, and then have "mirrors of European tiles", "mirrors of Australian tiles", etc. Would Openstreetmap be interested in something like this?
Network of mirrors?
Posted Jul 28, 2016 15:51 UTC (Thu)
by smoogen (subscriber, #97)
[Link]
Posted Jul 28, 2016 15:51 UTC (Thu) by smoogen (subscriber, #97) [Link]
Network of mirrors?
Posted Aug 4, 2016 14:17 UTC (Thu)
by moltonel (guest, #45207)
[Link]
Posted Aug 4, 2016 14:17 UTC (Thu) by moltonel (guest, #45207) [Link]
GNOME Maps and the tile problem
Posted Jul 28, 2016 14:58 UTC (Thu)
by pj (subscriber, #4506)
[Link] (1 responses)
Posted Jul 28, 2016 14:58 UTC (Thu) by pj (subscriber, #4506) [Link] (1 responses)
GNOME Maps and the tile problem
Posted Jul 28, 2016 20:28 UTC (Thu)
by magila (guest, #49627)
[Link]
Posted Jul 28, 2016 20:28 UTC (Thu) by magila (guest, #49627) [Link]
GNOME 3.22 release blocker?
Posted Jul 29, 2016 5:34 UTC (Fri)
by zdzichu (subscriber, #17118)
[Link] (2 responses)
Posted Jul 29, 2016 5:34 UTC (Fri) by zdzichu (subscriber, #17118) [Link] (2 responses)
To be blunt - I don't see the point in GNOME Maps app. There are few online services with mapping and routing (OSM, Google Maps, Bing...), why is a thick client even wanted? It could be included in GNOME as leaf application, but it is not important enough to block release of whole environment.
I have the same feeling about Weather app. Sure, it looks nice, but it's entirely pointless (just put "weather" into google search box). And those aren't self-sufficient apps, they need data sources and infrastructure to provide it.
GNOME 3.22 release blocker?
Posted Jul 29, 2016 8:07 UTC (Fri)
by rsidd (subscriber, #2582)
[Link] (1 responses)
Posted Jul 29, 2016 8:07 UTC (Fri) by rsidd (subscriber, #2582) [Link] (1 responses)
GNOME 3.22 release blocker?
Posted Aug 4, 2016 14:20 UTC (Thu)
by moltonel (guest, #45207)
[Link]
Posted Aug 4, 2016 14:20 UTC (Thu) by moltonel (guest, #45207) [Link]
GNOME Maps and the tile problem
Posted Jul 30, 2016 17:19 UTC (Sat)
by patrakov (subscriber, #97174)
[Link] (5 responses)
Posted Jul 30, 2016 17:19 UTC (Sat) by patrakov (subscriber, #97174) [Link] (5 responses)
GNOME Maps and the tile problem
Posted Jul 30, 2016 20:55 UTC (Sat)
by gioele (subscriber, #61675)
[Link] (2 responses)
Posted Jul 30, 2016 20:55 UTC (Sat) by gioele (subscriber, #61675) [Link] (2 responses)
Beware: in many heavily edited urban parts of the OSM map the raw data is bigger than the rendered PNG tile.
(One could say that in those cases a picture is worth a thousand nodes.)
GNOME Maps and the tile problem
Posted Jul 31, 2016 15:06 UTC (Sun)
by jospoortvliet (guest, #33164)
[Link]
Posted Jul 31, 2016 15:06 UTC (Sun) by jospoortvliet (guest, #33164) [Link]
See http://nienhueser.de/blog/?p=688 for some info about their approach.
GNOME Maps and the tile problem
Posted Aug 4, 2016 14:30 UTC (Thu)
by moltonel (guest, #45207)
[Link]
Posted Aug 4, 2016 14:30 UTC (Thu) by moltonel (guest, #45207) [Link]
Vector tiles has been the focus of a lot of OSM development in recent years, because they are much more flexible (think changing the display language, optionaly show buildings, etc) while puting a lower load on the server. But it's difficult, and hasn't overtaken png tiles in popularity yet.
GNOME Maps and the tile problem
Posted Jul 31, 2016 18:22 UTC (Sun)
by sator77 (subscriber, #45045)
[Link] (1 responses)
Posted Jul 31, 2016 18:22 UTC (Sun) by sator77 (subscriber, #45045) [Link] (1 responses)
The problem is the local rendering. It is not all that trivial with many gotchas to render a _nice looking_ map. But if we manage, by for instance using Mapbox own mapbox-gl library in some way, we get more control of the style of the map. And could, for example offer a high contrast Map in the high contrast theme.
Or if someone wants to try to turn my toy library vectortiles-glib (https://github.com/jonasdn/vector-tile-glib) in to something real, that would also work.
Jonas (Maps maintainer)
GNOME Maps and the tile problem
Posted Jul 31, 2016 18:57 UTC (Sun)
by TomH (subscriber, #56149)
[Link]
Posted Jul 31, 2016 18:57 UTC (Sun) by TomH (subscriber, #56149) [Link]
Basically if you build a style on the Mapbox vector tiles you won't be able to switch to another data provider without rewriting the style because nobody else will be able to provide compatible vector tiles.
GNOME Maps and the tile problem
Posted Jul 30, 2016 22:03 UTC (Sat)
by mcatanzaro (subscriber, #93033)
[Link]
Posted Jul 30, 2016 22:03 UTC (Sat) by mcatanzaro (subscriber, #93033) [Link]
"We have know released GNOME Maps that uses the Mapbox API for getting tiles.
This fixes the issue we had with MapQuest open tiles shutting down. We know have
a stable relationship with Mapbox, and we use a proxy indirection that
will allow us
to repoint our tiles URI without requireing new releases if something
like this would happen in the future."
Fedora updates on the way!
Unfortunately it looks like due to bad timing, Ubuntu wound up removing Maps from the default install in 16.04.1. I wonder if they'll put it back for future releases.
OT: OsmAnd like application for Linux (Debian)?
Posted Jul 31, 2016 18:19 UTC (Sun)
by debacle (subscriber, #7114)
[Link] (6 responses)
Posted Jul 31, 2016 18:19 UTC (Sun) by debacle (subscriber, #7114) [Link] (6 responses)
(For those who don't know OsmAnd: It allows to download offline maps of countries and regions, one is interested in, has a good address and POI search function, and is relatively flexible about what it shows on the map.)
OT: OsmAnd like application for Linux (Debian)?
Posted Aug 1, 2016 10:25 UTC (Mon)
by jezuch (subscriber, #52988)
[Link] (4 responses)
Posted Aug 1, 2016 10:25 UTC (Mon) by jezuch (subscriber, #52988) [Link] (4 responses)
It's a KDE app, but I guess this qualifies as a "typical desktop" ;)
OT: OsmAnd like application for Linux (Debian)?
Posted Aug 4, 2016 14:43 UTC (Thu)
by moltonel (guest, #45207)
[Link] (1 responses)
Posted Aug 4, 2016 14:43 UTC (Thu) by moltonel (guest, #45207) [Link] (1 responses)
You could also try digging though http://wiki.openstreetmap.org/wiki/Software/Desktop
OT: OsmAnd like application for Linux (Debian)?
Posted Aug 9, 2016 12:25 UTC (Tue)
by debacle (subscriber, #7114)
[Link]
Posted Aug 9, 2016 12:25 UTC (Tue) by debacle (subscriber, #7114) [Link]
OT: OsmAnd like application for Linux (Debian)?
Posted Aug 9, 2016 12:18 UTC (Tue)
by debacle (subscriber, #7114)
[Link] (1 responses)
Posted Aug 9, 2016 12:18 UTC (Tue) by debacle (subscriber, #7114) [Link] (1 responses)
Now I tried again and it seems to be quite good for my purpose!
In Debian 8, there is even a "marble-mobile" package, which contains a version optimised for small screens.
Unfortunately, it does not exist anymore in Debian 9.
So, +1 for marble.
OT: OsmAnd like application for Linux (Debian)?
Posted Feb 10, 2019 20:33 UTC (Sun)
by agiantuser (guest, #130357)
[Link]
Posted Feb 10, 2019 20:33 UTC (Sun) by agiantuser (guest, #130357) [Link]
https://packages.debian.org/search?keywords=marble-maps
OT: OsmAnd like application for Linux (Debian)?
Posted Jun 9, 2019 14:49 UTC (Sun)
by maWeujiQo (guest, #132531)
[Link]
Posted Jun 9, 2019 14:49 UTC (Sun) by maWeujiQo (guest, #132531) [Link]
Deeper Roots
Posted Aug 4, 2016 15:01 UTC (Thu)
by Garak (guest, #99377)
[Link]
Posted Aug 4, 2016 15:01 UTC (Thu) by Garak (guest, #99377) [Link]
The series of events is frustrating for Maps users, of course, but it is worth remembering that the root of the trouble is MapQuest's sudden reversal of its original pledge to support the open-source community.Another way to look at it would be to see the root of the trouble as a naive faith that third parties can be blindly depended on. It's always more work to forgo the shortcut of depending on a third party, but there are long term payoffs.