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 ♦
32.5k20297452


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.2k23123151
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
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:

×418
×337
×16
×5

question asked: 21 May '14, 06:58

question was seen: 3,378 times

last updated: 28 May '14, 09:23

powered by OSQA