mapnik/bindings/python
Artem Pavlenko 4d4e9f5d91 Tiling patch from Toby allows for a selected pixel region within an extent
to be rendered. This allows for a large extent (larger than can be
rendered into a single image in memory) to be rendered out as tiles.
Since the full extent is used for the placement calculations text
crossing tile boundaries will be consistent.

This method is a little inefficient when a large number of labels need
placed, an improved method would be to cache these placements between
tiles, but the attached is a start.

c++ users should simple call the render method with a start X and Y
coordinate specified, 

for (int TileX = 0;TileX < 5;++TileX)
{
	for(int TileY = 0;TileY < 5; ++TileY)
	{
		int TileSize=250;
		int StartX = TileX*TileSize;
		int StartY = TileY*TileSize;
		
		Image32 buf(TileSize,TileSize);
		agg_renderer<Image32> ren(m,buf,StartX,StartY);
		
		ren.apply();
		char name[324];
		sprintf(name,"tile_%d_%d.png",TileX,TileY);
		ImageUtils::save_to_file(name,"png",buf);
	}
}

python users should call render_tile_to_file

for y in range(tile_count_y):
	for x in range(tile_count_x):
		if not os.path.exists("tiles/%d/%d/" % (map_scale, y)):
			os.makedirs("tiles/%d/%d/" % (map_scale, y))
		render_tile_to_file(m, x*tile_size, y*tile_size, tile_size, tile_size,
'tiles/%d/%d/%d.png' % (map_scale,y,x), 'png')
2006-12-01 09:37:37 +00:00
..
mapnik - Add projection support to the WMS server and edit ogcserver readme accordingly. 2006-10-19 01:25:24 +00:00
mapnik_color.cpp 1. move include to mapnik/include 2006-10-04 11:22:18 +00:00
mapnik_coord.cpp 1.added projection transformation support based on proj4 (new dependency!!!) 2006-10-16 13:44:52 +00:00
mapnik_datasource.cpp 1. hit_test implementation for geometry objects: 2006-11-25 11:02:59 +00:00
mapnik_datasource_cache.cpp 1. move include to mapnik/include 2006-10-04 11:22:18 +00:00
mapnik_envelope.cpp 1.added projection transformation support based on proj4 (new dependency!!!) 2006-10-16 13:44:52 +00:00
mapnik_filter.cpp 1. move include to mapnik/include 2006-10-04 11:22:18 +00:00
mapnik_font_engine.cpp 1. move include to mapnik/include 2006-10-04 11:22:18 +00:00
mapnik_image.cpp 1. hit_test implementation for geometry objects: 2006-11-25 11:02:59 +00:00
mapnik_image_view.cpp 1. hit_test implementation for geometry objects: 2006-11-25 11:02:59 +00:00
mapnik_layer.cpp Fix typo src -> srs property. 2006-10-18 23:57:44 +00:00
mapnik_line_pattern_symbolizer.cpp 1. move include to mapnik/include 2006-10-04 11:22:18 +00:00
mapnik_line_symbolizer.cpp 1.added projection transformation support based on proj4 (new dependency!!!) 2006-10-16 13:44:52 +00:00
mapnik_map.cpp 1. hit_test implementation for geometry objects: 2006-11-25 11:02:59 +00:00
mapnik_parameters.cpp 1. move include to mapnik/include 2006-10-04 11:22:18 +00:00
mapnik_point_symbolizer.cpp 1. move include to mapnik/include 2006-10-04 11:22:18 +00:00
mapnik_polygon_pattern_symbolizer.cpp 1. move include to mapnik/include 2006-10-04 11:22:18 +00:00
mapnik_polygon_symbolizer.cpp 1.added projection transformation support based on proj4 (new dependency!!!) 2006-10-16 13:44:52 +00:00
mapnik_projection.cpp 1. refactored proj stuff into separate files 2006-10-17 17:26:35 +00:00
mapnik_python.cpp Tiling patch from Toby allows for a selected pixel region within an extent 2006-12-01 09:37:37 +00:00
mapnik_query.cpp 1. move include to mapnik/include 2006-10-04 11:22:18 +00:00
mapnik_raster_symbolizer.cpp 1. move include to mapnik/include 2006-10-04 11:22:18 +00:00
mapnik_rule.cpp 1) Added line following labels. Use set_label_placement(POINT_PLACEMENT) or set_label_placement(LINE_PLACEMENT) on a text symbolizer. 2006-10-17 14:12:53 +00:00
mapnik_shield_symbolizer.cpp Added avoid_edges property to shield and text symbolizers. 2006-11-17 14:07:41 +00:00
mapnik_stroke.cpp 1.added projection transformation support based on proj4 (new dependency!!!) 2006-10-16 13:44:52 +00:00
mapnik_style.cpp 1. move include to mapnik/include 2006-10-04 11:22:18 +00:00
mapnik_text_symbolizer.cpp updated to reflect new params 2006-11-29 12:27:29 +00:00
SConscript 1. move include to mapnik/include 2006-10-04 11:22:18 +00:00