New GGL2 plugin for Qgis
A new GGL2 plugin for Qgis has been released. This plugin allows users to connect the GGL2 environment with Qgis so layers can be used as data within GGL2 code and results can be visualized back in Qgis.
In order to use Qgis layers, simply use the qgis_ prefix followed by the name of the layer in Qgis. In GGL2, this will show the number of roads of the Qgis layer roads:
On the other hand, it is possible to export the results into Qgis selecting it as the default GIS in the GGL2 environment and using the show in gis instruction. For example, we can show the buffer of the roads layer using GGL2 with the following program:
import ggl.geom;import ggl.shp;show qgis_roads select(r | ST_Buffer(r/the_geom, 10)) in gis as SHP ‘buffer’;
There is more information on how to configure the default GIS and how the GIS interaction works on the documentation site.
Regarding the user interface and the configuration of the plugin, the behavior is very similar to the already available plugin in gvSIG. It is possible to connect/disconnect the plugin from a toolbar button and there is a menu in Plugins -> GGL2 to configure the port used to connect to GGL2.
One of the most important advantages of this plugin is that Qgis is now added to the set of available GIS applications from GGL2, together with gvSIG. Thus, users can share data betweeen applications easily. For example, it is possible to segment roads from a gvSIG layer with regions from a Qgis layer and show the results in our default GIS application:
import ggl.shp;import ggl.geom;roads_region = gvsig_roads join qgis_regions(o, e |
on ST_Intersects(e/the_geom, o/the_geom)
include geom_region=e/the_geom, municipio=e/nombre);
segments = roads_region select (r | the_geom=ST_Intersection(r/geom_region, r/the_geom),
all except r/geom_region, r/the_geom);
show segments in gis as SHP ‘segments’;
This plugin opens the Qgis world to all the GGL2 users and also brings GGL2 closer to the Qgis users. However, the Qgis plugin is still an ongoing development and may suffer some bug corrections as well as some improvements such as a GGL2 console in order to execute GGL2 code directly from Qgis.
Do you have a project idea and want to turn it into reality? We would like to hear from you, tell us about it
The facts define us
Real-time public transportation visualization
https://vimeo.com/540079821/ Real-time visualization for the Barcelona metro and bus services Since 2016, Geomatico has been working with the Barcelona public transport agency (Transports Metropolitans de Barcelona, TMB) for GIS development…
Civil works monitoring using satellite imagery and machine learning
Using up-to-date satellite imagery is nowadays mandatory to the decision-making process in many areas: agriculture, environment, water resources … Checking present and historical views of a site can be of…
Customised GIS training for your sector
Our experience tells us that the best way to consolidate knowledge and have your staff effectively integrate GIS as a daily tool is through customised courses for your business. Generalist…
9 years with Barcelona Natural Science Museum
Geolocation is a key attribute for activity in a natural science museum since cartography is present in almost all its fields of activity: collections, research, publications, exhibitions, etc. The collaboration…