Een serie kaarten genereren

[For a modified version, go to this article.]
Sometimes you need to produce a series of similar thematic maps. The only difference is the field used to colour areas or show graduated symbols. Classifications or maximal symbol sizes are identical. For large numbers of maps it is quite annoying to repeat the same actions in QGIS over and over again. Moreover, mistakes are easily made this way. This article explains how the production of large numbers of maps can be automated. The steps are described for Windows, but it wouldn’t be difficult to develop a similar procedure for Linux.
Read More

Meer combi's Top10NL en AHN25 in QGIS 1.8

As of July 2012, Dutch Geo-office Kadaster has published an update of the Top10NL topographic GIS data set. Areas of central-NL + Rotterdam have been updated. Some ‘holes’ in the terrain have now been corrected, and the new industrial port area “Maasvlakte 2” (under construction) is now visible for the first time.
The data set can be ordered at no charge through this Kadaster page (in Dutch); use nlextract.nl to convert the GML dataset to PostGIS.
In a previous article I’ve combined the Top10NL with the AHN25 Height/relief data set of 2005/2006. QGIS 1.8 supports this nicely.
Below are two more examples, with the AHN on 15% opacity (85% transparency). The building blocks are at 100% opacity on top of AHN due to the low resolution of AHN, plus the fact that buildings more recent than 2005 aren’t visible on AHN anyway. But the examples illustratie that sand/dune areas and river areas can be nicely visualised:
Zandvoort and Amsterdam Water irrigation dunes, Top10NL + AHN25
Zandvoort and Amsterdam Water irrigation dunes, Top10NL + AHN25
Complex water structure of the Meuse at Roermond, Top10NL + AHN25
Complex water structure of the Meuse at Roermond, Top10NL + AHN25

Direct data uit Excel-bestand gebruiken

In response to my previous article about joining data from a csv file, I received a very good tip. From QGIS 1.8 Excel files can be opened directly in QGIS. Strange enough, nothing is mentioned about this in the ‘release notes’. It only works with the older XLS-format, not with the newer XLSX format.
You can open an Excel file with the menu option or button ‘Add new vector layer’. That is confusing for non-spatial data. Your Excel file should contain a column to be used to join both layers. Further, you need one or more columns with the data you want to display. Co-ordinates are not required. Set the file type filter to ‘All files’. Otherwise your Excel-file will not be visible. The dialog doesn’t contain a special filter for Excel files.
If all went well, you can now join the table to a spatial layer, like described in my previous article.

Koppelen van data uit CSV-bestand

In a previous article I have shown how data from a text file with points can be displayed as an additional layer on top of a layer consisting of areas. There was no connection between de data from both layers. This article explains how areas in one layer can be coloured based on data from a text file in another layer. As an example the proximity of department stores in Dutch municipalities in 2010 is used.

Read More

Esri File Based Geodatabases en Oracle connecties openen met QGIS

GDAL and OGR (www.gdal.org) libs from Frank van Warmerdam are famous software libraries which make it possible in the Open Source world to read and write a plethora of gis file formats. The nice thing about QGIS is that it using OGR and GDAL. So with every addition or enhancement in those libraries, QGIS itself is also getting better.
One example (while we offcourse ourselves will never use it 😉 ), is when somebody sents you a FGDB (File Geodatabase) from Esri. Since version 1.9, OGR can read and write with this format. Remark from the docs: “File GDB must be ArcGIS version 10, 9.3.1 is not supported.”
When using OGR 1.9 in QGIS, it is possible top epen FGDB fieles. Happily it is not difficult for Windows users to use OGR 1.9. If you use an OSGEO4W install of QGIS (see this post). If you checked ‘gdal filegdb’ QGIS should be able to open fgdb’s. For Linux users it is possible to get OGR 1.9 from repositories like ‘ubuntugis’ or ‘elgis’ see download.qgis.org.
To try this out we off course have to get a fgdb file… Googling you find them (off course) available at Esri. After a registration (!) you can download an example fgdb of North America.
Unzipping this you will find a directory ‘FileGDB API/samples/data’ in which you find directories with names ending with .gdb. One of those dirs is what Esri calls a FileGDB. There is not so much to see in those dirs. It is full with files having cryptic names like a00000015.gdbtablx a00000015.spx etc etc.
Happily QGIS kan handle this. Via menu or buttons go to ‘Add Vector Layer’ and select ‘Directory’. As ‘source choose ‘ESRI FileGDB’. If you do not have this as an option, you are apparently working with a OGR/GDAL version lower then 1.9 (see below how to find out) which cannot do fgdb. If you can, browse to the directory you .gdb directory we viewed before.

Select ‘topo.gdb’

After selecting this directory, it appears to hold several data sources: states, us_lakes, us_rivers etc. We select several of them.
Bingo. We see them as normal vector layers, and are able to style and edit them.

QGIS kan also open and visualize data from an Oracle Database.
Here the same adagio: only if your installed OGR library is capable of it: QGIS can do it. But if so: just open a connection to a database vector layer:



How kan you find out which ogr library you have installed and used by QGIS ?
Via the Help/About menu there is the tab ‘About’ which exactly shows you which libraries are used by QGIS, and which version of them:

How to find out which formats are compiled into your ogr/gdal libraries?
You have to go to a command line (via osgeo4w.bat in your osgeo4w directory if you are on windows):

c:\osgeo4w>ogrinfo --formats

en

c:\osgeo4w>gdalinfo --formats

This will give you a long list of formats that can be openedn. To check if fgdb (gdb) and Oracle (oci) are available, search for those strings in the output:

c:\osgeo4w>ogrinfo --formats | grep -i gdb
Supported Formats:
-> "FileGDB" (read/write)
c:\osgeo4w>ogrinfo --formats | grep -i oci
-> "OCI" (read/write)

How to get an org/gdal version which Hoe kom je aan een ogr/gdal die WEL fgdb en/of oracle ondersteund?
As told here above, for Windows users a QGIS install via OSGeo4w QGIS installatie met OSGeo4w is the best way (the standalone/msi installer of QGIS does not have these options).
For Linux user, compiling GDAL yourself is the (only?) solution. Reason for this is dat Oracle, Esri and Erdas do not want the Open Source community to (re)package their binaries. So you have to go all the way, and download the SDK’s and with that compile GDAL yourself.