<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
span.EpostStil17
        {mso-style-type:personal-compose;
        font-family:"Arial",sans-serif;
        color:windowtext;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:2012634777;
        mso-list-type:hybrid;
        mso-list-template-ids:1361718228 68419601 68419609 68419611 68419599 68419609 68419611 68419599 68419609 68419611;}
@list l0:level1
        {mso-level-text:"%1\)";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="NO-BOK" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">Hi everybody,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">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:<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif"><span style="mso-list:Ignore">1)<span style="font:7.0pt "Times New Roman"">    
</span></span></span><![endif]><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">An ordinary C++ plugin for the source select dialog containing the provider. Is this possible? I have tried this and so far not succeeded.<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif"><span style="mso-list:Ignore">2)<span style="font:7.0pt "Times New Roman"">    
</span></span></span><![endif]><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">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?<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif"><span style="mso-list:Ignore">3)<span style="font:7.0pt "Times New Roman"">    
</span></span></span><![endif]><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">A provider plugin without ui and a separate plugin with the source select dialog.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">Any help would be greatly appreciated,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#272726;mso-fareast-language:NO-BOK">Best regards,<o:p></o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#272726;mso-fareast-language:NO-BOK"><o:p> </o:p></span></b></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#272726;mso-fareast-language:NO-BOK">Sverre Jonassen</span></b><span lang="EN-US" style="font-size:10.0pt;color:black;mso-fareast-language:NO-BOK"><o:p></o:p></span></p>
<p class="MsoNormal"><i><span lang="EN-US" style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#272726;mso-fareast-language:NO-BOK">Senior software engineer</span></i><span lang="EN-US" style="font-size:8.0pt;color:black;mso-fareast-language:NO-BOK"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:NO-BOK"><a href="mailto:Navn.navnsen@norkart.no"><i><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#51A026;text-decoration:none">sverre.jonassen@norkart.no</span></i></a></span><span style="font-size:8.0pt;color:#51A026;mso-fareast-language:NO-BOK"><o:p></o:p></span></p>
<p class="MsoNormal"><i><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#272726;mso-fareast-language:NO-BOK">+47 402 45 794</span></i><span style="font-size:8.0pt;color:black;mso-fareast-language:NO-BOK"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;color:black;mso-fareast-language:NO-BOK"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;color:black;mso-fareast-language:NO-BOK"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;color:black;mso-fareast-language:NO-BOK"><img border="0" width="135" height="37" id="Bilde_x0020_1" src="cid:image002.png@01D03AFB.14316C50"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;color:black;mso-fareast-language:NO-BOK"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#272726;mso-fareast-language:NO-BOK">Løkketangen 20A</span><span style="font-size:8.0pt;color:black;mso-fareast-language:NO-BOK"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#272726;mso-fareast-language:NO-BOK">Postboks 145</span><span style="font-size:8.0pt;color:black;mso-fareast-language:NO-BOK"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#272726;mso-fareast-language:NO-BOK">N- 1300 Sandvika</span><span style="font-size:8.0pt;color:black;mso-fareast-language:NO-BOK"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#272726;mso-fareast-language:NO-BOK">+47 67 55 14 00</span><span style="font-size:8.0pt;color:black;mso-fareast-language:NO-BOK"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:NO-BOK"><a href="http://www.norkart.no/"><i><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#51A026;text-decoration:none">norkart.no</span></i></a></span><span style="font-size:8.0pt;color:#51A026;mso-fareast-language:NO-BOK"><o:p></o:p></span></p>
<p class="MsoNormal"><i><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#51A026;mso-fareast-language:NO-BOK">______</span></i><i><span style="font-family:"Arial",sans-serif;mso-fareast-language:NO-BOK"><o:p></o:p></span></i></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>