|
|
Subscribe / Log in / New account

GNOME Maps and the tile problem

GNOME Maps and the tile problem

Posted Jul 28, 2016 20:15 UTC (Thu) by zlynx (guest, #2285)
In reply to: GNOME Maps and the tile problem by javispedro
Parent article: GNOME Maps and the tile problem

Vector maps should be very fast. Game engines handle far more complicated graphics at 60 FPS.

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.


to post comments

GNOME Maps and the tile problem

Posted Jul 31, 2016 8:03 UTC (Sun) by alex (subscriber, #1355) [Link]

The rendering is fairly easy to setup. The setting up of GIS aware database and importing the data set is a pain. In a previous life I had to implement tile rendering on an NMS system. The biggest problem was having to break up the OSM data dumps into reasonable sized chunks for each country. Importing the whole of the UK data-set would make our rather lightweight server chug away for a significant amount of time - I dread to think what it would do to a normal laptop.

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.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds