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

Sverre Jonassen sverre.jonassen at norkart.no
Thu Jan 29 02:37:29 PST 2015


Hi Stefan,


Yes, we have considered the OGR/GDAL driver. Currently we believe that implementing a QGIS provider is the best approach for us, because the gap between our own model and the QGIS model is much less than the gap between our own model and the OGR model.



That being said, we have not yet decided on a solution and tomorrow we might think differently.  Being able to access/use our data files in other OSGeo tools as well is definitely a very strong argument.



Best Regards

Sverre Jonassen
+47 402 45 794

Fra: Blumentrath, Stefan [mailto:Stefan.Blumentrath at nina.no]
Sendt: 28. januar 2015 17:20
Til: Sverre Jonassen; qgis-developer at lists.osgeo.org
Emne: RE: Best practice for a new Vector Data Provider

Hei Sverre,

Did you consider writing a GDAL/OGR driver for your format, which then could be used by QGIS for accessing it?
That way it could also be used in / accessed by other OSGeo tools?

Cheers
Stefan

From: qgis-developer-bounces at lists.osgeo.org<mailto:qgis-developer-bounces at lists.osgeo.org> [mailto:qgis-developer-bounces at lists.osgeo.org] On Behalf Of Sverre Jonassen
Sent: 28. januar 2015 13:05
To: qgis-developer at lists.osgeo.org<mailto:qgis-developer at lists.osgeo.org>
Subject: [Qgis-developer] Best practice for a new Vector Data Provider

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:image001.png at 01D03BB6.FBB404F0]

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/20150129/31c1033e/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 4594 bytes
Desc: image001.png
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20150129/31c1033e/attachment-0001.png>


More information about the Qgis-developer mailing list