NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I searched TAGS for OFFLINE and IMAGERY and did not find anything.

I am trying to setup JOSM to cache IMAGERY for offline use. Do I have to set higher limits of TILE SIZE under PREFERENCES- IMAGERY PREFERENCES- SETTINGS, WMS Settings, Tile Size to some higher number (eg. 4096?) or MAXIMUM SIZE OF DISK CACHE in MB to 4096?

And if I set these higher levels, how to I define a AREA or POLYGON to download, and how do I define that I want MOST ZOOM LEVELS (at least from most detail to some higher levels).

When wroking offline, I do not want these map imagery files not to EXPIRE ( I will manually download new imagery when I get online again )

That way I can work OFFLINE with BING, WMS or TMS imagery OFFLINE and it will look like I am online.

asked 02 Mar '16, 19:02

gregcrago's gravatar image

gregcrago
69669
accept rate: 0%


One technique that I've used before (for mapwarper imagery, which is on a slow server and has a short cache retension policy) is to setup the map on marble, (pre)download the tiles in Marble, and then point JOSM at Marble's cache. This enables pre-downloading an area, and gives you greater control in how long the tiles are kept.

However, you can't setup Bing satellite on Marble, both because of a technical limitation and Bing's TOS restrictions. Try Mapbox imagery instead, which is often just as good or better than Bing, and technically usable in Marble. But you probably have to setup a Mapbox account to get your own access token for use in Marble, as reusing JOSM's access token probably goes against their TOS.

permanent link

answered 03 Mar '16, 11:26

Vincent%20de%20Phily's gravatar image

Vincent de P... ♦
17.3k18152249
accept rate: 19%

1

Could you show me the way to point JOSM at Marble's cache? I am using Windows 7, I have found the location of the cache directory. I have tried WMS using file:///c:\yourdirectory\{z}\{x}\{y}.extension scheme with the correct file extension. But it didn't load and threw out errors, please help me the correct way of doing it?

(06 Mar '16, 06:49) AkuAnakTimur
2

You need to use TMS, not WMS. Otherwise your config looks fine. I've re-tested this config and can confirm it works:

tms[20]:file:///home/myusername/.local/share/marble/maps/earth/openstreetmap/{zoom}/{x}/{y}.png

Not sure if "z" vs "zoom" makes a difference. You're apparently on Windows so the path is different. Make sure to view the area in Marble first. If it still doesn't work, run josm in a terminal to see what file it is trying to access.

(07 Mar '16, 11:26) Vincent de P... ♦

Have you fixed the OFFSET error yet? I am waiting to use offline maps, but I am waiting for someone to successfully download aligned maps. Anyone write up a procedure somewhere?

(10 Mar '16, 21:03) gregcrago

Moved the comment about offsets to its own question.

(10 Mar '16, 22:32) Vincent de P... ♦

AFAIK you can't just define a polygon and then automatically download the tiles inside with JOSM. I believe you have to set different preferences according to the kind of imagery (tiles or WMS), and you should (not completely sure, but it used to work like this) disable "auto zoom" for WMS.

I do have these preferences values:

cache.geoimage-thumbnails.expire=-1
cache.geoimage-thumbnails.maxsize=120

I also have this one set: imagery.wms.default_autozoom=false but it doesn't seem to work currently (see here)

You should not raise the tile size, but the tile cache size.

One way to use offline tiles is putting them into structured directories on your local disk, following the yourdirectory/{z}/{x}/{y}.png scheme. You can then add this as a layer by pointing to it from the preferences like this: file:///yourdirectory/{z}/{x}/{y}.png on unix-like systems, or similarly on Windows: file:///c:\yourdirectory\{z}\{x}\{y}.png. To get the pictures you can either tile big georeferenced images with gdal or use available tools to download tiles from the web (might not be allowed in many cases).

permanent link

answered 03 Mar '16, 10:41

dieterdreist's gravatar image

dieterdreist
3.7k113567
accept rate: 3%

edited 03 Mar '16, 12:04

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×106
×85
×83
×34
×7

question asked: 02 Mar '16, 19:02

question was seen: 6,227 times

last updated: 10 Mar '16, 22:32

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum