Welcome on the OrbisGIS’s documentation!

Introduction

Here you will find a documentation for both users and developers of OrbisGIS.

OrbisGIS

OrbisGIS is a free and open-source Geographic Information System, developed by researchers and mainly dedicated to research issues. The official website is http://www.orbisgis.org/.

All the sources of this project can be found on the GitHub account.

Licence

Except where otherwise noted, this documenation is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 (CC-BY-NC-SA) International License.

User documentation

In this part, we present the basis of OrbisGIS (how to launch, to discover and to use the application).

Installation

Requierement

Before using OrbisGIS, you must ensure that you are running at least the JAVA 7 virtual machine (openJDK or Oracle).

Download

To download OrbisGIS, just consult the official website here.

Execute

OrbisGIS is a standalone application. It means that, if you want (see Ubuntu PPA repository), no installation is needed. In addition, it also means that you can play with OrbisGIS without any “administrator” rule !

Once the orbisgis-bin.zip file downloaded, just unzip the file.

Zip folder

In this folder, you can just focus on:

  • orbisgis.sh : the Linux and iOS launcher,
  • orbisgis_safemode.sh : the same, but in “safemode”,
  • orbigis_windows.bat : the Windows launcher,
  • orbigis_windows.bat : … in “safemode”,
  • orbisgis.jar : the application itself.

Note that “Safemode” is only useful when OrbisGIS does not start successfully. Running this file will uninstall all plugins and former OrbisGIS modules.

To launch OrbisGIS, you have the choice between:

  • a double-click on the .jar file,
  • for Windows, double-click on the .bat file,
  • for Linux and iOS, double-click on the .sh file.

Remarks

  • “execution rights” are sometimes needed.
  • If you want to specify the jvm memory size, please consult this page on the OrbisGIS wiki.

Run the .sh file

To run the .sh file (in Linux and iOS) in command line, just follow these two steps:

  1. open a terminal (Ctrl+Alt+T), then go in the unzipped folder (using the command cd /your_url)
  2. run the file with the following command
./orbisgis.sh
Execution terminal

Note: You must have the rights to run this file. To do this, you can use the following command:

chmod ug+x ./orbisgis.sh

… and your file will be executable.

Ubuntu PPA repository

If you are using Ubuntu (or a Debian like distribution) you also have the possibily to connect to our PPA repository, available here : https://launchpad.net/~orbisgis/+archive/ubuntu/orbisgis-unstable

To add this repository and to install OrbisGIS (snapshot version), just execute the following command lines:

sudo add-apt-repository ppa:orbisgis/orbisgis-unstable
sudo apt-get update
sudo apt-get install orbisgis

Once done, you can launch OrbisGIS thanks to the shortcut in the “Applications/Education” menu

OrbisGIS menu in Ubuntu

Or enter the following command in the terminal:

orbisgis

Note that you could also launch OrbisGIS in safemode with this command:

orbisgis -clean

Main Components

Here is a list of the main components of OrbisGIS. Except for the map, all these components are considered by OrbisGIS as plugins. So they can be:

  • made visible or not (just close the component to hide it),
  • resized (using the cursor of your mouse),
  • moved (drag & drop the component to a new place in the UI),
  • (un)docked (pretty useful if you have a dual screen),
  • (un)installed (thanks the plugin manager).
OrbisGIS main components

To load a component, check the list in the “Windows” menu (in red in the illustration above) or the “Tools” menu (for the SQL Console).

Geocatalog

The Geocatalog ( Geocatalog icon ) is the place where datasources are managed. Through a right-click in the blank area, the user can:

  • Add a datasource (a file Add a file icon or a folder Add a file icon ),
  • Import a datasource (a file or a folder),
  • Export layers into flat files or databases ( Export a file icon ),
  • Show the attributes tables ( Open attributes icon ),
  • Remove a datasource ( Remove icon ),
  • Clear the Geocatalog : all the sources are removed from OrbisGIS,
  • Refresh the list ( Refresh icon ).

Map

The map ( Map icon ) is the place where geographic informations (vector or raster) are displayed. The user can navigate into the map (using zoom or pan tools), select and get informations on objects.

TOC

TOC ( TOC icon ) stands for “Table Of Content”. This component allows the user to:

  • Make visible or not the layer with the checkbox (on the left),
  • Change the layer name –> make a double-click on the layer. Then change the name and press “Entrer”,
  • Change the order of layers –> drag & drop the layer upward or downward,
  • Add WMS layers ( Add a WMS icon ),
  • Add a layer group ( Add a file icon ).

Moreover, several features are available via a right-click:

  • Show attributes ( Open attributes icon ): show the attributes’s table,
  • Zoom to the layer ( Zoom to layer icon ): Extended zoom on the layer,
  • Import a style ( Import a style icon ), *
  • Create a thematic analysis ( Create a thematic analysis icon ), *
  • Edit ( Edit a style icon ), delete ( Remove a style icon ) or export ( Export a style icon ) an existing style, *
  • Remove the layer ( Remove icon ): Remove the layer from the TOC,
  • Start edition ( Edit icon ): To edit a layer (e.g: add a field, delete an object, …).

* see Cartography.

DB Tree

The DB Tree ( DB Tree icon ) is a tree representation of all the layers loaded in OrbisGIS. Layers (tables) are listed into their respectives folder (schema).

DB tree detail

Specific options allows the user to:

  • Create spatial index (Geographic index icon ),
  • Create alphanumeric index ( Alphanumeric index icon ),
  • Remove columns ( Remove icon ).

Output console

The output ( Output icon ) console is the place where all messages (informations, warnings or errors) are displayed.

Logs can be copy and paste into a text editor.

SQL console

The SQL console ( SQL Console icon ) is the place where the user can process data thanks to SQL scripts. To know more about this component, read “SQL Console”.

Quickstart

The workspace

The workspace is the configuration of all your parameters and your User Interface (UI). You can create as many workspaces you want and switch them in a very quick way using the workspace manager .

The following items are saved in the workspace:

  • Opened windows (with their size and place in the UI) (see Main Components),
  • Database connection parameters,
  • Map context file (loaded layers in the TOC),
  • Toolbox parameters.
The workspace manager

When you launch OrbisGIS, the first panel displayed is the “Workspace Manager”. This interface, allows the user to create and choose workspaces.

Workspace manager
  • To create a new workspace, just click on Add a wksp icon . In the new panel, create a new empty folder where you want, select it and press “OK”.
  • You can select already created workspaces using the drop down list.
  • If you check the “Set as default?” box, you will skip the Workspace Manager the next time you will launch OrbisGIS (not an irreversible action).
  • If you want to configure your database, click on Add a wksp icon (Customize your database) (see Database).
  • If you don’t want to configure your database, just press “OK”. In this case, a default H2GIS db (named “database.mv.db”) will automaticaly be created in your workspace folder. The default login of this db is “sa” and there is no password.

Database

OrbisGIS is build on top of a relational spatial database. All data are managed and queried from a JDBC driver. By default OrbisGIS starts with the embedded spatial database H2GIS. However, OrbisGIS could also be connected to a PostgresSQL/PostGIS database.

What does it mean ?

It mean that all the data you are using are interpreted as tables in OrbisGIS and can be processed thanks to the Spatial SQL langage. It also mean that if you choose to connect OrbisGIS to an existing PostGIS db, you will be able (1) to display and process your data, (2) to execute your PostGreSQL/PostGIS scripts directly into OrbisGIS, without any changes and (3) to use specific PostGreSQL/PostGIS functions.

Configure

To configure your database connection, click on Add a wksp icon (Customize your database). The following panel will appear.

Databases parameters

Here you have:

  • Saved connections: list of already existing connections,
  • Connection name: the name of your connection (shortcut for all you parameters),
  • Database: select the type of db you want to connect (see below),
  • Host: only if the choosen db is not “H2GIS_EMBEDDED”,
  • Port: idem,
  • Database name: if “H2GIS_EMBEDDED”, URI of the local .db file. Else, the name of the remote db,
  • User name: default value is “sa”,
  • Require password: check if you want to specify a password to connect to your db.

Database type:

  • H2GIS_EMBEDDED: installed and deployed locally. By default the H2GIS db is stored in the workspace folder. This db may have been created by OrbisGIS, or by H2GIS,
  • H2GIS_SERVER: remote H2GIS db,
  • POSTGIS: remote PostGIS db.

The figure below summarizes this usage:

Choose a db core
Example with a PostGIS db
PostGIS Databases parameters

Once you open OrbisGIS with this db connection, you should see all your existing tables displayed in the Geocatalog.

Load data

To load data, just make a right-click in the Geocatalog and choose “Add” or “Import”.

  • Add: Direct link to a data (vector, alphanumeric, …),
    • Pro:
      • Immediate table creation,
      • Does not take disk space,
      • Can create spatial index.
    • Cons:
      • Read-only table,
      • Cannot create alpha-numeric index,
      • Currently only compatible with h2 database.
  • Import: Copy the file content into a new database table,
    • Pro:
      • Create a native h2/PostGIS table,
      • Read/Write table,
      • Can create spatial index and alpha-numeric index.
    • Cons:
      • Take time to create the table depending on file size,
      • Take more disk space.

For both options, you can choose:

  • File: point one or many (using Ctrl + Click) files in a same folder,
  • Folder: after selecting the type of file, point a folder. Here, selected type of file will be searched into the folder and potential sub-folders (e.g. open all .shp files present in the folder “GIS_Data”)
Formats

Below is the list of readable formats that you can choose in the UI, depending if you chose “Add” or “Import”.

Format SHP GPX OSM GeoJSON CSV DBF TSV
Add YES NO NO NO NO YES NO
Import YES YES YES YES YES YES YES

Remarks:

  • You can find a full description of readable and writable formats here : http://www.h2gis.org/docs/dev/h2drivers/
  • Because OrbisGIS uses a RDBMS, a data is represented as a table and could be requested using the SQL languague.

Display on the map

To display a geographic layer (vector or raster), just drag & drop it from the Geocatalog to the TOC.

Drag and Drop

Display attributes

To see how to display attributes, have a look at Manage tables page.

Manage data

OrbisGIS offers features to manipulate data.

Manage tables

To display the layer’s attributes, select it in the TOC (or in the Geocatalog) and make a right-click –> “Open attributes” ( Open attributes icon ).

A new tab appears in the UI with all the attributes.

Open attributes table

Remarks

  • On the top, the table name is displayed (in the illustration below “COMMUNE”) with the number of (selected) objects,
  • There is a dynamic link between a row in the table and the object displayed in the map. So, if you select a row in the table and make a right-click, you can zoom on the selection using the “Zoom to selection” tool ( Zoom to selection tool ),
  • Primary key is identified with a specific icon ( Primary key icon ),
  • Numeric fields are aligned on the right. Other types of field (string, boolean, …) are aligned on the left.
Operation on rows

With a right-click on a row, the user can access to several options:

  • Filter selected rows ( Filter selection icon ) (non-selected lines will be hidden),
  • Create a datasource from the selection ( Create Datasource from selection icon ): export the selection into a new layer,
  • Unselect ( Unselection icon ),
  • Zoom to selection ( Zoom to selection tool ),
  • Reverse the selection ( Reverse selection icon ),
  • Select rows with the same value: search all the lines that has the same value in the selected field ( Selection same rows icon ).
Operation on a column

With a right-click on a column (field), the user can access to several options:

  • Sort ascending ( Sort ascending icon ) / descending ( Sort ascending icon ),
  • Unsort ( Unsort icon ),
  • Show column information ( Information icon ),
  • Show statistics (only for numeric fields) ( Statistics icon ).
Search engine

In the lower part of the window, there is a search engine that can be used in two ways:

  • “Find” mode: enter a value, optionnaly choose a field and specify options,
  • “SQL” mode: just write an SQL instruction and press the “Execute” ( Execute SQL instruction icon ) icon.

Cartography

OrbisGIS offers methods to produce maps using a cartographic language, which is managed in a style model. The style model is based on a research work that propose to extend the OGC Symbology Encoding standard. If you want to know more about this standard, have a look at this website.

Symbology Encoding

In this standard, a style is defined with a set of elements:

  • Style: a style is composed of one or n rule(s)
    • Rule: a rule has one or n symbolizer(s)
      • Symbolizer: a way to render geometries

A style can be configured with:

  • a name,
  • a local langage (you can configure different languages in the same style),
  • a title (one per langage),
  • an abstract (one per langage).

A rule can be configured with:

  • a name,
  • a local langage (you can configure different languages in the same style),
  • a title (one per langage),
  • an abstract (one per langage),
  • Min and/or Max scale of visibility.

A symbolizer can be:

  • a point,
  • a line,
  • a polygon,
  • a text.

OrbisGIS proposes a set of pre-configured symbolizers to create maps:

Below is an example with a Unique symbol representation for the french departments. On the left side of the UI, we can see the three levels of the style (Style / Rule / Symbolizer). On the right side of the UI, we have the “rule settings” panel.

Unique symbol example

In OrbisGIS, styles can be exported (or imported) as an .se file, encoded in xml.

Manage styles

In the TOC ( TOC icon ) you have options to manage the style of your layer. Through a right-click on the layer, you can:

You can also unfold (see red circle in the illustration below) a layer to display all the different styles that are associated (between 1 and n).

One or n styles

Remark : Each style can be (un)checked to be (un)visible.

By default, when loading the layer into the TOC, a Unique symbol style is applied. In the example below, two styles are associated to the DEPARTEMENT layer : one default and one Value classification (in the foreground).

Unfold styles

Unique symbol

In the layer, each objects have the same symbology (same border, fill, opacity, …). Unique symbol works with point, line or area geometries.

Depending on the geometry dimension, the user can manage:

  • Fill settings: enable or not, color, opacity,
  • Border settings: enable or not, color, width unit, width, opacity, dash array,
  • Symbol settings (only for point): place (vertex or interior), shape (circle, half-circle, square, triangle, star, …), size (width & height), size unit.
Unique symbol - Point
Unique symbol - Point
Unique symbol - Line
Unique symbol - Line
Unique symbol - Area
Unique symbol - Area

Value classification

For one specific field, every objects that have the same value, have the same symbology. This classification is available for point, line or area geometries.

  • The field used to make the classification can be numeric, text, boolean, …
  • For each classes, the user can configure the corresponding symbology (fill, border, … see Unique symbol)
Value classification - Point
Value classification - Point
Value classification - Line
Value classification - Line
Value classification - Area
Value classification - Area

Proportionnal symbol

The size of an object depends one the value presents in a specific numeric field. This classification is available for point or line symbolizers.

The user can manage:

  • The field. Only numeric fields can be selected,
  • The symbol: Shape, color, … , size (min & max) and place (only for point)
Proportionnal Point
Proportionnal Point
Proportionnal Line
Proportionnal Line

Interval classification

A numeric field is used to make a classification by intervals. The user is able to:

  • manage the statistical method used to classify : Manual, Quantiles, Equal intervals, Mean - Standard deviation, Nested Averages, Jenks method,
  • manage the desired number of classes,
  • manage the color schema: choice between a gradient (from color x to color z) or a pallet,
  • enable or not the fallback symbol,
  • modify manually classes (thresholds, symbology, labels, add/remove classes).
Interval Classification - Point
Interval Classification - Point
Interval Classification - Line
Interval Classification - Line
Interval Classification - Area
Interval Classification - Area

Complex styles

Thanks to the UI, the user is able to built “complex” styles, made with various rules and symbolizers.

In the example below, for one layer (DEPARTEMENT), we have one style composed of 3 rules in which there is different symbolizers:

  • Rule 1:
    • Unique symbol - Point
    • Unique symbol - Area
  • Rule 2:
    • Unique symbol - Point
    • Value classification - Area
    • Proportional point
  • Rule 3:
    • Unique symbol - Line
    • Interval classification - Area
Complex styles

Using the toolbar, the user can:

  • Move up ( Up icon ) the symbolizer / rule,
  • Move down ( Down icon ) the symbolizer / rule,
  • Add ( Add icon ) a symbolizer / rule,
  • Remove ( Remove icon ) the selected symbolizer / rule,
  • Edit ( Edit icon ) the selected symbolizer / rule,

Compose & export maps

With the Map Composer plugin, user can create map layouts. A map layout is a collection of map elements organized on a page and designed for map printing. With The Map Composer you can add map elements such as text, orientation, scale. Once you have completed a map layout, you can print it or export it into .pdf or image files.

A detailled documentation is provided HERE.

Map Composer

Plugins

OrbisGIS can be extended with new features thanks to its Plugins manager.

By default, some plugins are already installed (e.g Systems plugins, …). In addition, user can optionnaly add some Official plugins.

OSGi specification

Here, plugins are following the OSGi specification (release n°4.3). This systems allows developers to deploy their plugins in a simple and normalized way and to entrust the management of dependancies to OSGi.

To know more about this system, please consult the following documentation: OrbisGIS plugin system.

Plugins manager

To install a plugin, you have to launch the “Plugin manager” which is in the “Tools” menu of OrbisGIS.

OrbisGIS plugin manager

Here, users can:

  • Search plugins thanks to the engine,
  • Filter all, installed or updatable plugins,
  • Choose the type of plugins:
    • Plugins: mainly dedicated to users,
    • Systems: mainly dedicated to developers,
    • WPS plugins: plugins following the OGC WPS standard and available in the “Toolbox”.
  • Add a plugin*
    • from the disk ( Install plugin from disk ): select an OSGI jar file,
    • from an url ( Install plugin from an URL ): specify an url.
  • Add ( Add a repository ) / remove ( Remove a repository ) / update ( Refresh a repository ) a remote bundle repository,
  • Download/start/stop/update/uninstall a plugin.

* in both cases, dependancies will not be automatically resolved.

When selecting a plugin, users can:

  • Download ( Download the plugin ) the plugin,
  • Download and start ( Download and start the plugin ) the plugin,
  • Stop ( Stop the plugin ) the plugin,
  • Refresh ( Refresh the plugin ) the plugin,
  • Uninstall ( Uninstall the plugin ) the plugin.

Official plugins

The following plugins are developed by the OrbisGIS team but are not deployed by default. To install them, just use the Plugins manager.

Those plugins are documented in their dedicated GitHub repository. Here, you can find:

… and probably more to come !

Scripting with SQL

SQL language

In OrbisGIS, you can process data using the Spatial SQL langage. To do so, you have to execute your instructions into the SQL Console.

Here, all Spatial SQL functions and operators are based on the H2GIS RDBMS* and are mostly following the OGC Simple Feature Access - SQL standard.

* Remarks:

  • Only if you started OrbisGIS in H2GIS (local or remote) mode (see Configure).
  • In this configuration, the “non-spatial” SQL functions and operators are executed by the H2 Database Engine. Consult its quite complete documentation if you have any question about SQL.

SQL Console

The SQL console ( SQL Console icon ) is the place where the user can execute SQL scripts. This component is available through the “Tools” menu.

Note that:

  • You can open as many Console you want,
  • The content of your Console can be automaticaly saved when you close OrbisGIS.
SQL Console UI

Here, the user is able to:

  • Write & execute ( Execute SQL instruction icon ) instructions,
  • Execute only selected instructions ( Execute Selected SQL instruction icon :width: 16 pt ),
  • Load & Save .sql files,
  • Search (spatial) SQL functions and operators into a predetermined list ( SQL functions icon ) (the full list is available here),
  • To drag & drop a function from the list to the text area, in order to see the default syntax of the chosen function,
  • Search & Replace words (with advanced options) ( Search icon ),
  • Share SQL instructions via email (need the “Mailto” plugin),
  • Specify a query timeout ( Timeout icon ),
  • To auto-complete instructions (see Auto-completion ).

Remarks:

  • You are able to open as many console you want,
  • The content of the console is saved by default,
  • There is syntax coloration that helps the user to read the instructions,
  • You also have some additional functionalities thanks to a right-click in the text area.

Below are some other tooltips:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
SELECT * FROM CITIES;

-- double dash to write a comment

/*
or use / and * to write
a comment on many lines
*/

SELECT * FROM CITIES WHERE NAME='Perugia';

-- Automatic completion using the shortcut Ctrl + Space

-- Execute the script using the shortcut Ctrl + Enter
Auto-completion

To use the auto-completion, just press “Ctrl + Space”. For example, if you write “sel” and then press “Ctrl + Space”, OrbisGIS will recognize that you want to write “SELECT”. In the same spirit, if you start writing the name of a function, a table or field, a dropdown list will appear on the right to offer you the corresponding elements.

Below is an illustration video (made for the V3.0 but works in the same spirit in the last version of OrbisGIS).


Use cases

Below are some use cases to illustate the power of Spatial SQL in OrbisGIS.

Detect holes into geometries

Here, we want to detect interior holes in a group of buildings (called block).

Method :
  1. Merge buildings
  2. Explode multi-geometries
  3. Produce holes and keep only polygon information

SQL instructions:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
 DROP TABLE IF EXISTS BLOCK , BLOCK_EXPL, HOLES, BLOCK_HOLES ;
 -- All buildings are merge into one, if there are 1cm far from the others
 CREATE TABLE BLOCK AS
         SELECT ST_UNION(ST_ACCUM(ST_BUFFER(THE_GEOM ,0.01))) as THE_GEOM
         FROM BUILDINGS;

 -- We explode this table in order to convert multipolygons into simple polygons
 CREATE TABLE BLOCK_EXPL AS SELECT * FROM ST_EXPLODE ('BLOCK') ;

 -- We remove the table BLOCK and we rename BLOCK_EXPL to be more clear
 DROP TABLE BLOCK;
 ALTER TABLE BLOCK_EXPL RENAME TO BLOCK ;
 -- We add the "PK_BLOCK" id, which will be a primary key
 ALTER TABLE BLOCK ADD COLUMN PK_BLOCK serial ;
 CREATE PRIMARY KEY ON BLOCK(PK_BLOCK);
 CREATE SPATIAL INDEX ON BLOCK(THE_GEOM);

 -- We creates holes and we keep only surfacic geometries (dimension = 2)
 DROP TABLE IF EXISTS HOLES, BLOCK_HOLES ;
 CREATE TABLE HOLES AS SELECT ST_HOLES(THE_GEOM) as THE_GEOM, PK_BLOCK FROM BLOCK;
 CREATE TABLE BLOCK_HOLES AS SELECT * FROM HOLES WHERE ST_DIMENSION(THE_GEOM)=2;

Result:

Detect holes
Spatialize GPS data

From a .csv file (see screenshot below), that contains GPS tracks of different peoples, recreate tracks and visualize the result in a map.

GPS data

SQL instructions:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
 -- 1. Import .csv file into a table called MY_GPS_POINTS
 DROP TABLE IF EXISTS MY_GPS_POINTS;
 CREATE TABLE MY_GPS_POINTS AS SELECT *
         FROM CSVRead('/my_url/gps_tracks.csv');

 -- 2. Convert this table into a point layer (keeping all possible attributes)
 DROP TABLE IF EXISTS MY_POINTS;
 CREATE TABLE MY_POINTS AS
         SELECT ST_MAKEPOINT(LONGITUDE,LATITUDE) as THE_GEOM, NAME, POINT, ALTITUDE
         FROM MY_GPS_POINTS;

 -- 3. Update Z value of points, using the Altitude field
 UPDATE MY_POINTS SET THE_GEOM=ST_UPDATEZ(THE_GEOM, ALTITUDE);

 -- 4. Generate a new layer with the different tracks stored as lines (one per people)
 DROP TABLE IF EXISTS LINES;
 CREATE TABLE LINES AS SELECT ST_MAKELINE(ST_ACCUM(THE_GEOM)) as THE_GEOM, NAME
         FROM MY_POINTS GROUP BY NAME;

Result:

GPS tracks

Scripting with Groovy

Thanks to its official “Groovy Console” plugin, OrbisGIS is able to execute instructions written in Groovy programming language.

To see how to install this plugin, you are invited to consult this page or just check for “Groovy console” in the Plugins manager.

Groovy console

Here, the user is able to:

  • Write & execute ( Execute SQL instruction icon ) instructions,
  • Execute only selected instructions ( Execute Selected SQL instruction icon :width: 16 pt ),
  • Load & Save .groovy files,
  • Search & Replace words (with advanced options) ( Search icon ),

Use cases

Include SQL into Groovy script

Below is an example of how to use SQL instructions into Groovy script. Here we just want to retrieve the coordinates of a point, which is stored in a layer called “TEST”.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
 import groovy.sql.Sql;

 // Execute SQL request
 sql.execute("DROP TABLE IF EXISTS TEST")
 sql.execute("CREATE TABLE TEST AS SELECT 'POINT(1 3 10)'::geometry THE_GEOM")

 // Fetch results and print point coordinates
 // row["THE_GEOM"] is an instance of
 // http://tsusiatsoftware.net/jts/javadoc/com/vividsolutions/jts/geom/Point.html
 sql.eachRow("SELECT * FROM TEST") { row ->
     pt = row["THE_GEOM"].getCoordinate()
     print(pt.x+" "+pt.y+" "+pt.z)
 }

The result is displayed in the Output Console:

1.0 3.0 10.0

To see more about Groovy, you can consult this tutorial from the official Groovy documentation.

Scripting with R

Thanks to its official “R Console” plugin, OrbisGIS is able to execute instructions written in R language.

To see how to install this plugin, you are invited to consult this page or just check for “R console” in the Plugins manager.

The “R console” is based on Renjin. Renjin is a JVM-based interpreter for the R language for statistical computing.

R console

Here, the user is able to:

  • Write & execute ( Execute SQL instruction icon ) instructions,
  • Execute only selected instructions ( Execute Selected SQL instruction icon :width: 16 pt ),
  • Load & Save .r files,
  • Search & Replace words (with advanced options) ( Search icon ),

Use cases

List tables stored in the default H2GIS database

In this example, we are using R to list available tables imported in OrbisGIS (assuming you are in H2GIS mode).

1
2
 library(RH2GIS)
 print(dbListTables(con))

The result is displayed in the Output Console:

[1] "COMMUNE"                "SPATIAL_REF_SYS"        "TRONCON_HYDROGRAPHIQUE"
[4] "TRONCON_ROUTE"          "ZONE_OCCUPATION_SOL"
R console

Contributors documentation

This part is mainly oriented to contributors (developers and translators). Some useful informations and examples are presented.

Develop

Source code

OrbisGIS is a free and open-source GIS software, released under the GPL v3 licence. You can access to the source code on the dedicated GitHub repository.

Developers are cordially invited to contribute to OrbisGIS, posting:

  • Issues: detect a bug, ask for enhancement ? Create an issue on GitHub,
  • Pull Request (PR): want to contribute ? Please submit your PR and we will analyze it carefully.

Tools for developers

The following two “Continuous Integration” tools are used to build, control and deploy OrbisGIS source code:

Releases & Snapshot

  • Releases and pre-releases versions can be found HERE
  • Daily snapshot release (for test purpose) is provided via:

Wiki documentation

Below are some useful links for developers, that are mainly provided on the wiki page of the OrbisGIS GitHub repository.

Additional informations

  • Made by a team from CNRS
  • Registered date : 22/12/2007
  • Langage of development : 100% Java
  • Licence : GPL v3
  • Supported OS : Linux, Windows and Mac OS
  • Installation requirement : at least Java 7

Translate

The translation of OrbisGIS is managed thanks to the Transifex platform, a free-to-use website enabling users to collaboratively translate open-source projects. To do so, you just have to create a free account. Then, you can access to the Transifex OrbisGIS project HERE.

Translation

Team

A langage is manage by a team, which is composed of 3 rules:

  • coordinator: manage the team (add/remove members),
  • revisor: can translate and validate the result,
  • translator: can translate.

Remark: note that one user can have the 3 rules in the same time.

New users are invited to:

  • create a new team if their langage is not already present,
  • or to join an existing team.

Getting started (for translators)

Once you are team member, you should be allowed to translate the application. Here you are asked to translate words (also nammed keys) presents in .xml files called ressources.

Most of the translation keys are single words or sentences. In this case, the translation process is self-explanatory. However, you can discover some specific characters such as {} or &. In this case, please follow the instructions below.

1- Curly braces

In some cases, you will notice a number enclosed by curly braces. These strings refer to special parameters in the code and must be preserved. For example, the French translation of {0}_selection_{1} is {0}_sélection_{1}. Here {0} refers to the layer name and {1} refers to a text value.

Another example:

Cannot add a LayerCollection {0}.

becomes in French

Impossible d'ajouter la collection de couche {0}.
2- & symbol

The & symbol is used to create keyboard shortcuts. So they have to be preserved (if possible).

Example:

&Copy

becomes in French

&Copier

In this example, the shortcut will be placed on the “C”.

Contributors

Contributions are welcome! You can help out by translating, proofreading existing translations, or creating your own translation team (for a new language).

If your translation looks good, your work will be integrated into OrbisGIS.

Already done:

  • English,
  • French.

Languages in progress:

  • Italian: Thanks to Simone Sandri (aka xseris), Team manager
  • Portuguese (Brazil): Thanks to Enrico Nicoletto, Team manager,
  • Arabic: Thanks to Ilyes Smadi (aka Smadi), Team manager,
  • Chinese: Thanks to Quing-Xia Zhou, Team manager, Yinghao Li and Su Qi
  • Spanish: Thanks to Emilio Plaza García (aka Dharth),
  • Persian: Thanks to Mohammad Hosseini (aka PersianPolaris), Team manager and Mehrazin Omrani (aka Azin),
  • Russian: Thanks to Assem, Team manager,
  • Greek: Thanks to Ioannis Tsimpiris (aka gtsimp), Team manager,
  • Breton

Transifex configuration (for developers)

The python file in tools will call mvn gettext:gettext in order to update all .pot files in the project tree.

To send to transifex new translation keys:

cd tools/
python internat.py
tx push -s

To retrieve updated translations from transifex.

tx pull -a --minimum-perc=1

This will update all .po files. A commit then a pull request has to be done in order to be published into the final binary.