I have a rendering problem with the mapnik GEOS plugin. I try to input a polygon WKT definition containing floats with around 16 digits. Mapnik however does not render these. When I decrease the number of digits to 5 it does work. Does anybody have a solution?
mmap.background = mapnik.Color('steelblue') s = mapnik.Style() r = mapnik.Rule() polygon_symbolizer = mapnik.PolygonSymbolizer(mapnik.Color('#f2eff9')) r.symbols.append(polygon_symbolizer) [ more style here ] mmap.append_style('My Style',s) wkt_geom = 'POLYGON ((5.12345 51.6, 6.8 52.6, 7.8 51.6, 5.12345 51.6))' #DOES WORK wkt_geom = 'POLYGON ((5.123456 51.6, 6.8 52.6, 7.8 51.6, 5.123456 51.6))' #DOES NOT WORK layer = mapnik.Layer('wkt_layer_bla','+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +towgs84=565.417,50.3319,465.552,-0.398957,0.343988,-1.8774,4.0725 +units=m +no_defs') layer.datasource = mapnik.Geos(wkt=wkt_geom) layer.styles.append('My Style') mmap.layers.append(layer) mmap.zoom_all() mapnik.render_to_file(mmap,'/foo/bar/bla.png', 'png') 