While designing a fantasy map, I got some strange unconsistent behaviors with my OSM file when processing it with mapnik (not from a database, from the .osm file in command line)

I made some parts with the "natural"="fell" tag. One is made of 39 nodes, an other one is 70 nodes and a third one is 6 nodes. Only the first "fell" is displayed. When I move a single node in the third fell, making it slightly more pointy, then it is displayed like the first one.

I tried to alter the scaledenominator (also to remove them), but it was useless. The rule is quite simple:

<Filter>[landuse] = 'fell' or [natural] = 'fell'</Filter> 
      <MaxScaleDenominator>20000000</MaxScaleDenominator>
      <MinScaleDenominator>0</MinScaleDenominator>
      <PolygonSymbolizer>
        <CssParameter name="fill">#8dc56c</CssParameter>
     </PolygonSymbolizer>
    </Rule>
    <Rule>
      <Filter>[landuse] = 'fell' or [natural] = 'fell'</Filter>
      <MaxScaleDenominator>20000000</MaxScaleDenominator>
      <MinScaleDenominator>0</MinScaleDenominator>
      <PolygonPatternSymbolizer file= "/temp/mapnik/symbols/forest.png" type="png" width="21" height="24"/>
    </Rule>

What can it be?

asked 16 Apr '11, 22:00

otto's gravatar image

otto
221447
accept rate: 0%


The osm plugin in mapnik is not a drop in replacement for a proper postgis db. I read it's also missing (parts of) relation handling.

Also, the osm.xml stylesheet is not maintained with the osm plugin in mind, and this can also lead to strange behaviours, dropped items and other assorted rendering quirks.

permanent link

answered 20 Apr '11, 22:04

Lennard's gravatar image

Lennard
9115
accept rate: 0%

Thank you for telling me about those problems. I hadn't read there was limitations, but I find it now: http://wiki.openstreetmap.org/wiki/Mapnik:_Rendering_OSM_XML_data_directly#Limitations I've tried to separate my elements into different layers, but it seems it's not much better, only one element is shown according to the order it is called. If you're curious or willing to help, here is the archive of my tests so far: http://dl.free.fr/hAVI7ezre

(21 Apr '11, 19:51) otto

I don't know about the stylesheet part, but I would double check if these areas are correctly drawn (first and last node of the way is the same node)

permanent link

answered 17 Apr '11, 20:32

RM87's gravatar image

RM87
3.3k23553
accept rate: 22%

It can't be, because for the same shape, one time it's rendered, another time, when I move a single node a few miles away, it's not.

After some investigations, I noticed some elements are preventing the others to render, for example I have a "natural=peak" above a "fell" which prevents another fell to be displayed (except if I make it bigger).

When I remove all the other elements, the 3 "fells" are correctly displayed.

(17 Apr '11, 22:40) otto
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:

×327

question asked: 16 Apr '11, 22:00

question was seen: 4,001 times

last updated: 21 Apr '11, 19:51

powered by OSQA