Geoinformatica is a geospatial software toolkit, which builds on Perl, GTK+, GDAL, and libral. These pages document the Perl modules specific to Geoinformatica.
The source code for these modules and libral are developed at github. There are nightly snapshots available at http://geoinformatics.aalto.fi/files/Geoinformatica/snapshots/. In the same ftp site there are Windows binaries available.
Geo::Raster and Geo::Vector contain Perl interfaces and access to computational methods for geospatial data that are mainly in GEOS and libral. In the Gtk2::Ex::Geo namespace there are respective visual classes. The Gtk2::Ex::Geo contains also a set of widgets, dialogs, and glue code for managing a stack of geospatial data layers.
The Geo::OGC::Geometry is (or is intended as) a place for Perl-space geometry data storage and computational code.
The IPC::Gnuplot implements a simple pipe to a gnuplot program which can be linked to Gtk2::Ex::Geo::Glue for plotting.
A Geo::Raster object is either a temporary cache of one band of a GDAL raster dataset or an in-memory libral raster. In this documentation Geo::Raster objects are referred to simply as rasters. Technically a raster is a blessed reference to an anonymous hash. Generally, the user should treat the hash values as read-only or not access them at all and instead use the methods. Rasters are either integer or real valued. The Geo::Raster class provides many basic operators and functions for raster computations.
Many Geo::Raster methods can be used in-place or to return a value. For example:
- The raster operations and methods almost always make sense only if the raster is an in-memory libral raster. Technically GDAL rasters are libral rasters too, but the libral raster is only a snapshot created for display. To convert a GDAL raster to a libral raster in the GUI use the clip menu command and dialog.
takes sin of all cell values of $a, while
creates a new raster and assigns the sin values to it.
A raster is a rectangular matrix of cells. A cell is referred to by its coordinates, i.e., a list ($row, $column) or ($i, $j). For example:
@cell = (30, 40);
$value = $a->get(@cell);
The world coordinates of a raster are simple linear transformations from the (row, column) cell coordinates. x has the value min_x on the left edge of the leftmost column and each cell is cell_size wide. y has the value min_y on the bottom edge of the lowest row and the height of each cell is cell_size.
- Usually, if operations involve more than one raster, then the rasters need to be overlayable, i.e., their sizes and world coordinates must match.
A Geo::Vector object (a blessed reference to an anonymous hash) is a either an extra layer on top of an OGR layer or an array of OGR features.
The Gtk2::Ex::Geo modules provide a plaform for developing geospatial applications.
- For maintenance the Geo::Raster class is split into several files. These files appear as subclasses of Geo::Raster in this documentation, but technically there are only classes Geo::Raster and Geo::Raster::Layer.
The Gtk2::Ex::Geo::Layer is an abstract base class for geospatial data layers, it itself is a subclass of Geo::Layer. There are also classes Gtk2::Ex::Geo::Raster and Gtk2::Ex::Geo::Vector, which derive also from Geo::Raster and Geo::Vector.
The Gtk2::Ex::Geo::Overlay is a widget class derived from Gtk2::ScrolledWindow. Gtk2::Ex::Geo::Overlay objects maintain a list of geospatial data layers. The Gtk2::Ex::Geo::Overlay class contains a method for rendering the data onto a geocanvas that is first a cairo surface and then a gdk pixbuf. It also contains methods for user interaction with the widget: zoom, pan, select.
The Gtk2::Ex::Geo::Glue is for maintaining a set of objects: Gtk2::Ex::Geo::Overlay, Gtk2::TreeView, Gtk2::Entry, Gtk2::Toolbar, and Gtk2::Statusbar and linking them. Gtk2::Ex::Geo::Glue can be used to maintain a link to a gnuplot instance.
Generated on 31 Dec 2013 for Geoinformatica by