artemp/tickets2issues — Issue #446: SQLite Problem On Windows XP
Author: artemp
Created: 2011-10-11 15:18:32+00:00
State: open
Labels: Core_Library

Creating and rendering a SQLite layer results in a blank map. Rendering the same data from a shapefile works.

Test script:

{{{
from mapnik import *
m = Map(800,600,"+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs")
m.background = Color('white')
sqlite_lyr = Layer('SQLite')
sqlite_lyr.srs = "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"
sqlite_lyr.datasource = SQLite(file='main.db', table='tours',
key_field='ROWID', geometry_field='the_geom',
extent='-110.801,32.2257,-110.799,32.2263')
sqlite_style = Style()
sqlite_rule_on = Rule()
sqlite_rule_on.symbols.append(PolygonSymbolizer(Color(250, 190, 183)))
sqlite_style.rules.append(sqlite_rule_on)
m.append_style('test style', sqlite_style)
sqlite_lyr.styles.append('test style');
m.layers.append(sqlite_lyr)
m.zoom_to_box(Envelope(-110.801,32.2257,-110.799,32.2263))
im = Image(m.width,m.height)
render(m, im)
im.save('demo.png', 'png') # true-colour RGBA
save_map(m,"map.xml")
}}}