Presentation is loading. Please wait.

Presentation is loading. Please wait.

Geoinformatics tools with Perl: integration, development, needs

Similar presentations


Presentation on theme: "Geoinformatics tools with Perl: integration, development, needs"— Presentation transcript:

1 Geoinformatics tools with Perl: integration, development, needs
Goal: a programmable environment for geoinformatics data management, integration, analysis handle large and voluminous; complex and mixed format data sets program tools for web and GUI and CLI desktop

2 Use cases / requirements
An analysis / data processing tool which is used times, process lots of data in reasonable time, used from command line or in batch mode, max ~100 lines of code A functionality for a web site, do a well-defined task fast A data viewer which supports environmental modeling workflows A platform on which to implement a specific environmental model for a non-developer to use

3 Analysis of the requirements
use cases are from my work: research in / teaching (mostly environmental geospatial) analysis, modeling and management not much “production” use, which is(?) data editing cartographics well-defined workflows

4 Platforms 1. Perl, Python, Ruby, R Multiple OS
similar things are done in all these communities good: learn for other’s experiences bad: work done by others can’t be directly utilized Swig, .NET/mono??, R-Perl, Rpy, other? Write GdkMap and GtkMapWindow, which can be shared? Multiple OS Perl traditionally good MSWindows: my experience from MinGW rather positive

5 Platforms 2. Desktop / Web Perl tools good on server side in web
If functionality is in libraries or scripting languages, desktop and web stacks are quite similar below the layer which provides data for the UI My GUI toolkit choice: Gtk 2

6 libraries, fundamental tools
General architecture Perl modules Perl tools non-Perl tools libraries, fundamental tools

7 Stack Data viewing, exploratory GUI app w/ dialogs analysis, model use
Perl scripting for application development Gtk2::Ex::Geo::* Geo::Raster, .. Perl scripting for data analysis & modeling gdal, ogr, ... Perl scripting for data integra-tion & fundamental analysis libraries C, C++, .NET

8 libraries (libral) libral has structs for rasters and vectors in RAM
mainly raster ops rasterization create image pixbuf struct gdk-pixbuf libral GDALRasterIO OGR_G_GetX etc. GDAL OGR

9 libraries: discussion
export data from libral to GDAL and OGR image (map) creation is simplistic (but fast, does its job, and can be annotated on in upper layers) Should GEOS be integrated directly? Dependence on gdk-pixbuf is just the pixbuf struct, which is simple Recent discussion on gdal-dev on transparent tiled access to raster datasets from analytical environment (in C++)

10 gdal, gdalconst, ogs, osr Swig bindings to GDAL and OGR
Perl is supported by Swig => not much to do typemaps: small pieces of code to translate from C/C++ structs to Perl structs Makefile bootstrapping test code (create/read datasets, data sources, layers) some documentation

11 Swig bindings, discussion
Based on simplified / recreated shadow C++ API built on GDAL/OGR C API Memory management is different in C++ and in Scripting Languages –issue is not fully solved Perl Module, which Swig creates is not Perlish / easy to use => Modify Perl Swig bindings / Build yet another layer? Geo::GDAL

12 Classes with connection to spatial analysis and modeling

13 Perl modules Dialog modules in Gtk2::Ex::Geo:: Gtk2::Ex::Geo::Overlay
Gtk2::Ex::Geo::Glue Gtk2::ScrolledWindow Gtk2::Ex::Geo::Renderer Geo::Raster Geo::Vector Gtk2::Gdk::Pixbuf Geo::Layer (abstract) gdal, gdalconst, ogr, osr (Swig)

14 Modules, discussion Geo::Raster is an API for libral
How would Geo::GEOS fit into this picture? Visualization (map making, visual analysis, visual support for analysis & modeling) focuses on layers Modeling focuses on data and concepts (objects) A style descriptor class is missing from the picture I am planning a Geo::Colortable, which would be a first step

15 Intertwining capabilities: web, desktop
# create layers as an array of Geo::Layer objects, based on the GetMap request ... # create the pixbuf $pixbuf = Gtk2::Ex::Geo::Renderer->new # for web $pixbuf->save($filename,'png'); serve_document($filename); # a simple helper function

16 Intertwining capabilities: web, desktop
# user manipulates layers as an array of Geo::Layer objects ... # in Overlay class, create the pixbuf, make a pixmap and then image from it # the image is within the Gtk2::ScrolledWindow $pixbuf = Gtk2::Ex::Geo::Renderer->new($self->{layers}, $self->{minX}, $self->{maxY}, $self->{w_offset}, $self->{h_offset}, @{$self->{bg_color}}); $pixmap = $pixbuf->render_pixmap_and_mask(0); $self->{image}->set_from_pixmap($pixmap,undef); $self->{image}->set_alignment($xalign,$yalign);

17 Dialogs Dialogs for raster layers Dialogs for vector layers
open (standard file open) properties colortable clip (from GDAL to libral) Dialogs for vector layers open (custom: data source, layer, schema) properties, features, geometries rasterize (from OGR to libral)

18 Open a vector layer

19 Next steps Geo::GDAL, Geo::Colortable
Geo::GEOS (once GEOS 3 comes out and its Swig bindings stabilize) Better look into various types of geospatial simulation Top-Down: Supporting environmental planning, i.e., classes for entities like wetlands, snow measurements, ...


Download ppt "Geoinformatics tools with Perl: integration, development, needs"

Similar presentations


Ads by Google