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

Hi,

Firstly i want to say fantastic job with OpenStreetMap a great resource and it has allot of potential.

I have 1 long question but will require 2 answers please.

Firstly...

I would like to host a stripped down version of OpenStreetMap in an offline application, i need only the top 6 zoom levels/layers of the world, i don't need any other data like cycle routes etc.

Can i do this? and if so how? i appreciate their is allot of information on the site but its better to get direct information than assuming i know the best way to do things.

The app will be an html and javascript app where locations will be overlayed so the user can select a location and that user action will carry them off into the application.

Secondly... If i can do this what restrictions will i have to abide to license wise?

Sorry to be vague but i'm trying not to over complicate the question.

Thanks

asked 09 Oct '13, 11:28

csharper2013's gravatar image

csharper2013
11113
accept rate: 0%

edited 09 Oct '13, 13:32

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866

2

What do you mean by "top 6 zoom levels"? Do you mean the rendered images displayed on OpenStreetMap.org on levels 1 to 6 (which would be from http://www.openstreetmap.org/#map=1/-7/-64 to http://www.openstreetmap.org/#map=6/38.065/-74.169)?

(09 Oct '13, 14:03) gormo

If you really do only want the top six zoom levels (levels 0-5), I would suggest - and this is probably the first time I've ever suggested this :) - 'scraping' the tiles from the server. That is, simply downloading them once and storing them on your hard drive.

You can use any scripting language for this (Ruby, Python, Perl, PHP, whatever). To find the URL for each tile, consult this page on the OSM wiki. At zoom levels 0-5 I think the MapQuest Open tiles (made from OSM data) look significantly better than the OSM Standard layer, so you may want to consider using those; they use the same numeric URL layout for each tile. To reduce server load, make sure that your script runs at a fairly slow speed; putting an instruction such as 'sleep 1' after each fetch will help here.

For the avoidance of doubt, the above advice does not apply to anyone wanting to get zoom levels greater than 5. In that case, you should set up your own rendering server.

How you then use these tiles in your application depends what platform you're developing for. However, if (as you say) it's essentially HTML and JavaScript, you should look at Leaflet which is the standard library for interaction with OSM map tiles.

As your use is of our map data at such a small scale, you are very unlikely to trigger any 'sharealike' copyright requirements. Your one copyright requirement is therefore attribution - that is, giving credit. You must give credit to OSM as detailed on the copyright page; additionally, if you use MapQuest tiles, you must also give them credit as per their guidelines.

permanent link

answered 09 Oct '13, 13:50

Richard's gravatar image

Richard ♦
30.9k44279412
accept rate: 18%

edited 09 Oct '13, 21:35

I would like to host a stripped down version of OpenStreetMap in an offline application, i need only the top 6 zoom levels/layers of the world

First, I'll assume that you're talking about map tiles organised in a similar way t o the OSM map tiles that you see on openstreetmap.org. There are other ways of presenting OSM data to people, especially in an offline application, but let's assume "map tiles" for now since you've said "6 zoom levels" in the question.

This is the lowest zoom level that the map tiles on osm.org support and this is the 6th lowest. Note the number after "map=" in the URL. Tiles on the OSM "standard" map are rendered to zoom level 19. You'll presumably want to generate some times and package them with your mobile application. Depending on the target market, all the tiles worldwide for zoom levels 0-5 might be a bit large - someone who's generated them previously might be able to say how big.

In order to create the tiles, you'll first want load a rendering database with data. Have a look at one of the "building a tile server" options here. Currently this doesn't use exactly the same method as the OSM "standard map" (people are in the process of updating it) but it's a good place to start for now. If you follow the "building a tile server" instructions as they stand now, you'll also get a "generate_tiles.py" python script that you can edit to generate tiles from your rendering database for the areas and zoom levels that you're interested in.

In order to access the data in your offline application have a look at one of the "using tiles" pages here. I haven't tried OpenLayers, but it's pretty straightforward to have Leaflet offline use offline data - in fact here's one that I made earlier.

Secondly... If i can do this what restrictions will i have to abide to license wise?

Hopefully you'll find all the information that you need about that here:

http://www.openstreetmap.org/copyright

permanent link

answered 09 Oct '13, 13:55

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866
accept rate: 16%

1

If you do set up a rendering database (which I think is probably overkill for this application), Natural Earth is a better source than OSM at this scale: http://www.naturalearthdata.com/

(09 Oct '13, 14:17) Richard ♦

@Richard - Very possibly, but given that zoom level 5 really isn't very zoomed in at all I suspect that some higher zooms might actually be needed once someone sees the results.

(09 Oct '13, 14:30) SomeoneElse ♦
3

Awesome you guys are very helpful thank you for the info where do i donate?

(09 Oct '13, 16:27) csharper2013
(09 Oct '13, 17:10) SomeoneElse ♦

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:

×155
×11

question asked: 09 Oct '13, 11:28

question was seen: 4,996 times

last updated: 09 Oct '13, 21:35

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