GithubHelp home page GithubHelp logo

Comments (7)

Framstag avatar Framstag commented on September 25, 2024

You are right that a tile server and a offline rendering engine are in conflict with each other, but I will not stop you. Major aspect I see:

  • Tile rendering has deficiencies (rotation, language, no style sheet usage on the device)
  • separate request/response from actual rendering (requesting a tile might just trigger a background job)
  • Cache rendered tiles or else you will die quickly ;-)
  • Caching tiles will require a big disk (you should be able to calculate this, likely you have to drop some higher zoom levels))

There is another more modern possible approach: Vector tiles are some variant of them. In this case you do not send tiles but just the result of the database query. This way, you can still render locally and use rotation and stylesheets locally. There is a specification of the format of vector tiles.

I haven't looked at them in detail but such a thing should be possible (I'm not sure if it works if you target to be conform to the standard).

In result you will have to transform the API of MapService (or one of the lower level APIs) to a REST API. NOte that this requires the service to work on TypeConfig/TypeInfo data. On the server you would have to make the queries and cache the results. problem here is that different to tiles there is more variance in the calls, making the cache possibly bigger (however data itself may have a much bigger compression ratio?).

Not e that libosmscout has the same approach as for example OSMAnd and I never had big problems with downloading databases from a server. Note also that you can make the database as fine granular as you like reducing the amount of data to download in one go. OrganicMap for example has rather small download regions.

from libosmscout.

syyyr avatar syyyr commented on September 25, 2024

Sorry, I should've told my actual usecase right at the beginning. I'm not even sure if my tile server idea even makes sense.

My usecase is this: on our deployment site we have servers and clients. The servers run some backend and the client (users' PCs) run the software which also shows the map. The problem is that the network of the site closed - meaning it doesn't have an internet connection and so I have to somehow show maps locally (without internet connection). This I've already achieved via libosmscout and it works fine. There's just one problem: rendering maps on local PCs requires that all of the PCs have a libosmscout database installed. Since the database might have more than 100 MB, I don't want to ship it directly with the app's installer. So, I must implement an importer/downloader of some kind. And that is a bit cumbersome, because instructing users and how to import/add/update databases is something I don't want to undergo ideally (or at least with OUR users...).

So, I thought - if we have our own servers on the deployment site, why not just use those to run a tile server? And while we're at it, why not use libosmscout to render those tiles? Then we won't have to worry about updating/importing the database on every PC. And we can update the maps whenever we want, because we can connect to the servers directly. And we'll possibly save some disk space, because the user won't have to install anything.

Now, I'm not sure if my idea of running a tile server, which would run libosmscout as a backend, and render tiles and demand (and cache them) is good. Thinking about it, maybe I could just prerender tiles with libosmscout, save those on the server and never render anything on demand. Although, I guess having a lots of prerendered tiles means a lot of disk space. Or maybe not if you use the vector tiles but I haven't done any research on them yet.

My question is this: do you think it's worth trying to figure out this tile server mess? Reading your comments, I think it might be even more bothersome than figuring out how to automatically update maps on the user stations and just be done with it.

from libosmscout.

Framstag avatar Framstag commented on September 25, 2024

IMHO this is not only a question of technic.

A TileServer and an offline database serve different needs and usage szenarios. They have advantages and disadvantages each. Libosmscout with offline database has advantages:

  • Works offline
  • Can update the database if I have network
  • Can change rendering locally to my needs. Changes colors, switch details on/off...
  • Is for "heavy" users (needs space on mobile, but do not want to pay for permanent internet traffic)

advantage of a tile server:

  • Good if I have a permanent and fast connection
  • May be cheaper, if used less often
  • May be more up to date
  • Support the whole world on demand without much space requirements

Also IMHO the distribution of data is in principle technically solved. There are a multitude of mechanism to choose from:

  • (Separate) installation packages with versioning...
  • rsync
  • FTP
  • ...

from libosmscout.

syyyr avatar syyyr commented on September 25, 2024

I think I wasn't 100% clear, so I made this diagram:
image
We have no internet connection at our deployment, so we can't just use any tileserver, so that means that we have to render the maps ourselves offline. I'd use libosmscout to do that. Ideally, I also don't want to render them on the workstations, because I don't want to update the maps on all of the PCs. Which is why my idea was to use libosmscout, render the tiles with that (on demand and with caching) on our server and distribute them to the workstations via a tileserver.

To be honest, I think our conversation makes it quite clear, that my idea (creating a tile server, that renders stuff with libosmscout) isn't easy to implement. It'll be easier for me to figure how to make distributing map data less of a hassle.

from libosmscout.

Karry avatar Karry commented on September 25, 2024

Hi Václav. Create http server that will render map tiles with libosmscout is possible. There should be no blocker. Just before you start developing, try to look to https://github.com/rinigus/osmscout-server/ project, it is web server that should run on mobile phone primarily, it supports multiple rendering, geocoding and routing backends... I believe that it should be possible to build it just with libosmscout backend and pack it just as a daemon without UI for server usage...

from libosmscout.

Framstag avatar Framstag commented on September 25, 2024

@syyyr Can we be of further help regarding this issue or can we clos the issue as solved? If you have further question you can of course always create a new issue.

from libosmscout.

syyyr avatar syyyr commented on September 25, 2024

Sorry for not responding earlier, I just came back from vacation.

My conclusion is this:

  • Implementing a tile server myself is doable, but it's too much.
  • I have looked at osmscout-server and while it seems that it probably could do what I want, deploying it wouldn't be easy. I wasn't really able to compile it on my own machine, mostly because I have no idea how to configure builds for a qmake project.

Considering this, I have decided that I'll implement map updating on the client, and all map rendering will also happen on the client. In the end, the map data we'll need aren't all that big, so it'll be fine.

Thank you for all of your suggestions, and sorry for my late response.

from libosmscout.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.