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

Hi:

I have a question about the features rendering in osm.

1 Lines

For a given feature like a highway, it contains so many nodes, so it would be find to render it in a large zoom level, but I wonder if osm simplify the data when the same feature is rendered in a small zoom level?

Since in my opinion render the same number of points in a small zoom have two drawbacks:

1.1 Unnecessary resource consume

In a small zoom, the points are too close to another, it would be hardly to different two points by human. But the more the points to be rendered, the more resource will be used.

1.2 The line will seem to be not smooth

Since in a certain distance(in pixel), there maybe too many points drawn, so the line may not have a nice look and feel.

I wonder how does osm handle this kind of problem,or do I miss anything?

asked 04 Jun '14, 01:14

hguser's gravatar image

hguser
36336
accept rate: 0%

edited 04 Jun '14, 01:19

to which renderer or rendering style are you referring to?

(04 Jun '14, 01:22) aseerel4c26 ♦

Are there any differences between different style? I thought the render mechanism would be the same. :(

(04 Jun '14, 01:29) hguser

Not in answer, but just for info, here is the renderer wiki link http://wiki.openstreetmap.org/wiki/Renderer

(04 Jun '14, 03:30) nevw

Remember that a simplification process also uses resources, so it's not always worth the effort.

(04 Jun '14, 07:39) scai ♦

The question you are asking applies to rendering, i.e. the drawing of maps from OSM data. There are many different rendering programs out there and most of them are not OSM specific; so your question cannot be answered in general.

The specific rendering engine used on the openstreetmap.org web site is called Mapnik and usually works in conjunction with a spatial database; OSM data is imported into the database, and then loaded and drawn.

There are three ways how data can be simplified before drawing in this scenario -

  1. simplify data upon import into the database, by creating separate tables with generalised versions of some features. The software osm2pgsql that is used for importing the data here does not support that. Other database importers like imposm do, so if this is a matter of concern for you you might want to give imposm a try.

  2. simplify data with a separate process and write it into shape files, from where it can be loaded in addition to things from the database. This is a method that we use for drawing the land outlines; a simplified landmass polygon shape file is created regularly (see www.openstreetmapdata.com).

  3. simplify data at the moment when the rendering engine requests it from the database. This is supported by Mapnik but whether the feature is used depends on the map style in question; to my knowledge our standard map style (see github.com/gravitystorm/openstreetmap-carto) does not make use of it.

permanent link

answered 04 Jun '14, 06:40

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

Thanks for your reply. In fact, I know mapnik, and I have used it in our project. While when I post this question, I want to now how does the osm handle this for generating tiles used at www.openstreetmap.org. From your answer, it seems that the standard map(style) does not simplify the data, isn't it?

(05 Jun '14, 11:35) hguser

As written above in point 2: Only for the landmasses.

Also see this similar question.

(05 Jun '14, 12:37) cartinus

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:

×440
×8

question asked: 04 Jun '14, 01:14

question was seen: 3,743 times

last updated: 05 Jun '14, 12:37

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