[Qgis-developer] Best practice for a new Vector Data Provider

Sverre Jonassen sverre.jonassen at norkart.no
Wed Jan 28 04:05:25 PST 2015


Hi everybody,

I am currently trying to make a new vector data provider with a source select dialog for QGIS so that QGIS can read and display data stored in a custom format. The format in question proprietary to software developed and maintained by the company I work at. I am quite new to developing for QGIS and I am struggling to find the best approach to do this. I hope that somebody out there can help me. I have not been able to find any internet resources on best practices for a data provider plugin.

So far, I have succeeded in creating a very simple vector data provider plugin and accessing it through a source select dialog (which I have added to the src/ui/-folder). This is, of course, not a suitable approach as it would mean that I have to build and deploy my own version of QGIS instead of a plugin. As far as I have understood it, there might be 3 possible approaches for me to make a new provider with a source select dialog:

1)     An ordinary C++ plugin for the source select dialog containing the provider. Is this possible? I have tried this and so far not succeeded.

2)     A provider plugin containing all necessary ui. Is this possible? And if so, how can I add a menu-item to activate the source select dialog?

3)     A provider plugin without ui and a separate plugin with the source select dialog.

A fourth option would be to create a plugin for OGR. This is, however, not a good solution for me because I would run a high risk of data conversion errors. Our format is much more similar to the QGIS internal geodata model than to the OGR geodata model.

I am developing on the Windows platform, using Visual Studio 2010. Primarily I want to create a C++-plugin since the API for our proprietary format is written in C++, and because my daily development environment has no support for Python.

Any help would be greatly appreciated,

Best regards,

Sverre Jonassen
Senior software engineer
sverre.jonassen at norkart.no<mailto:Navn.navnsen at norkart.no>
+47 402 45 794


[cid:image002.png at 01D03AFB.14316C50]

Løkketangen 20A
Postboks 145
N- 1300 Sandvika
+47 67 55 14 00
norkart.no<http://www.norkart.no/>
______

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20150128/9f5c9d60/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 4594 bytes
Desc: image002.png
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20150128/9f5c9d60/attachment-0001.png>


More information about the Qgis-developer mailing list