Archive

Posts Tagged ‘gtk’

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+ MB-System — GUI Layout

June 11th, 2009 admin No comments

The GTK+ MB-System GUI consists basically of a toolbar at the top, a left pane for file names, and a right pane for data display.

The left pane displays a GTK liststore consisting of a checkbutton, file name and path, and format ID. If an individual file is loaded, it is automatically added to the list. The list can be saved and reloaded for future use. The saved file list is compatible with other MB-System commands such as mbset, mblist, etc.

The right pane displays the loaded data in a split screen. The top of the right pane displays a plan view of the loaded data. The bottom of the right pane displays the alongtrack profile view of the loaded data. The exaggeration of the alongtack profile can be increased by simply dragging the pane up.

Categories: GTK+ MB-System Tags: ,

GTK+ GRASS — Display List

June 11th, 2009 admin No comments

Each GRASS object (eg. raster) or decoration (eg. scalebar) that is drawn is automatically added to the display list. The display list is stored in a GTK+ liststore which is displayed in the left pane of the GTK+ GRASS GUI.

GTK+ GRASS with Display List shown on left

GTK+ GRASS with Display List shown on left

The left pane is a tabbed window switching between a treeview of the available GRASS files and the display list. Each tabbed map layer (right hand pane) has its own display list.

Items in the display list can be turned on or off, using a checkbutton. The draw order can also be changed by dragging the item to a new location. Double clicking an item brings up the property editor for the selected layer (eg. vector property).

The display list can be saved as an XML file, which can be reloaded at any time.

Each re-draw event (eg. zoom, pan, etc)  erases the display and draw all the selected items in the display list.

Categories: GTK+ GRASS Tags:

GTK+ MB-System — About

June 11th, 2009 admin No comments

Introduction

The GTK+ interface to MB-System provides a graphical user interface (GUI) for the mbio library and commonly used programs in MB-System. The interface was started to provide a color, cross-platform, multibeam editor that had a switchable bathymetry and backscatter view.

Bathymetry Display

Bathymetry Display

The multibeam editor simultaneously displays data in plan view and profile view. Each editor pane is re-sizable according to the users preferences (i.e. draggable).

After loading a file, the user can switch between bathymetry and backscatter views (if available).

The bathymetry data are displayed as color-coded depth points using a rainbow colortable. The backscatter data are displayed as color-coded amplitude values using a grey colortable.

GTK+ MB-System is written as a Glade project using the GTK+ programming language.

Backscatter Display

Backscatter Display

The interface has been tested and run on Linux (OpenSuse) and WIN32 platforms.

Features

The GTK MB-Process features include:

  • Split window that displays color-coded bathymetry in cross-section and plan views.
  • Simple switch between color bathymetry and grey backscatter (if available in multibeam data).
  • Edit mode switchs between read only and read/write.
  • Beam flagging or unflagging by clicking beams or selecting an area (box) in both views of the split window.
  • Filters by beam number and spike size.
  • Easy file navigation by dragging the ping number scalebar.
  • Options for beams displayed, beams stepped, and colors.
  • Easy point-and-click access to data file list.

The features listed above plus new features will be described in greater detail with future postings.

Categories: GTK+ MB-System Tags: , ,

GTK+ GRASS — About

June 11th, 2009 admin No comments

Introduction

As a “proof of concept”, Tekmap Consulting tested the GTK+ toolkit as a possible tool for developing a graphical user interface (GUI) for the GRASS software. From that “proof of concept”, the GRASS Interface has continued to grow.

GTK+ Interface to GRASS

GTK+ Interface to GRASS

The basic concept for the GRASS Interface is to provide easy point-and-click access to GRASS files. The interface builds common GRASS commands around the selected file(s). For example, a single click to set region to raster(s), erase display, and draw.

The main window consists of two panes: a GRASS file list and a tabbed display window.

The GRASS file list, in the left pane, is always visible to the user as a collapsible tree view. The display window, in the right pane, consists of multiple tabbed pages. These tabbed pages let users easily switch between different regions, display sets, and 3-D views.

The interface was developed as Glade project written in GTK+. The GUI can be built with the optional Gtk OpenGL extension. The OpenGL extension provides a 3D interface to the GRASS ogsf library.

The interface has been tested and run on Linux (OpenSuse) and Windows (XP) operating systems.
Read more…

Categories: GTK+ GRASS Tags: , ,

Profile Plotter — About

June 10th, 2009 admin No comments

Introduction

The GTK+ Profile Plotter is a stand-alone program designed to plot geographic cross-section data in a variety of formats. The Profile Plotter reads distance, elevation, and optionally color. The elevation plots relative to the distance, at a user controlled vertical exaggeration.

GTK+ Profile Plotter

GTK+ Profile Plotter

The program was originally developed to handle output from the GRASS program r.profile with the “-c” flag set. The original concept was to create a color-coded cross-section at a user defined vertical exaggeration that matched the GRASS raster map.

The program accepts numerous ASCII, space separated data. The Profile Plotter has been tested on both Linux and Windows XP systems.

Features

The Profile Plotter features include:

  • Support for 5 ASCII data formats.
  • Control for vertical exaggeration and image/plot size (pixels).
  • Control of plot options including: axis min/max, axis color, and axis grid size.
  • Save and open eXtensible Markup Language (XML) plot files.
  • Save profile image as a Portable Network Graphics (PNG).
  • Save over-sized profile image to tiles for printing over multiple pages.

The features listed above plus new features will be described in greater detail with future postings.

New

Added set profile size according to map scale option.

June 17, 2009

Categories: Profile Plotter Tags: , ,