Archive de la catégorie: ‘Uncategorized’

3D spatial operations and exact geometries for PostGIS

Mardi, 29 Janvier 2013

Motivation

Oslandia and IGN are involved in developping 3D spatial operations for PostGIS, with a use case focus on city modeling (CIM), and with a 3-year partial fundings from the European Union (FEDER).

CGAL

After PostGIS Paris Code Sprint, we really considered using the CGAL library, which already implements several 3D algorithms.
CGAL is also able to guarantee exact computations through the use of arbitrary precision numbers (if we choose the right CGAL kernel)

The question became: can we use CGAL as an underlying geometric computation framework for 3D operations with the additional benefit of exact computations ?

SFCGAL

We started by building an OGC Simple Feature compliant library on top of CGAL, called SFCGAL.

It is not yet complete, but main design elements have been already fixed. The class hierarchy is pretty standard and lots of commonalities may be found with other libs, like GEOS.

However, SFCGAL stores geometry coordinates using arbitrary precision numbers, as CGAL does.

On top of this class hierarchy, some 2D and 3D operations have already been implemented :

  • 2D and 3D Intersection
  • 2D and 3D Intersection test (e.g ST_Intersects)
  • 2D and 3D Convex Hull
  • 2D and 3D Triangulation
  • 2D and 3D distances
  • 3D Extrusion (from a 2D geometry)
  • 2D Minkowski Sum

PostGIS-sfcgal

A PostGIS branch is also available including SFCGAL handling. It exposes SFCGAL functions to PostGIS.

PostGIS - SFCGAL architecture

PostGIS - SFCGAL architecture

All the new functions provided are isolated in a ’sfcgal’ schema.

Here is a list of already available functions :

  • ST_Intersection / ST_3DIntersection (supporting all types of geometries, including solids)
  • ST_Intersects / ST_3DIntersects (supporting all types of geometries, including solids)
  • ST_ConvexHull / ST_3DConvexHull
  • ST_Distance / ST_3DDistance
  • ST_DelaunayTriangles / ST_3DDelaunayTriangles
  • ST_Extrude
  • (in progress) ST_Buffer

Comparison to GEOS

A simple benchmark helps us to compare GEOS-based spatial operations with SFCGAL-based ones. Comparison can only be made for 2D operations, since GEOS is mainly 2D. (Python benchmark script)

SFCGAL’s speed is comparable to GEOS’ speed (sometimes even a bit better).
However, for few non-native CGAL operations (area for instance), we rely on our own (quick) implementation, which still lacks optimizations, they are then not (yet) as fast as GEOS-based functions.

So using CGAL with maximum precision for native spatial operations could be done with keeping the same kind of performances than GEOS.
Put differently, with CGAL we gain arbitrary precision without performance loss.

Support for exact geometries

But we do not take yet the full benefit of an exact computation framework. For instance, consider this post from Paul on OpenGeo blog :

SELECT
  ST_Intersects(
    ST_Intersection(
      'LINESTRING(0 0,2 1)'::geometry,
      'LINESTRING(1 0,0 1)'::geometry),
    'LINESTRING(0 0,2 1)'::geometry);

It should answers ‘true’. However it is not the case with current PostGIS implementation, because coordinates are represented using floating points between two consecutive calls.

The SFCGAL library does not enforce floating coordinates and keep their exact representations.
But obviously we loose this precision when switching back and forth to double on each (de)serialization calls (to and from GSERIALIZED).

In order to take benefit of the exact representation within nested functions, we added a new (de)serialization format that supports arbitrary precision called ‘exact_geometry’.

Reusing the previous example, we could now write :

db=# SELECT
  sfcgal.ST_Intersects(
    sfcgal.ST_Intersection(
       'LINESTRING(0 0,2 1)'::exact_geometry,
       'LINESTRING(1 0,0 1)'::exact_geometry),
    'LINESTRING(0 0,2 1)'::exact_geometry);
st_intersection
-----------------
POINT(2/3 1/3)
(1 row)

Notice the new ‘a/b’ rational format that figures internal rational representation. SFCGAL is also able to parse this extended WKT.

Referenced geometries

When calling nested functions, we spend time serializing and deserializing on each function call. Even if the geometry output from the first function is really the same than the input of the second one.

Why do we need to serialize and then deserialize the same geometry ?

If you consider that (de)serialization from liblwgeom to CGAL exact representation really takes time, nested calls are performance evil (yeah no less).

So it implies a new geometry type called ‘ref_geometry’.
Ref_geometry only copy their memory address (converted to some integers) from functions to functions.

This implies:

  • destruction of referenced geometries is postponed,
  • they are not designed to live outside the query they first appeared in (and have to be converted back to a regular geometry type in order to be stored, using for instance sfcgal.ST_Geometry()).

Implementation considerations

The first point means, in PostgreSQL terms, that such objects must be attached to the correct memory context in order to be deleted at the ‘right’ time.

If the context is deleted too early, terminal functions might not be able to access our previously allocated geometries.
On the other hand, choosing a too static memory context will let objects dangling until late and will explode memory consumption.
The current choice (attaching to the current ExprContext when possible, to MessageContext otherwise) gives good results, but this would have to pass advanced tests where different kinds of evaluation contexts are produced by the postgresql execution engine.

The other difficulty at this point is that we are dealing with C++ objects.
Allocating something with palloc() allows it to be automatically deleted on memory context destruction. However no C++ destructors are called in that case.

But, memory contexts have support for user-supplied reset and deletion functions. Referenced geometries are then created on a custom child memory context. When this custom context is deleted (by its parent), C++ objects can be safely deleted.

Still with the same example, we get:

db=# SELECT sfcgal.ST_Intersection(
    'LINESTRING(0 0,2 1)'::ref_geometry,
    'LINESTRING(1 0,0 1)'::ref_geometry);
st_intersection
-----------------
POINT(2/3 1/3)
(1 row)

And, in order to illustrate the temporary nature of referenced geometries:

db=# CREATE TABLE temp_geo AS SELECT 'POINT(0 0)'::ref_geometry;
SELECT 1
db=# SELECT * FROM temp_geo;
NOTICE:  Referenced geometries must not be stored
ref_geometry
--------------
-deleted-
(1 row)

Referenced geometries are here made to be used with the SFCGAL::Geometry class. However, the mechanism is generic enough to be applied to other (C++) types.

Serialization comparison

A quick bench (4 nested calls to a function that does no processing, i.e sfcgal.ST_Copy), is useful to show performance differences between geometry representations.

Referenced geometries are way faster than (SFCGAL) serialized geometries and even still faster than native GSERIALIZED geometries.

Notice also that serialization of exact geometries is still slower than native serialization through GSERIALIZED. The overhead might be due to a lack of optimization on this part, but we feel this is due to the storage of arbitrary precision numbers.

Serialization becnhmark: native vs. ref_geometry

Serialization benchmark: native vs. ref_geometry

Serialization becnhmark: native vs. exact_geometry

Serialization benchmark: native vs. exact_geometry

Regarding memory consumption, the three approaches consume a comparable amount of memory.

How to test ?

To test SFCGAL and our postgis branch:

  • Get and install CGAL 4.1 from cgal.org
  • Get and install SFCGAL (setting ‘SFCGAL_USE_STATIC_LIBS’ to OFF)
  • Get and install our postgis-sfcgal branch, (run ./configure with the ‘–with-sfcgal’ flag, refer to the README.md file for the other flags)
  • Alternatively, you can apply a patch against PostGIS trunk (revision 11054 at the time of writing)
  • Run postgis.sql on a database
  • Try a 3D intersection between two cubes with (you can display the resulting WKT with the ‘DemoPlugin’ from SFCGAL’s viewer)
    WITH unit_cube AS (
        SELECT
          sfcgal.ST_MakeSolid(sfcgal.ST_Extrude(
            sfcgal.ST_Extrude(
              sfcgal.ST_Extrude('POINT(0 0)'::geometry, 1, 0, 0),
              0, 1, 0),
            0, 0, 1)
          )
        AS solid
      )
    SELECT ST_AsText(sfcgal.ST_3DIntersection( solid, ST_Translate( solid, 0.5, 0.5, 0 )))
    FROM unit_cube;
    
  • Try using ‘exact_geometry’ and ‘ref_geometry’ types through ‘::’ cast or through conversion functions (sfcgal.ST_RefGeometry() and sfcgal.ST_ExactGeometry())

3D viewer

To render 3D operations, SFCGAL is shipped with a really basic 3D viewer based on Open Scene Graph and QT. It is able to connect to a PostgreSQL base. Usage is only for dev/debug purpose, consider it also as alpha.

SFCGAL viewer demo

SFCGAL viewer demo

We are also investigating the use of QGIS (with the Globe plugin) to serve as a 3D viewer of spatial queries.

PostGIS 3D demo

PostGIS 3D demo

Discussion

Integration

We would like, as you could guess, to see PostGIS SFCGAL functions included into PostGIS.

Points to discuss/validate:

  • As a first step, PostGIS-sfcgal support could be added in a quite near future, into PostGIS trunk, since its compilation is optional, it does not interfere with existing PostGIS functions through the use of a separate schema.
  • The ‘exact_geometry’ type is important to keep the ability to nest several function calls without loosing geometry precision (and so 3D topology).
    On the long term however, what about a single geometry type that would optionally support arbitrary precision numbers ? This would probably need some efforts around GSERIALIZED functions. To be discussed.
  • The ‘ref_geometry’ may first be considered optional. However it allows to keep performance with nested functions using SFCGAL. Current implementation is still to be considered a bit experimental and would have to pass more tests to be fully qualified, before a PostGIS integration. Any feedback related to C++ objects handling within the PostgreSQL framework is welcome.
  • A quite minor point, is related to SFCGAL wrapper code written in C++. Some may find that it breaks the consistency of pure C PostGIS sources, but it was easier for early design and tests. Is keeping direct C++ calls from PostGIS not a big deal or, on the contrary, a C API is a need, for the sake of consistency ?

Roadmap

We still are involved in this project till (at least) end of 2014, so the current roadmap, for the next months, is:

  • Several spatial processing are still missing. Especially the complete set of boolean predicates and constructions (which are present in CGAL, so more an interface task)
  • There is no mechanism of geometry caching like GEOS has. This would be of interest regarding performances
  • Fine tuning of some CGAL algorithms used are still needed.
  • Hopefully, progress with PostGIS trunk integration

Feel free to share your thoughts, remarks and critics.

QGIS Atlas generation

Mercredi, 10 Octobre 2012

Following our involvement into the QGIS open source community, we are now pleased to inform you the Atlas plugin has been integrated into a core functionality of the QGIS print composer !
This work has been done thanks to financial support mainly from :

Other financial contributors :

  • John C Tull
  • Bill Williamson
  • Ujaval Gandhi

Here is a tutorial on how to use the new atlas generation functionality. You should have a version of the development branch that is dated after 10-6-2012 (date of the QGIS Hackfest) for it to be included.

The print composer includes generation functions that allow to create map books, or series of maps, in an automated way. The concept is to use a coverage layer, which contains geometries and fields. For each geometry in the coverage layer, a new output will be generated where the content of some canvas maps will be moved to highlight the current geometry.

It is also now possible to replace text labels set up in the composer, with coverage layer’s attribute values, enabling you to set a title, comment, document name, page number, or any dynamic information you want to display on your final maps.

Let’s see the steps needed to create a map book.

Create a project

Let us begin with a classic QGIS project, import our layers and set styles according to our needs.

qgis_atlas_1

Coverage layer

We have to create a layer containing coverage geometries, which can be any type of geometries, even if polygons are best to represent a coverage. This will be read by the atlas generator and for each feature of the layer, an output map will be created.

This coverage can have any field number and names. Here, we took a squared 3×3 grid that corresponds to delimiting zones with a special name.

qgis_atlas_2

Composer template

We can now create a template for our output, in the Quantum GIS composer. The template is a classic composer document. We have to remind which map item will contain our coverages. We can know the map item name with the tooltip (”Map 0” for example).

We will here create a simple layout with a central map object where each geometry will be displayed, a smaller map that will serve as an overview frame and two labels: one displaying the current zone name and another one displaying the current page number.

Expressions can now be inserted into labels. Fields of the coverage layer can then be used. This is much more powerful than the previous $FIELD() syntax.

Four new variables have been added:

  • $feature and $numfeatures that give the current feature number and the total feature number of the coverage layer
  • $page and $numpages that give the current page number, in case of a multi page layout. These variables do not vary with the number of atlas features.

So for instance, if we have a 2-page document with a coverage layer of 10 features, and want to export everything to a single file, the expression

[% $page + ( $feature - 1 ) * $numpages %]

would give the current “real” page number.

Defining the overview map

Setting the overview map

Inserting the zone name in a label

Inserting the zone name in a label

Inserting the current feature number in a label

Inserting the current feature number in a label

Atlas generation

We are now ready to launch the generation, using the Atlas generation tab of the composer.

qgis_atlas_generation

The available options are:

  • Composer map : Item on the composer template where the map extent will be zoomed on each coverage. Use the tooltip over objects in the composer window to know the map item name
  • Coverage layer : The name of the layer containing the coverage geometries
  • Hidden coverage : If checked, the coverage layer itself will not be rendered on the output map
  • Margin around coverage : Amount of space around given coverage geometry. Default is 10% of coverage bounding box
  • Fixed scale : If checked, the composer map’s scale will not be changed for each geometry. It is up to the user to set its extent. The composer map’s will still be centered on each geometry of the coverage layer.
  • Output filename expression : Generic name of the output files. Expressions can be used here.
  • Single file export when possible : If checked, export will be done to a single file if possible. Until now, only PDF export supports this feature.

When all the options have been set, we can use the print / export features as before. These functionalities will be modified if an atlas generation has been configured.

For example, if we ask for an export to images, a dialog will ask us to select the output directory of the export as well as the output image format.

qgis_atlas_save_as

Atlas generation is supported for all rendering possibilities:

  • PDF export (either a single file for each geometry or a single file for all the geometries)
  • SVG export (one file for each page)
  • Bitmap images (one file for each page)
  • Printing

Results

Here is an example of what could be obtained when selecting the single-file export PDF :

qgis_atlas_multi_pdf

What’s next ?

If you like this feature and want some improvement, do not hesitate to contact us, we can develop it for you, or adapt it to your specific needs !

Code Sprint PostGIS EU et Barcamp

Lundi, 30 April 2012

logo_osgeo

Les 15 et 16 mai prochain, un Code Sprint PostGIS Européen aura lieu à Paris: http://trac.osgeo.org/postgis/wiki/DevWikiEvent.

A cette occasion, un Barcamp, aura comme mission de faire se cotoyer les utilisateurs un tantinet avertis, et développeurs de PostGIS ou de librairies connexes, pour échanger sur les directions des futures versions de PostGIS.

Bref que veut-on mettre comme objectifs de la Road Map de la 3.0…

Le Barcamp aura lieu dans Paris intra Muros (quartier du Sentier), de 18h à 20h.

Le nombre de places étant volontairement limité, ne trainez pas pour manifester votre enthousiasme et vous inscrire derechef (soit directement sur la page Wiki, soit via mail: postgis@oslandia.com)

Master class PostGIS aux Rencontres SIG la lettre

Jeudi, 26 April 2012

Du 3 au 5 avril se tenaient dans les locaux de l’ENSG à Marne-La-Vallée les rencontres SIG-La-Lettre.

Dans ce cadre, Vincent Picavet a réalisé un master class sur PostGIS. Trois heures pour découvrir ce SGBD spatial, ses possibilités et la puissance des traitements réalisables. Le master class a eu un franc succès, la salle étant pleine à craquer.

Les supports du master class sont basés sur le workshop PostGIS donné au FOSS4G plusieurs années de suite, et qui a été traduit en Français. Oslandia a amélioré la traduction et publié une machine virtuelle permettant de réaliser le workshop de façon simple en utilisant VirtualBox.

Les sources de la traduction à jour sont disponibles sur GitHub (original sur PostGIS.fr), et la machine virtuelle est téléchargeable actuellement à l’adresse suivante : http://dl.free.fr/k3g8c0zkJ (attention fichier de 3.1Go).

Vous pouvez suivre ce tutoriel en toute autonomie, et n’hésitez pas à contribuer à l’amélioration des supports en forkant le projet sur GitHub. Si vous avez besoin d’aller plus loin, vous pouvez consulter le catalogue de formations Oslandia.

10e rencontres de la communauté QGIS (partie 2)

Mardi, 24 April 2012

Le dixième Community Meeting de Quantum GIS (aka HackFest) s’est achevé la semaine passée. Après quelques jours pour se remettre de ces émotions codesques, voici la seconde partie d’un petit compte rendu (non exhaustif) de ce qui s’est déroulé pendant ce rendez vous de développeurs.

Sextante (ou : Geotraitements dans QGIS)

Un des gros sujet sur lesquels se sont concentrés les développements étaient l’intégration d’un plugin Sextante dans QGIS. Sextante est un framework, originellement disponible sous GvSig, qui se concentre sur les géotraitements. Il a été transcrit en Python par Victor Oyarla, et rendu disponible sous forme de plugin pour QGIS.


Ce framework permet de développer et d’intégrer très rapidement de nouveaux algorithmes de traitement raster ou vecteur. Victor a présenté son travail très impressionnant, avec les quelques modules déjà disponibles pour ce framework : GDAL, Ftools, Grass.. Et aussitôt de nouveaux modules se sont mis en route. La liste s’allonge chaque jour, et on trouve actuellement les modules suivants :

  • GDAL (Raster)
  • Ftools (Vecteur)
  • SAGA
  • mmqgis
  • GRASS (traitement raster et vecteurs)
  • OrfeoToolBox (Télédétection)
  • LAStools (Lidar)
  • R (geostatistiques)
  • Scripts

De futurs modules sont en cours de développement : PostGIS, WPS..

Cerise sur le gâteau, Sextante dispose également d’un modeleur, qui permet de faire des enchaînements de traitements complexes, en couplant les algorithmes de modules hétérogènes. On peut également lancer ces modèles en batch, et les utiliser en Python hors de l’interface graphique.

Il ne fait aucun doute que ce framework permettra à QGIS d’être le SIG disposant du plus grand nombre d’algorithmes de géotraitement sur le marché.

Ses capacités lui confèrent déjà quasiment le statut d’ETL spatial. Quand on sait que Victor va encore travailler neuf mois sur le sujet et que l‘inclusion dans le master de QGIS est déjà prévue, on ne peut que se réjouir et parier sans risque sur un outil stable, robuste et puissant rapidement.

Vous pouvez voir la vidéo de présentation de Victor : QGIS Sextante plugin

En attendant que le plugin soit intégré directement dans le cœur de QGIS dans la prochaine version, vous pouvez le télécharger et l’installer à partir du dépôt des plugins ou du dépôt de code subversion. Le tout est détaillé dans la page du plugin sur le projet QGIS.

À lyon, Julien Malik en a profité pour intégrer OTB dans Sextante, qui fournit désormais une panoplie large d’algorithmes de télédétection. Vous pouvez lire la description sur son blog (en anglais).

Des plugins dans le master

Il a été décidé suite à la rencontre d’intégrer des plugins Python directement dans le master de QGIS. Cela ne pourra se faire qu’à certaines conditions. Le premier plugin concerné est le DB Manager (Gestionnaire de bases de données). Cet outil gère les bases PostGIS et spatialite et permet notamment de transférer des tables de données d’une base à une autre.

Plugin Atlas

Des améliorations ont été faites par Oslandia sur le plugin Atlas, qui permet de générer des cartes au format PDF. La société Biotope a également publié un plugin compagnon qui permet de générer des synoptiques pour le plugin Atlas. Nous recherchons actuellement des financements pour ajouter de nouvelles fonctionnalités et pour stabiliser le plugin Atlas afin de pouvoir l’intégrer directement dans le master QGIS : contactez nous si vous utilisez ce plugin !

Nouvelles fonctionnalités dans le master

QGIS master supporte désormais nativement les styles SLD. Un pas de plus vers une interopérabilité avec les autres outils SIG du marché.

Le rééchantillonnage de raster a été réécrit en grande partie par Marco Hugentobler, et il est désormais possible de choisir la méthode d’échantillonnage pour le rendu (plus proche voisin, moyenne, cubique, etc). Les rendus sont bien plus lisses lorsqu’on dézoome sur une zone fortement détaillée. Ceci au prix d’un temps de rendu un peu plus long, mais la différence n’est pas significative.

Hugo Mercier d’Oslandia a ajouté dans QGIS la fonctionnalité de copier-coller des styles d’une couche QGIS à une autre. Le patch a été commité et est désormais disponible dans le master.

Code Sprint 2012 OSGeo

Jeudi, 9 Février 2012

Le code sprint OSGeo de la communauté C (et apparenté), est en passe de devenir un marronnier, avec une quatrième édition qui s’achève aujourd’hui…

Le leitmotiv de cette session aurait pu être “Release, release, release…” tant les efforts coordonnés de chacun étaient orientés sur les tickets restant à clôturer avant de pouvoir sortir de nouvelles versions officielles, de la stack SIG Open Source.

Une nouvelle version de maintenance de MapServer en 6.0.2 est sortie hier, avec de multiples bugfixes, dont un correctif de sécurité (à lui seul une bonne raison de procéder à une mise à jour),voir le Changelog complet en ligne.

La prochaine version majeure de MapServer, sera la 6.2.0 et devrait sortir au courant du printemps, avec comme principales nouvelles fonctionnalités l’intégration de MapCache et de TinyOWS, ou la gestion de INSPIRE View Service.

TinyOWS est également sorti en version 1.0.0 hier, avec de nombreuses nouvelles fonctionnalités, et correctifs
( cf précédent billet sur ce sujet).

Concernant PostGIS, la 2.0 est désormais proche, et devrait (selon toute vraisemblance) sortir dans les prochaines semaines. Pour accélérer le processus vous êtes vivement encouragés à tester et faire le cas échéant des retours sur la mailing list, des versions alphas qui sortent (très) régulièrement.
Code source de PostGIS 2.0 alpha5

Ce sprint était légèrement différent des précédents avec une localisation sur la côté Ouest, et en milieu naturel et fermé (comprendre un centre au milieu des bois), au lieu du traditionnel environnement (hyper)urbain. L’idée était d’expérimenter ce qui se fait déjà avec la Java Tribe sur Bolsena, et effectivement les retours en terme de dynamique d’équipe sont intéressants.
Et pour la suite, Regina Obe de la team PostGIS (et auteur de ‘PostGIS in Action’) s’est déjà proposée d’organiser la session 2013 sur Boston !

Un grand merci aux nombreux sponsors mobilisés sur cette action, c’est toujours surprenant du point de vue Européen, de voir que les Nord-Américains arrivent réellement à financer ce type d’événenement, alors que la pénétration de l’Open Source (dans les SIG) est jusqu’à présent plus marginale que chez nous.

Quantum GIS Atlas Plugin

Mardi, 24 Janvier 2012

As an effort for participation in the OpenSource community in general, and the OSGeo community in particular, Oslandia develops free software for research and development, internal needs, client needs or sometimes just for fun !

Of course we work with the community, publish source code, work together in order to leverage the power of OpenSource to its full extent.

This time, we publish a small but very convenient Quantum GIS plugin, named «Atlas». This a a map book tool, and it fills a gap in QGIS features, as such a fonctionality is a long-awaited one. (The easyprint plugin was great but lacked easy customization). Let’s show you what this Atlas plugin is about.

Overview

The Atlas plugin helps you create map books, or series of maps, in an automated way. The concept is to use a coverage layer, wich contains geometries and fields. This layer will define the maps to output. You can create image files or PDF files. All the composition is done in the QGIS map composer, and a specific composition is used as a template.

The plugin allows to replace text labels set up in the composer, with coverage layer’s attribute values, enabling you to set a title, comment, document name, page number, or any dynamic information you want to display on your final maps.

Let’s see the steps needed to create a map book.

Create a project

Begin with a classic QGIS project, import your layers and set styles according to your needs.

qgis_layers

Coverage layer

You have to create a layer containing coverage geometries, which can be any type of geometries, even if polygons are best to represent a coverage. The Atlas plugin will read this layer and for each feature of the layer, will create an output map.

This coverage can have any field number and names.

coverage_attributes

Composer template

You can now create a template for your output, in the Quantum GIS composer. The template is a classic composer document. Two things can be noted :

  • You have to remind which map item will contain your coverages. You can know the map item name with the tooltip (”Map 0” for example).
  • You can use text replacement in label. Every occurence of $FIELD(fieldname) in a label will be replaced by the value of the field with name fieldname from the coverage layer, for the current coverage.

Atlas plugin

You are now ready to launch the plugin. Find the entry in the plugins menu or click the atlas plugin button. You should see the following dialog.

Main Atlas plugin window

Main Atlas plugin window

You have to fill the form before clicking on Render to launch the rendering of the output maps. The options are :

  • Coverage layer : The name of the layer containing the coverage geometries
  • Hide coverage : If checked, the coverage layer itself will not be rendered on the output map
  • Composer template : Choose a template for output images. You can refresh the template list or show the selected template in the composer window
  • Composer map object : Item on the composer template where the map extent will be zoomed on each coverage. Use the tooltip over objects in the composer window to know the map item name
  • Margin around coverage : Amount of space around given coverage geometry. Default is 10% of coverage bounding box
  • Output directory : Location where the rendering writes the output images to
  • Filename pattern : Generic name of the output files. The final names will have a _n suffix before the extension, n being the image number (like basename_0.pdf). The pattern extension determines the output file type. The latter can be any image format (PNG, JPG…) or PDF.
  • Render : The render button launches the rendering process, writing output in the specified directory

Results

The results are written to the filesystem, with the file type specified in the filename pattern.
For example, PNG output :

image_resultsAnd a PDF output example :

okular_results

We can notice that labels have been replaced by corresponding field values in the coverage layer.

Where is it ?

The plugin has been published on QGIS main plugin repository, just look in QGIS plugin installer. Don’t forget to activate the experimental plugins in QGIS plugin installer’s options.

[Update] : For versions < 1.7.3 you have to manually add the new plugin repository : http://plugins.qgis.org/plugins/plugins.xml

Plugin’s homepage is http://hub.qgis.org/projects/atlas

The code can be obtained at : http://hub.qgis.org/projects/atlas/repository

The bugtracker is there : http://hub.qgis.org/projects/atlas/issues

What’s next ?

This plugin is a first release. While being functional for us, it is a beta prototype. There is still a lot of work needed to be done to have a production-ready tool. We are looking for contributors (code, documentation, bug reports, funding…). We would also be happy to have feedback and a gallery of map books if you can publish them.

If you like the plugin and want some improvement, do not hesitate to contact us, we can develop it for you, or adapt it to your specific needs !


Oslandia recrute un Développeur Senior

Dimanche, 7 Aout 2011

Oslandia recherche pour agrandir son équipe, et œuvrer sur de nouveaux projets, un développeur senior sur des technos C, C++ et Python.

Si vous êtes intéressé(e)s ou connaissez la personne idoine, une seule adresse: jobs@oslandia.com

En ligne: Le texte complet de l’annonce.

Nouvelles brèves de QGIS

Dimanche, 16 Janvier 2011

Quelques informations diverses autour de Quantum GIS.

Suite à la sortie de la 1.6 «Copiapó», un article est paru dans le dernier mensuel SIG-La-Lettre sur Quantum GIS : «QGIS, dynamique d’un SIG bureautique libre», par Vincent Picavet. On y fait état du HackFest de Wroclaw, des dernières avancées du logiciel, des fonctionnalités à venir… État des lieux du plus dynamique des SIG bureautique libre donc. Le numéro est en téléchargement PDF pour les abonnés.

D’autre part, la société indienne kCube Consulting a proposé de donner 6 mois de temps d’un développeur pour améliorer QGIS. Sur cette excellente nouvelle, la communauté a organisé un sondage pour savoir sur quelles priorités il fallait se concentrer. Au final le travail principal sera orienté vers la correction de bugs. C’est une bonne nouvelle, car si le développement de nouvelles fonctionnalités est souvent financé par les contrats client des diverses société de services travaillant sur QGIS, il n’en est pas de même du travail de fond de correction de bug, amélioration du code, refactoring, amélioration d’ergonomie, etc. De bonnes perspectives pour l’amélioration de la qualité général de ce logiciel donc.

Pour en savoir plus sur ce point, Tim Sutton a publié une interview de Kumaran Narayanaswamy et SunilRaj Kiran de kCube.

Toujours dans les actualités de QGIS, un master class de prise en main sera organisé lors des Rencontres SIG-La-Lettre. Le résumé de la session : «Quantum GIS, plus connu sous son diminutif QGIS, est indéniablement le projet de SIG bureautique libre en vogue. Cette session de tutoriel encadré vous permettra de découvrir ce logiciel et d’avoir un aperçu global de ses fonctionnalités. Chargement de données raster ou vecteur, édition de données, webservices, symbologie, composition de cartes, interaction avec les bases de données, système de plugin, traitement vecteur et raster avec GRASS, les possibilités de QGIS sont nombreuses, et vous serez à la sortie de ce cours en mesure de savoir comment elles peuvent répondre à vos problématiques.».

Cette formation de 2h30 environ sera réalisée par Jean-Roc Morréale et Vincent Picavet sous l’égide de l’OSGeo-fr. Ne ratez pas les inscriptions, les places seront limitées.

Le même Jean-Roc Morréale a également annoncé récemment la sortie du manuel de QGIS 1.6 en Français à jour. Il devrait être disponible sous peu en version papier, imprimé à la demande par un service d’impression en ligne. Les bénéfices iront à l’association OSGeo-fr, notamment pour pouvoir faire la promotion des outils libres SIG sur les salons.

QGIS 1.6.0 «Copiapo»

Mardi, 30 Novembre 2010

La nouvelle version de QGIS, le SIG bureautique libre dynamique, est sortie. Voici la traduction de l’annonce de sortie :

Nous sommes heureux d’annoncer la sortie de QGIS 1.6.0 ‘Copiapo’

Des paquets binaires et source sont disponibles sur http://download.qgis.org

Cette version inclus de nombreuses nouvelles fonctionnalités pour rendre votre utilisation de QGIS encore meilleure que précédemment. Cette version contient aussi beaucoup de corrections de bugs qui devraient améliorer la stabilité comparé aux versions précédentes. Voir ci dessous pour une liste plus détaillée des changements.

Pendant cette sortie de QGIS 1.6.0, l’équipe de gestion de la communauté QGIS travaille dur sur la mise à jour du manuel utilisateur de QGIS pour la version 1.6. Le guide sera bientot prêt, et nous l’annoncerons dès qu’il sera disponible.

QGIS est un projet dirigé entièrement par des volontaires, et résulte du travail d’une équipe dédiée de développeurs, documenteurs et supporters. Nous adressons nos remerciements et notre gratitude aux très nombreuses heures que les gens ont passées pour que cette nouvelle version voie le jour.

Si vous voulez faire une donation ou sponsoriser notre projet, visitez notre page dédiée. QGIS est un logiciel libre, et vous n’avez donc aucune obligation pour cela. Nous voudrions remercier toutes les personnes qui ont fait des donations par le passé. Celles ci nous aident à tenir un hackfest tous les six mois, où nous préparons pour vous de nouvelles fonctionnalités excitantes !

Les binaires de la version windows ont été téléchargés près de 100000 fois, et nous espérons que cette version sera au moins aussi populaire!

Bonne QGISation!

Quoi de neuf dans la version 1.6.0 ‘Copiapo’ ?

(more…)