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

I would like to make a map that showed only specific sorts of features, but using the basic OSM data for all of it, and I am asking how to set about doing so.

Specifically, I would like a map that showed land (eg the UK) with the ground shown as shaded terrain, and also water features (rivers, canals, lakes, sea shore) and nothing else.

Or another example: A map showing land in terrain-shaded form including contours, with all the railway lines present including any related names (e.g. stations), and nothing else.

I am not sure whether I am asking to be able to turn off layers - such as roads, political boundaries etc, or whether the OSM community uses another term for this. I don't want to have to define the "how" of what a thing looks like - I am happy to use an existing representation as appropriate.

Any thoughts?

asked 09 Aug '20, 00:36

rivimey's gravatar image

rivimey
11112
accept rate: 0%


OSM doesn't have "layers" in the GIS sense of the word. Different type of objects are indicated by different attributes ("tags") that are attached to object geometries.

You can naturally filter OSM data to just get geometries that you want. But if you want to make multiple different maps you probably would want to store the data in a database and select the geometries you want to render via SQL queries.

A number of points to note:

  • the geometries of objects in raw OSM datafiles is not "instantiated" except for Nodes, that means there are no linestrings for ways, that have to be either built after you extracted the OSM data you want, or when the data is imported in to the database (see for example osm2pgsql that does exactly that).

  • how to actually render the data depends on what kind of output you want to have. On the one hand you can generate raster images (like on openstreetmap.org) which are created by database queries and further rules on a server, or you could use vector tiles that are rendered on a client (typically in a browser), this has the added advantage that some of the data selection process is done in the client and is substantially more flexible due to that.

permanent link

answered 09 Aug '20, 15:06

SimonPoole's gravatar image

SimonPoole ♦
44.7k13326701
accept rate: 18%

Thanks for the reply. Is there a webite or program that can render OSM sata and allows the displayed tags to be filtered as you suggest?

I don't want to have to build my own application - I'm interested in the map, not the programming.

(09 Aug '20, 16:18) rivimey

This would depend on intended audience and technology.

But it sounds a bit as if you would be best served by a mapbox account or similar from other providers.

(09 Aug '20, 20:58) SimonPoole ♦
Your answer
toggle preview

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:

×69
×59
×34
×1

question asked: 09 Aug '20, 00:36

question was seen: 2,763 times

last updated: 09 Aug '20, 20:59

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