mapnik/plugins/input/raster
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
..
raster_datasource.cpp 1. hit_test implementation for geometry objects: 2006-11-25 11:02:59 +00:00
raster_datasource.hpp 1. hit_test implementation for geometry objects: 2006-11-25 11:02:59 +00:00
raster_featureset.cpp Tiling patch from Toby allows for a selected pixel region within an extent 2006-12-01 09:37:37 +00:00
raster_featureset.hpp 1. move include to mapnik/include 2006-10-04 11:22:18 +00:00
raster_info.cpp changing licence from GPL to LGPL 2006-03-31 10:32:02 +00:00
raster_info.hpp changing licence from GPL to LGPL 2006-03-31 10:32:02 +00:00
SConscript 1. move include to mapnik/include 2006-10-04 11:22:18 +00:00