Map Tiles to go

Back in February of this year we worked with the World Bank, USAID, and CrisisCommons to deploy a large amount of map imagery and tiles to the Haitian Government and clusters working in relief. We included a forked version of crschmidt's haitibrowser to work offline on USB sticks.

One of the issues we encountered were the vast amount of pre-rendered tile images that needed to be moved to the device. The overall size was not that large - in the hundreds of megabytes. It was the number of files that caused issues in copying and replicated these USB sticks in order to aid in the proliferation of data.

I've long been an ardent supporter of SQLite and Spatialite as Open Data containers for geospatial data. It's a portable, offline, open standard, relational data store that provides great access and compression. About a year ago we even added Spatialite support to GeoCommons - so anyone can convert data to a SQLite database.

Almost exactly three years ago, Mikel put OSM on the iPhone after realizing that Apple was using SQLite to store the tile cache for maps. It makes simple sense to put blobs of images inside a table schema for fast storage and retrieval.

Earlier this week Development Seed released a command-line toolset called MBTiles to bundle tiles into SQLite. You can get the source code here. It's great to finally have the beginnings of a set of tools to better utilize SQLite for storing and sharing tilesets.

Chris Schmidt has shared his ideas and added broadening support to TileCache in support of storing tiles in SQLite so that anyone using TileCache can now easily load tiles offline.

I'm excited to see more adoption of easy mechanisms for interchanging data - raster and vector. We have a couple of ideas and things brewing in how to combine these tiles with other vector data as well as rendering that could really provide some good mechanisms for open spatial data stores.

About this article

written on
posted in StandardsData Back to Top

About the Author

Andrew Turner is an advocate of open standards and open data. He is actively involved in many organizations developing and supporting open standards, including OpenStreetMap, Open Geospatial Consortium, Open Web Foundation, OSGeo, and the World Wide Web Consortium. He co-founded CrisisCommons, a community of volunteers that, in coordination with government agencies and disaster response groups, build technology tools to help people in need during and after a crisis such as an earthquake, tsunami, tornado, hurricane, flood, or wildfire.