Missing road data from PNG rendered with Mapnik

18 views
Skip to first unread message

Christopher Poenaru

unread,
Apr 13, 2017, 5:53:09 PM4/13/17
to Tilestache
Hello,

I am trying to use Tilestache to serve PNGs rendered with Mapnik.

I setup Mapnik, constructed an XML and tested it out. I'm able to generate an image that I was expecting (see below). 

However, when I run this in Tilestache with the same XML file I am not able to see any of the road data that I was looking for (just the blue map background). 

Here is what the image looks like when rendered with Mapnik: 


and code I used to render this:  

import mapnik

mapfile
= 'styles/osm-bright/OSMBright/OSMBright.xml'

m
= mapnik.Map(2000,1000)
mapnik
.load_map(m, mapfile)

bbox
= mapnik.Box2d(-80.6, 43.5, -80.46, 43.43)  # 00
m
.zoom_to_box(bbox)

mapnik
.render_to_file(m,'waterloo_osmbright.png', 'png')
exit()

I've attached the XML I'm using for mapnik. Here is my tilestache config:

{
  "cache":
  {
    "name": "Disk",
    "path": "my_cache",
    "umask": "0000",
    "dirs": "portable"
  },
  "logging": "debug",
  "layers":
  {
    "roadquality": {
      "provider" : {
        "name": "mapnik", "mapfile": "/home/christopher/mapnik-stuff/styles/osm-bright/OSMBright/OSMBright.xml"
      },
      "projection": "WGS84",
      "metatile":
      {
        "rows": 4,
        "columns": 4,
        "buffer": 64
      },
      "preview":
      {
        "lat": 43.4720,
        "lon": -80.5291,
        "zoom": 15,
        "ext": "png"
      }
    }
  }
}


Has anyone experienced this before, or could potentially point out something I'm missing?

Thanks!
OSMBright.xml
Reply all
Reply to author
Forward
0 new messages