OpenEV Components


A complete description of GTK can be found at the GTK Website. A few points are noted here:


An example of OpenGL commands follows:
    if (view->dragging_mode)
        gvgeocoord x[4], y[4];

        gv_view_area_map_pointer( view, 
                                  view->state.mpos_x, view->state.mpos_y,
                                  x+0, y+0 );
        gv_view_area_map_pointer( view, 
                                  view->last_mpos_x, view->state.mpos_y,
                                  x+1, y+1 );
        gv_view_area_map_pointer( view, 
                                  view->last_mpos_x, view->last_mpos_y,
                                  x+2, y+2 );
        gv_view_area_map_pointer( view, 
                                  view->state.mpos_x, view->last_mpos_y,
                                  x+3, y+3 );

	glColor3f(1.0, 0.5, 0.0);
	glVertex2(x[0], y[0]);
	glVertex2(x[1], y[1]);
	glVertex2(x[2], y[2]);
	glVertex2(x[3], y[3]);
This is the piece of code that draws the little orange rectangle when you left-click and drag to zoom in on a region. It takes the corner coordinates of the area you dragged out, maps them into georeferenced coordinates (the gv_view_area_map_pointer calls), sets the drawing colour to orange (the glColor3f command), specifies that it is beginning to draw a closed loop (the glBegin call), draws the vertices, then ends the loop with glEnd. Mesa or your hardware driver provide the definitions of the OpenGL commands (glColor3f, glBegin, etc.). For more, see the gv_view_area_expose function in gvviewarea.c, or the draw functions in the layer c-code (gvrasterlayer.c, gvshapeslayer.c).


GTK defines gtk_drawing_area as a base class for widgets that need a box to draw into. gtkglarea extends this class to allow it to accept OpenGL commands for drawing. OpenEV's gvviewarea adds the concept of layers and tools, and adds the OpenGL commands necessary for georeferenced display, 3D, etc. For more information, see this site.


Proj is used by GDAL to do projection transformations, for instance between lat/longs and utm. OpenEV will function without proj, but in certain cases the georeferenced display will not be correct. For instance, when a georeferenced MFF2 file is read in, corner coordinates are specified in lat/longs even if the image is projected in utm coordinates. In the utm case, GDAL must convert the corner coordinates from lat/longs to utm prior to display so that the image does not appear incorrectly warped. Proj is used in this conversion. For more information see the Proj website.


Provides plotting functionality. This is used in OpenEV through the wrapper. For more information, see the Gnuplot website.

Developer Course Outline
OpenEV Help