Cache WMS service locally on device

4563
6
Jump to solution
11-06-2014 05:02 AM
ThomasSvitil
New Contributor

Hi everyone.

Is it possible to cache WMS services locally and permanently on a iOS device? The map data is too big to store the whole map locally. 

Or is this only possible with WMTS services?

Thanks for your help!

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
KristofferStenersen
Occasional Contributor

You don´t need the server in order to cache the data - the clients may do this for you.

A tile can be built from a regular request to the WMS-service. All you need to know is the extent of the tile. This you can calculate from some well-known tiling scheme.

So, for an area of interest, calculate all the tiles/extends you´d like to prepare for offline, and download them all, and save them to the device in some nice z/y/x pattern so that it´s easy to fetch them later. 

Then, build a tiled layer using the same well-known tiling scheme. When this tiled layer requests data from the area of interest, return the tiles already stored from disk.

View solution in original post

6 Replies
KristofferStenersen
Occasional Contributor

One possible strategy is to use some well known tiling-scheme to build up a cache.

Then, download all required tiles for an area of interest onto the device - according to this scheme.

Add a tiled map service layer, consuming these tiles from local storage.

KristofferStenersen
Occasional Contributor

Hey Thomas Svitil Any luck on this topic? I do have a fair amount of experience on this subject and I´d be happy to detail a bit more on what we´ve been doing in our projects.

0 Kudos
ThomasSvitil
New Contributor

Hi Kristoffer Stenersen‌.

Thanks for your reply!

Basically i find your proposal interesting and it is definitely pointing in the right direction.

The problem is that i am only able to consume the given service (in this case WMS). I have no access to the server and the data and therefore i think it is not possible for me to build up a tiling-scheme to build up a cache. Up to this date i did not find any possibility to directly cache WMS services without additional processing. So as far as i know i have to give up on the idea or get the host of the data to convert it into WMTS (or at least to generate a tiling-scheme for the cache) . I hope my assumptions are right - please correct me if i am wrong. Thanks for your reply!

0 Kudos
KristofferStenersen
Occasional Contributor

You don´t need the server in order to cache the data - the clients may do this for you.

A tile can be built from a regular request to the WMS-service. All you need to know is the extent of the tile. This you can calculate from some well-known tiling scheme.

So, for an area of interest, calculate all the tiles/extends you´d like to prepare for offline, and download them all, and save them to the device in some nice z/y/x pattern so that it´s easy to fetch them later. 

Then, build a tiled layer using the same well-known tiling scheme. When this tiled layer requests data from the area of interest, return the tiles already stored from disk.

ThomasSvitil
New Contributor

Hi Kristoffer Stenersen‌.

Thank you very much for helping me out on this!

Do you have a link to useful resources about this topic? (calculating a well known tiling scheme and using it with arcgis.)

Have a nice one.

0 Kudos
KristofferStenersen
Occasional Contributor

Hi Thomas, there are some implementations out there doing similar stuff, for example the GeoWebCache. But I´d start at looking at the Tile Info section of an ESRI tiled map service layer definition, or the GetCapabilities´ TileMatrixSet for a WMTS service. It describes the tiling scheme for the service.

0 Kudos