NAME
Gtk2::Ex::Geo::Renderer - A Gtk2::Gdk::Pixbuf made from spatial data
SYNOPSIS
my $pixbuf = Gtk2::Ex::Geo::Renderer->new($layers,$minX,$maxY,$pixel_width,@viewport_size,$w_offset,$h_offset,@bg_color);
$pixmap = $pixbuf->render_pixmap_and_mask(0);
$image->set_from_pixmap($pixmap,undef);
Parameters
$layers
a ref to a list of spatial data layers, currently supported are Geo::Shapelib and Geo::Raster
$minX,$maxY
upper left coordinates of the world
$pixel_width
self explanatory
@viewport_size
width and height (in pixels) of the requested pixbuf
$w_offset,$h_offset
offset of the viewport in world coordinates
@bg_color
red, green, blue for the background (each in the range 0..255)
LAYER ATTRIBUTES
A Renderer object renders libral grids (via Geo::Raster) and shapefiles (via Geo::Shapelib). The following attributes are used.
all layers
HIDE = int
ALPHA = number, hash, or grid # float (0..1)
Geo::Raster
COLOR_TABLE = color_table *
GRID = grid *
FDG = if defined then calls render_fdg
Geo::Shapelib
Shapes
MinBounds = (minx,miny)
MaxBounds = (maxx,maxy)
ShowPoints = int # if true, renders unselected vertices as red crosses, and selected vertices as inverted crosses
Shapes from Geo::Shapelib
SHPType
Hide = int # if true, shape is not rendered
MinBounds = (minx,miny)
MaxBounds = (maxx,maxy)
Selected = int
SelectedVertices = (int,...)
Color = (r,g,b,a) # float in the range 0..1
Vertices
NParts
Parts