osm -> csv

This commit is contained in:
Dane Springmeyer 2013-07-13 18:34:04 -04:00
parent b47d874269
commit 83dc29f1a5

View file

@ -71,7 +71,7 @@ m.append_style('Style', style)
layer = mapnik.Layer('Layer') layer = mapnik.Layer('Layer')
layer.datasource = mapnik.Osm(file=os.path.join(dirname,"data/points.csv")) layer.datasource = mapnik.Datasource(**{file:os.path.join(dirname,"data/points.csv")})
layer.styles.append('Style') layer.styles.append('Style')
m.layers.append(layer) m.layers.append(layer)
@ -85,7 +85,7 @@ formatnode.fill = mapnik.Color("green")
format_trees = [ format_trees = [
('TextNode', mapnik.FormattingText("[name]")), ('TextNode', mapnik.FormattingText("[name]")),
('MyText', MyText()), ('MyText', MyText()),
('IfElse', IfElse("[nr] != '5'", ('IfElse', IfElse("[nr] != 5",
mapnik.FormattingText("[name]"), mapnik.FormattingText("[name]"),
mapnik.FormattingText("'SPECIAL!'"))), mapnik.FormattingText("'SPECIAL!'"))),
('Format', formatnode), ('Format', formatnode),