Quantum GIS plugin for Czech cadastral data

This paper presents new Quantum GIS plugin for Czech cadastral data and its development. QGIS is a rapidly developing cross-platform desktop Geographic Information System (GIS) released under the GNU GPL. QGIS is written in C++, and uses the Qt library. The plugin is developed in C++, too. The new plugin can work with Czech cadastral data in the new Czech cadastral exchange data format called VFK (or NVF). Data are accessed through VFK driver of the OGR library. The plugin should facilitate the work with cadastral data by easy search and presenting well arranged information. Information is displayed in the way similar to web applications, thus the control is friendly and familiar for users. The plugin supports interaction with map using QGIS functionality and it is able to export various cadastral reports. This paper provides ideas which can be generalized to develop QGIS plugin dealing with specific data.


Czech cadastre
Modern Czech cadastre has a long history with roots in Austria-Hungary in the 19th century.Since 2001 the Czech Cadastral Office for Surveying, Mapping and Cadastre (ČÚZK) has provided cadastral data in electronic form via the Information System of the Cadastre of Real Estate (ISKN) [1].Many organizations and companies, both state and commercial, use this opportunity at an increasing rate.Several data formats exist, some of them comply with INSPIRE specifications [2].
The most used format is the Czech cadastral exchange data format called VFK (or NVF) which contains all data related to real estate.Unlike the other formats VFK contains information about ownership.Cadastral data in VFK are widely used by municipalities and state institutions for execution of their duties.
For using VFK data proper software is needed.Beside some proprietary programs, there have been attempts to provide free software solution: module v.in.vfk for GRASS GIS, Otevřený katastr (Open Cadastre) [3] for import to PostGIS and VFK driver [4] in OGR library.The last-named has the advantage that GDAL/OGR library is used by many programs, both proprietary and free open source.However, typical end-user is not able to access the functionality without some wrapper application providing graphical user interface (GUI).
For working with cadastral data which are basically spatial data an ideal environment is a Geographical Information System (GIS).

QGIS
For the development of the application we decided to use Quantum GIS (QGIS) [5].QGIS has many advantages both for the user (e.g.customizable and easy to use GUI) and the developer (e.g.good API, simple plugin system).
QGIS is a free open source GIS licensed under GNU GPL 1 .QGIS is written in C++ programming language and uses Qt framework2 .There are several possibilities how to add new functionality to QGIS.Firstly, a new plugin for QGIS desktop application can be written in C++ or Python.Secondly, it is possible to build your own application based on QGIS library.Finally, you can directly modify existing QGIS application.
The presented plugin was developed for QGIS Desktop, however also other components of QGIS exists (e.g.QGIS Server, QGIS Browser).In order to develop a plugin for QGIS it is necessary to use QGIS API (Application Programming Interface).The API is well documented and a guide for plugin development is available, too.
Thanks to GPL license everyone who obtains QGIS application can obtain also its source codes.As a result one can prove how performed analyses are implemented which is crucial for academic work [6].For public administration, low cost of free open source software can be a decision criterion.Efforts to introduce free open source solutions to public administration can be found on European level. 3

VFK data format
The Czech cadastral exchange data format called VFK (or NVF) replaced previous format VKM in 1996 4 .Files in this format are provided by the Czech Office for Surveying, Mapping and Cadastre.VFK contains information about real properties (parcels, buildings, building units), including their description, geometry and related property rights.In contrast to other current Czech cadastral formats (e.g.INSPIRE Cadastral Parcels), VFK contains information about owners.VFK files are provided to public for fee, however municipalities and state institutions obtain it free of charge [7].
From the technical point of view VFK is a text format which resembles CSV format (see below).Official format description and underlying database schema is provided, however this documentation [8] is not sufficient for building queries.The description provided in [9] was used as a reference for the plugin development.For schema overview refer to figure 1.

OGR-VFK driver
OGR 5 is an free open source C++ library which enables read (and in certain cases also write) access to various geospatial vector formats including ESRI Shapefile, PostGIS or Oracle Spatial.OGR is the part of GDAL library, therefore it is also referred as GDAL/OGR.This library is used in many free open source software projects like GRASS GIS, QGIS or MapServer and in proprietary software (e.g.ESRI ArcGIS) which is possible thanks to MIT style free software license.The support of the Czech cadastral exchange format (VFK) was missing till 2010 when M. Landa [4] implemented the VFK driver which has then become the part of the library.Thanks to the driver every software using OGR library can access Czech cadastral data in VFK format.
During the QGIS VFK plugin development the VFK driver was improved by its author in order to reflect needs of the plugin.The most significant enhancement is the export to SQLite3 file database.This file is then used by the plugin but it can be accessed by any SQLite browsing and editing tools.

QGIS plugin for Czech cadastral data
QGIS plugin for Czech cadastral data is primary intended for using by local municipalities.The implementation of VFK driver in OGR library enabled to view Czech cadastral data in QGIS, however it was still inconvenient to browse the non-spatial but significant part of the data which is represented by a large and complex set of attribute tables.The aim of the plugin is to facilitate the work with this kind of data which can be then viewed and analysed in relation to the spatial part.
The development of the plugin was split into two parts.During the first part we developed an application not connected to QGIS.This involved the development of the crucial functionality -database search in SQLite database created by VFK-OGR driver, and generating and exporting various reports.During the second part the application was connected to QGIS as a plugin so that the map interaction could be implemented.
Data are handled by the plugin in the following way.QGIS reads spatial data from VFK file through VFK-OGR driver.The driver creates SQLite file, from which plugin reads attributes of spatial features and other related non-spatial data.Plugin connects these two sets of data through unique identifiers defined in VFK documentation [8].
In order to use the plugin functionality user is supposed to open the VFK file from within the plugin instead of using the QGIS standard dialog for adding vector layers.This enables to optimize loading process comparing to standard QGIS OGR layer loading process by avoiding calling certain unnecessary procedures.
Another improvement affecting the performance is the fact that the driver uses the SQLite database file from previous run if available.During the plugin development crucial attribute columns were identified and VFK-OGR driver now creates database indices for this columns.Indices improve the speed of attribute querying in the plugin.These changes were implemented by the author of the VFK-OGR driver.
The plugin was developed with development version of QGIS and development version of OGR.

Plugin functionality
Plugin is in the stage of first prototype and its functionality is so far limited.However, it contains basic functionality to solve all common tasks.This functionality includes search according to various parameters depending on searched feature or object.Currently it is possible to search information about parcels, buildings and owners.Several reports are available: • report about parcels • report about buildings • report about building units (flats or non-residential space) • report about owners • ownership reports (according to Czech cadastre style) These reports are interconnected (figure 2) so that the user can easily get from one report to another.
Plugin contains a browser similar to the standard web browser.This browser enables interactive browsing of attribute data in the following way: • Hyperlinks are used for navigation through various reports.
• Navigation includes buttons Back and Forward.
• Browsing history of visited pages does not require to redo database queries.
Plugin provides the possibility to show current state of parcels and buildings in web application Viewing Cadastre (Nahlížení do katastru nemovitostí, ČÚZK application) which provides limited access to cadastral data with map interface.This application is launched in system web browser showing currently selected feature.Unlike Viewing Cadastre, VFK plugin provides possibility to search by owner (e.g.find all real estates of one owner).
Reports generated by the plugin can be exported into two formats -HTML with CSS stylesheet and L A T E X(enables creating PDF).HTML can be easily imported to OpenOffice.org or LibreOffice so that the document structure is preserved.
In order to use information from database search or search information about features selected in map the following functionality for synchronizing was developed: • Parcels and buildings which are currently shown in plugin browser can be selected (highlighted) in the map.
• Information about selected feature(s) in the map can be shown in plugin browser.
For convenience, cadastral map layers are displayed with predefined style.Most importantly it includes displaying parcel numbers with special cadastral formatting (style originally coming from Austria-Hungary).
Brief help page is embedded in the plugin.It contains hyperlinks to find wanted functionality easily.
It is worth noting that when using the plugin user can profit from all the functionality provided by QGIS too (e.g.loading WMS layers).

Plugin GUI
The graphical user interface (GUI) of the plugin is divided into two main parts -the browser showing data reports and the control panel with toolbar for data import and search.The GUI was designed so that new functionality could be added easily without making the GUI cumbersome.
Thanks to powerful Qt framework, the plugin window can be floating or docked anywhere in QGIS application window (see figures 3 and 4).This is particularly advantageous to users using large screens.This way user can see both the map and related data.

Further development
Further development will be based on results of testing.Nevertheless, there are some improvements which are already planned: • the direct support of other output formats (PDF, ODF) • export of geometry • using threads for time consuming data loading and querying (make the user interface responsive) • database file handling • add more layer styles

Conclusion
The Czech Cadastral Office for Surveying, Mapping and Cadastre manages large database containing both spatial and non-spatial data.These data have been used increasingly since launching Internet based Remote Access in 2001 [1].The majority of clients is coming from public administration which gets this data free of charge [7].
Presented plugin aims to local municipalities which need tools for accessing these data.They can gain advantage from solution which uses free open source software.Apart from money saving, they avoid dependency on one certain software supplier and they can get software which respects their needs [10].The plugin makes use of two free open source projects QGIS and GDAL/OGR to provide functionality needed for handling Czech cadastral data.It uses GIS environment to interactively browse spatial and attribute data and bind them together to get clear overview.

Acknowledgement
We are grateful to the author of VFK-OGR driver, Ing.Martin Landa, for additional enhancements of the driver needed for the plugin.We also thank to Mr. Jiri Sobotik from municipality Novy Jicin who encourages us to start the plugin development and contributes with his ideas about plugin functionality and testing.

Figure 1 :
Figure 1: Simplified relations between entities in database (for full schema please refer to [9])

Figure 2 :
Figure 2: Interconnections between the reports

Figure 3 :
Figure 3: Plugin showing information about parcels' owner

Figure 4 :
Figure 4: Docked plugin window with hidden control panel