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

Hi,

I'm new to this project and was wondering if there is any way in the API or otherwise (like tag in url) to not display the country boundaries and their names but display every thing else ? Any mechanism to filter out those two layers on the fly ?

Thanks Jeff

asked 18 Mar '16, 18:52

Jeff_Lacoste's gravatar image

Jeff_Lacoste
46225
accept rate: 0%

edited 19 Mar '16, 08:42

SimonPoole's gravatar image

SimonPoole ♦
44.7k13326701

Thanks every one for your responses. It was very helpful. If needed I'll post new questions but not in this thread. Thanks again.

(20 Mar '16, 13:47) Jeff_Lacoste

No. The maps consist of images that have been created and cached; allowing you to switch individual layers on and off would mean we'd have to store many more cached versions, or compute them whenever someone requests them, which would need more resources than we have.

But all is not lost, you can set up your own tile server that creates maps without these features, or indeed with any style changes you like! Seach for "render my own map" in this help system or consult switch2osm.org for details.

With luck you find someone who has already made a map like the one you are looking for, and is allowing you to use it - for example How to hide all labels of OSM which discusses a label-less map.

permanent link

answered 18 Mar '16, 18:56

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

Thank you !

(18 Mar '16, 19:14) Jeff_Lacoste

It is possible to filter out the names on the fly, but only on the way into the rendering database. Obviously this is only an option if you're rendering maps on your own server.

A basic guide to setting up your own server is here. When you load the data you have an option of using a script to do things with tags on the way into the database (osm2pgsql, used for database loading, ships with an example). This is something I do when I create tiles for my own use, the procedure is described on this page. The tag transform script that I use is this one (but you'd want to create something much simpler) and the section that removes admin boundaries is here.

Obviously http://www.openstreetmap.org/ is only one way of many that users see OpenStreetMap data, and there are equivalent mechanisms for some of the others too. For example, for OsmAnd you can create your own data files and have some control over what gets displayed.

permanent link

answered 18 Mar '16, 19:35

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866
accept rate: 16%

Instead of rendering bitmaps that are static, you can alternatively use vector data and vector graphics.

See Vector_tiles in the OSM wiki for a collection and overview, or the mentioned osm2vectortiles.org.

With those solutions you should be able to change the map styling on-the-fly, so let any names or boundary lines disappear.

permanent link

answered 19 Mar '16, 11:51

stephan75's gravatar image

stephan75
12.6k556210
accept rate: 6%

What osm2vectortiles.org seems to be missing is any kind of "how to" information. The site offers commercial support, which is fine, but other than that this isn't something that's an answer at the level that this question is asked at.

For example, http://osm2vectortiles.org/docs/start/ has some instructions, which include "docker run (something)". Most people who try and follow those instructions will simply get some sort of "not found" or "not installed" message - it's simply not pitched at that level.

(19 Mar '16, 12:22) SomeoneElse ♦

Thanks 'Stephan75' for the pointers about vector tiles. Do you happen to know if there is a tool or a way to let's say after downloading an mbtiles file for a country or world, to hide a layer ? Is MapBox the only way to do it ? Upload the tiles to MapBox, do the editing there (hide layers if mbtiles are organized as layers and not one huge layer) and styling then export the touched mb tiles to a new mb tiles ?

Thanks

(19 Mar '16, 15:29) Jeff_Lacoste

I downloaded one country mb tiles and tried to upload it to mapbox. The download failed at the end with error stating that some tiles are too dense: "Tile exceeds maximum size of 500k at z5. Reduce the detail of data at this zoom level..".

As it stand the tiles are they are not usable by MapBox for uploading and eventually editing (hide some layers).

(19 Mar '16, 17:48) Jeff_Lacoste

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:

×92
×63
×18
×9

question asked: 18 Mar '16, 18:52

question was seen: 9,219 times

last updated: 20 Mar '16, 14:19

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