View Single Post
Posts: 1,548 | Thanked: 7,510 times | Joined on Apr 2010 @ Czech Republic
#297
Originally Posted by woody14619 View Post
How hot would it be to be able to actually use that "send to phone" button on Google.
You mean this ? I guess its just a preformated SMS containing an URL to the results ?

Originally Posted by woody14619 View Post
The problem isn't in the tile generation, but rather the overhead in the search for objects in the spacial area. (Said another way, drawing is fast, querying a spacial area on a database with millions of objects isn't.) One optimization I've been working on is a way to pre-feed it a shape file for caching that data for use in subsequent requests. That's handy, since it can then create a sub-set of the data it needs for a given segment and use that for future requests without doing another request. For modRana, you could make a crude shape file for route (say route +/-2k) and use that to speed up the process quite a bit.

Even if it's too slow to do real time, it could do things like filling gaps the existing tile cache for a route. With a little adaptation, it could take the route shape, find existing/missing tiles, and generate just the missing ones. If you have even partial coverage, it may be able to keep up that way at least.
The batch download feature already basically creates something like a shapefile + downloads only tiles, that are not available locally. It should be quite easy modify it, to create an actual shapefile, send it to the tileserver and then request only the tiles it needs. It also works not only for routes but for any arbitrary location + bounding box.
Also, if your tileserver provides tiles through http, the current asynchronous download code could be used (it would wait for the tiles to be ready without blocking the GUI, etc.).
The only downside would be, that the tiles would be actually stored and would take up space.

The other possibility I see, provided the tile rendering is fast enough once an area is cached, is to integrate something like an "area manager":
  • mark an area for caching (like a 4km bbox around your area)
  • modRana creates a shapefile, sends it to the tileserver
  • tileserver notifies modRana once it finishes caching
  • tiles for the area would be generated on the fly and cached in a ringbuffer, say max 1000 tiles (provided that the server does some caching, this might not be needed)
  • users would get an "this are is not activated, do X to activate" error tiles outside of the cached area
  • I assume, that a smaller area means a faster working tileserver, so there would be a "total area" counter + warnings if the area is bigger than a given size
  • it would be possible to list,name, delete, shrink or enlarge active areas

Originally Posted by woody14619 View Post
The hard part is getting/massaging the vector data into a format that it likes. And vector data isn't always small... the global vector map I'm working with right now is near 7G. Nothing compared to tiles, I know.. but...
Well, thats not bad at all ! To have a map of the whole planet in your pocket Well, this probably means the OSM coverage is still lacking in some areas if it is only 7 GB
__________________
modRana: a flexible GPS navigation system
Mieru: a flexible manga and comic book reader
Universal Components - a solution for native looking yet component set independent QML appliactions (QtQuick Controls 2 & Silica supported as backends)
 

The Following 2 Users Say Thank You to MartinK For This Useful Post: