Code Monkey home page Code Monkey logo

Comments (3)

tmcw avatar tmcw commented on July 25, 2024

There's been a lot of discussion of this, and it doesn't seem like MBTiles should ever support multiple tilesets in one file: multiple tilesets are represented by multiple MBTiles files, and to add this to the spec would make it conceptually and technically more complex for no clear reason.

Is there a strong reason not to use multiple MBTiles files in this case?

from mbtiles-spec.

 avatar commented on July 25, 2024

I have some mobile app cases which require cross-dataset queries, so with multiple files it would be much slower. Samples:

  1. I use mbtiles as cache backend. Caching includes different sources or tiles, and I cannot mix them. I add "last used" field to tiles, but then to find out the oldest used tile for cache size control (invalidation) I need to check all database files. With one mbtiles file I could to it with one sql.

  2. I have tiles organized by packages. For example, user can download tile packages by state. I need to have some control over packages later, so user should be able to pick some to delete (to clean up memory). Sounds like good case for multiple sqlite files. In the other hand - when app shows map, then it should look like single seamless map, and to find any tile scanning through tens of sqlite database files (in the worst case) would be very slow on mobile. Or we would need to build some extra tile index layer.

    For both cases we could build solution by extending mbtiles physical tables within one sqlite file just as we need, and tiles would be just a standard view (which would work at least for case 2). In these cases use multiple files approach would not work.

    Whether these justify really to make standard spec more complex - I leave it up to you to decide.

from mbtiles-spec.

tmcw avatar tmcw commented on July 25, 2024

This could be handled with a prefix system in your app, or with in-house extensions to MBTiles. As it stands, these examples don't mesh with the way that MBTiles is architected and thought about, and the use cases of caching/packing don't mesh properly with the purpose MBTiles.

from mbtiles-spec.

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.