Archive

Posts Tagged ‘raster’

GRASS Extras — r.out.colorbar — Colorbar Export

May 13th, 2010 admin No comments

Introduction

The r.out.colorbar program is a simple export tool for saving GRASS raster colorbars. The program uses GTK+ and CairoGraphics to handle the image output.

Vertical Colorbar

Horizontal Colorbar

The colorbar is saved at a user defined size (in pixels) and orientation. The user can choose between 3 output formats supported by Cairo.

The output formats are:

  1. PNG Image with transparent background
  2. PDF document
  3. Encapsulated Postscript (EPS)

Requirements

The GTK+ development package must be installed in order to build r.out.colorbar. The Makefile uses:

pkg-config --cflags gtk+-2.0

and

pkg-config --libs gtk+-2.0

Building Source

  1. Download the source tarball here r.out.colorbar (50)
  2. Extract the tar file in the GRASS(v.6) source tree in the raster directory
  3. Change to the r.out.colorbar directory
  4. Run make to build the program

ToDo

  • Include category label support
  • Include custom labeling
  • Include units labeling
  • Add font options
Categories: GRASS Extras Tags: , , ,

GTK+ GRASS — Map Display

June 11th, 2009 admin No comments

The right pane of the GTK+ GRASS GUI displays several user controlled Map Layers. The map layers can be added or removed at any time. Each map layer has its own associated GRASS Region, and display list (previous post). To optimize drawing speed, the GTK+ GRASS GUI uses its own internal drawing routines for GRASS files and decorations. This may be changed with the new display used in GRASS7.

Display options include the usual interactive zoom window, zoom/out, and pan. The GRASS region can also be manually edited. The region can also be set to a raster or vector from the GRASS file selection view.

Display Toolbar

Display Toolbar

The map view can be maximized to fill the window, overriding the current GRASS region.

The position can be queried and captured, features can be measured, plus rasters and vectors can be queried from the display.

Display overlays (decorations) include:

  • Raster colorbar.
  • Vector legend.
  • Scalebar.
  • Grid.
  • Geographic grid.
  • Compass rose.
Categories: GTK+ GRASS Tags: , , ,