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

Hi:

Suppose there are so many features(say they are pois) in a single tile, then how does osm handle the overlap problem?

I know osm use mapnik as the render engine, and we can set some filters during the rendering at different zoom level, but how about the filter lost the effects?

For example, in a specified zooom, even we use the filter, there are still some features close to each other, if render all of them, there must be some overlap, so how does osm handle this suitation?

asked 21 May '14, 06:58

hguser's gravatar image

hguser
36336
accept rate: 0%

edited 21 May '14, 08:21

scai's gravatar image

scai ♦
33.3k21309459


Mapnik, by default, does not draw overlapping features for icons and text symbolizers. So the features in the first layer are drawn first, one-by-one, and if there is no space remaining then they are not drawn.

This means that the order of the layers, and the order of the features within the layers, are important.

permanent link

answered 21 May '14, 11:38

Andy%20Allan's gravatar image

Andy Allan
12.5k23128153
accept rate: 28%

1

Do you mean that mapnik draw all features in layer A, and it will process overlap for this layer(A), once it start to render the next layer(B),for a given feature from B,mapnik will detect if the place have been taken up by other rendered feature, if not , then render this feature? If so, does it mean that the conflict(overlap) detect just happen between features in the same layer?

(22 May '14, 12:00) hguser

By default mapnik has just one collision detection cache, which records the placements across all the layers (so that e.g. text in the roads layer avoids text from points of interest). It's possible to reset the cache between layers, but that usually leads to poor results.

(28 May '14, 09:23) Andy Allan

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
×341
×16
×6

question asked: 21 May '14, 06:58

question was seen: 4,370 times

last updated: 28 May '14, 09:23

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