<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi again,<br>
    Having the constraint in does appear, when loading tables directly
    into QGIS, to help QGIS in defining what kind of Geometry the table
    has. I don't believe that it will help you much in relation to the
    WFS though.<br>
    Might I suggest you add  a "Place Holder" to your dataset, as in a
    Temporary Line (polygon or point), at the far extents of your
    dataset for example 0,0 to 10,0 or something like that, that will
    give you a feature from which , when the WFS is loaded, QGIS can see
    that it is a certain geometry.<br>
    I am sorry I cant be of more help.<br>
    Regards,<br>
    <br>
    Richard.<br>
    <br>
    <div class="moz-cite-prefix">On 04/07/2017 08:33, Lars I. Nielsen,
      LIFA A/S wrote:<br>
    </div>
    <blockquote
      cite="mid:6EDB455314CAD940983B0F3ACAC4B0A53A893F3F@Mail2010.LIFA.DK"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <meta name="Generator" content="Microsoft Word 14 (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:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Arial Narrow";
        panose-1:2 11 6 6 2 2 2 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
pre
        {mso-style-priority:99;
        mso-style-link:"Formateret HTML Tegn";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Markeringsbobletekst Tegn";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";
        color:black;
        mso-fareast-language:EN-US;}
span.MarkeringsbobletekstTegn
        {mso-style-name:"Markeringsbobletekst Tegn";
        mso-style-priority:99;
        mso-style-link:Markeringsbobletekst;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
span.FormateretHTMLTegn
        {mso-style-name:"Formateret HTML Tegn";
        mso-style-priority:99;
        mso-style-link:"Formateret HTML";
        font-family:Consolas;
        color:black;
        mso-fareast-language:EN-US;}
span.EmailStyle23
        {mso-style-type:personal-reply;
        font-family:"Arial Narrow","sans-serif";
        color:windowtext;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:3.0cm 2.0cm 3.0cm 2.0cm;}
div.WordSection1
        {page:WordSection1;}
--></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]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span style="color:windowtext" lang="EN-US">Hi
            Richard, <o:p>
            </o:p></span></p>
        <p class="MsoNormal"><span style="color:windowtext" lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color:windowtext" lang="EN-US">Thanks
            for the reply.<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:windowtext" lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color:windowtext" lang="EN-US">I
            failed to mention, that I’m using MS/SQL 2016 as my
            database, but I should be able to add geometry constraint in
            it.<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:windowtext" lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color:windowtext" lang="EN-US">But
            then again, I want to tell QGIS that it’s a line layer, and
            I’m uncertain whether such proposed database constraints
            will do that, Postgres or not ?<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:windowtext" lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color:windowtext" lang="EN-US">Is
            there not any way to tell/force QGIS to recognize/designate
            a WFS layer with no features to be of a certain topology
            (here: lines) ?<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:windowtext" lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color:windowtext" lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"Arial
            Narrow","sans-serif";mso-fareast-language:DA">Med
            venlig hilsen<br>
          </span><b><span
style="font-size:10.0pt;font-family:"Verdana","sans-serif";mso-fareast-language:DA"><br>
            </span></b><span
            style="font-size:10.0pt;font-family:"Arial
            Narrow","sans-serif";mso-fareast-language:DA">Lars
            I. Nielsen, LIFA A/S<br>
            GIS-konsulent<br>
          </span><span
style="font-size:8.0pt;font-family:"Verdana","sans-serif";mso-fareast-language:DA"><br>
          </span><b><span
              style="font-size:10.0pt;font-family:"Arial
              Narrow","sans-serif";mso-fareast-language:DA">LIFA
              A/S Landinspektører<br>
            </span></b><span
            style="font-size:8.0pt;font-family:"Arial
            Narrow","sans-serif";mso-fareast-language:DA"><br>
          </span><b><span
              style="font-size:10.0pt;font-family:"Arial
              Narrow","sans-serif";color:red;mso-fareast-language:DA">T</span></b><span
            style="font-size:10.0pt;font-family:"Arial
            Narrow","sans-serif";color:red;mso-fareast-language:DA"> 
          </span><span style="font-size:10.0pt;font-family:"Arial
            Narrow","sans-serif";mso-fareast-language:DA">6313
            6800    </span><b><span
              style="font-size:10.0pt;font-family:"Arial
              Narrow","sans-serif";color:red;mso-fareast-language:DA">@ 
            </span></b><span
            style="font-size:10.0pt;font-family:"Arial
            Narrow","sans-serif";mso-fareast-language:DA"><a class="moz-txt-link-abbreviated" href="mailto:lin@lifa.dk">lin@lifa.dk</a><br>
          </span><b><span
              style="font-size:10.0pt;font-family:"Arial
              Narrow","sans-serif";color:red;mso-fareast-language:DA">D 
            </span></b><span
            style="font-size:10.0pt;font-family:"Arial
            Narrow","sans-serif";mso-fareast-language:DA">6313
            6849   
          </span><b><span
              style="font-size:10.0pt;font-family:"Arial
              Narrow","sans-serif";color:red;mso-fareast-language:DA">W 
            </span></b><span
            style="font-size:10.0pt;font-family:"Arial
            Narrow","sans-serif";mso-fareast-language:DA"><a class="moz-txt-link-abbreviated" href="http://www.lifa.dk">www.lifa.dk</a> <br>
          </span><b><span
              style="font-size:10.0pt;font-family:"Arial
              Narrow","sans-serif";color:red;mso-fareast-language:DA">M 
            </span></b><span
            style="font-size:10.0pt;font-family:"Arial
            Narrow","sans-serif";mso-fareast-language:DA">2492
            4866<br>
            <br>
            <br>
          </span><span style="font-family:"Arial
            Narrow","sans-serif";color:windowtext"><o:p></o:p></span></p>
        <div>
          <div style="border:none;border-top:solid #B5C4DF
            1.0pt;padding:3.0pt 0cm 0cm 0cm">
            <p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext;mso-fareast-language:DA">Fra:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext;mso-fareast-language:DA">
                Richard McDonnell [<a class="moz-txt-link-freetext" href="mailto:richard.mcdonnell@opw.ie">mailto:richard.mcdonnell@opw.ie</a>] <br>
                <b>Sendt:</b> 30. juni 2017 12:39<br>
                <b>Til:</b> Lars I. Nielsen, LIFA A/S;
                '<a class="moz-txt-link-abbreviated" href="mailto:qgis-user@lists.osgeo.org">qgis-user@lists.osgeo.org</a>'<br>
                <b>Emne:</b> Re: [Qgis-user] Unknown topology of empty
                WFS layer ?<o:p></o:p></span></p>
          </div>
        </div>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal" style="margin-bottom:12.0pt">Hi,<br>
          Not sure if this is exactly what you are looking for.<br>
          Your Layers, Ive no idea what database type you are using, but
          on PostgreSQL/PostGIS you can put in geometry Constraints
          using
          <br>
          <br>
          ALTER TABLE public."Table_Name"<br>
          <br>
          and one of the following, depending on what Geometry type you
          are looking at.<br>
          <br>
          ADD CONSTRAINT enforce_geotype_geom CHECK (geometrytype(geom)
          = 'MULTIPOLYGON'::text OR geom IS NULL);<br>
          <br>
          ADD CONSTRAINT enforce_geotype_geom CHECK (geometrytype(geom)
          = 'POLYGON'::text OR geom IS NULL);<br>
          <br>
          ADD CONSTRAINT enforce_geotype_geom CHECK (geometrytype(geom)
          = 'POINT'::text OR geom IS NULL);<br>
          <br>
          ADD CONSTRAINT enforce_geotype_geom CHECK (geometrytype(geom)
          = 'LINESTRING'::text OR geom IS NULL);<br>
          <br>
          I hope this helps<br>
          Reagrds,<br>
          <br>
          Richard<o:p></o:p></p>
        <div>
          <p class="MsoNormal">On 30/06/2017 10:39, Lars I. Nielsen,
            LIFA A/S wrote:<o:p></o:p></p>
        </div>
        <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
          <p class="MsoNormal"><span lang="EN-US">Hi,</span><o:p></o:p></p>
          <p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
          <p class="MsoNormal"><span lang="EN-US">I’m preparing a QGIS
              project for a customer, and have (among other) three
              layers with points, lines, and areas respectively.</span><o:p></o:p></p>
          <p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
          <p class="MsoNormal"><span lang="EN-US">I’m adapting the
              project from a previously made project by altering the
              data connections. The databases are identical in
              structure, so it works. The layers are all fetched using
              WFS-T.</span><o:p></o:p></p>
          <p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
          <p class="MsoNormal"><span lang="EN-US">So far I only have
              data in the points and areas layers, none in the lines
              layer. The lines dataset (table) in the database is
              present, and published as WFS (Geoserver), and all
              metadata (afaik) is present (i.e. “geometry_columns”).</span><o:p></o:p></p>
          <p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
          <p class="MsoNormal"><span lang="EN-US">I would like to be
              able to digitize lines into the line layer, but apparently
              QGIS cannot determine the topology, and (I suppose that’s
              also why) I can’t add any styles via the “properties”
              dialog or elsewhere.</span><o:p></o:p></p>
          <p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
          <p class="MsoNormal"><span lang="EN-US">Is there any way, that
              I can tell QGIS that the layer should contain line
              features ?</span><o:p></o:p></p>
          <p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
          <p class="MsoNormal"><span lang="EN-US">And how can I add
              suitable (line) styles to display the lines without any
              features present ?</span><o:p></o:p></p>
          <p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
          <p class="MsoNormal">Using 2.18.7 (32+64) Windows<o:p></o:p></p>
          <p class="MsoNormal"> <o:p></o:p></p>
          <p class="MsoNormal"> <o:p></o:p></p>
          <p class="MsoNormal"><span style="font-size:10.0pt">Med venlig
              hilsen<br>
              <b><br>
              </b>Lars I. Nielsen, LIFA A/S<br>
              GIS-konsulent<br>
            </span><span
style="font-size:8.0pt;font-family:"Verdana","sans-serif";mso-fareast-language:DA"><br>
            </span><span style="font-size:8.0pt"><br>
              <img id="Billede_x0020_1"
                src="cid:part1.00030505.06000603@opw.ie"
                alt="http://website.lifa.dk/lsp.gif" height="77"
                width="270"><br>
            </span><span
style="font-size:8.0pt;font-family:"Verdana","sans-serif";mso-fareast-language:DA"><br>
              <br>
            </span><b><span style="font-size:10.0pt">T</span></b><span
style="font-size:9.0pt;font-family:"Arial","sans-serif";color:red;mso-fareast-language:DA"> 
            </span><span style="font-size:10.0pt">6313 6800    <b>@  </b><a
                moz-do-not-send="true" href="mailto:lin@lifa.dk"><a class="moz-txt-link-abbreviated" href="mailto:lin@lifa.dk">lin@lifa.dk</a></a><br>
              <b>D  </b>6313 6849    <b>W  </b><a
                moz-do-not-send="true" href="http://www.lifa.dk"><a class="moz-txt-link-abbreviated" href="http://www.lifa.dk">www.lifa.dk</a></a> <br>
              <b>M  </b>2492 4866</span><o:p></o:p></p>
          <p class="MsoNormal"><span
              style="font-size:12.0pt;font-family:"Times New
              Roman","serif";mso-fareast-language:DA"><br>
              <br>
              <br>
              <o:p></o:p></span></p>
          <pre>_______________________________________________<o:p></o:p></pre>
          <pre>Qgis-user mailing list<o:p></o:p></pre>
          <pre><a moz-do-not-send="true" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><o:p></o:p></pre>
          <pre>List info: <a moz-do-not-send="true" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><o:p></o:p></pre>
          <pre>Unsubscribe: <a moz-do-not-send="true" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><o:p></o:p></pre>
        </blockquote>
        <p class="MsoNormal"><span
            style="font-size:12.0pt;font-family:"Times New
            Roman","serif";mso-fareast-language:DA"><o:p> </o:p></span></p>
        <div>
          <p class="MsoNormal"><span
              style="font-size:12.0pt;font-family:"Times New
              Roman","serif";mso-fareast-language:DA">--
              <br>
              <b><u>Richard McDonnell</u></b><br>
            </span><b><span
                style="font-size:7.5pt;font-family:"Times New
                Roman","serif";mso-fareast-language:DA">GIS
                Specialist PgD GIS AssocSCSI</span></b><span
              style="font-size:12.0pt;font-family:"Times New
              Roman","serif";mso-fareast-language:DA"><br>
            </span><b><span
                style="font-size:10.0pt;font-family:"Times New
                Roman","serif";mso-fareast-language:DA">OPW
                FRM Data Management</span></b><span
              style="font-size:12.0pt;font-family:"Times New
              Roman","serif";mso-fareast-language:DA"><br>
            </span><b><span
                style="font-size:10.0pt;font-family:"Times New
                Roman","serif";mso-fareast-language:DA">52
                Stephens Green, Dublin 2.</span></b><span
              style="font-size:12.0pt;font-family:"Times New
              Roman","serif";mso-fareast-language:DA"><br>
            </span><span style="font-size:7.5pt;font-family:"Times
              New Roman","serif";mso-fareast-language:DA">TEL:
              01 6476543</span><span
              style="font-size:12.0pt;font-family:"Times New
              Roman","serif";mso-fareast-language:DA"><o:p></o:p></span></p>
        </div>
        <p class="MsoNormal"><span
            style="font-size:12.0pt;font-family:"Times New
            Roman","serif";mso-fareast-language:DA"><a
              moz-do-not-send="true" href="http://www.opw.ie/"><span
                style="text-decoration:none"><img moz-do-not-send="true"
                  id="_x0000_i1026"
                  src="http://www.opw.ie/en/media/opw-logo-december-2016.gif"
                  border="0" height="225" width="405"></span></a><o:p></o:p></span></p>
      </div>
    </blockquote>
    <br>
    <div class="moz-signature">-- <br>
      <b><u>Richard McDonnell</u></b><br>
      <b><small><small><small>GIS Specialist PgD GIS AssocSCSI</small></small></small></b><br>
      <b><small>OPW FRM Data Management</small></b><br>
      <b><small>52 Stephens Green, Dublin 2.</small></b><br>
      <small><small>TEL: 01 6476543</small></small></div>
  <p></p>
<a href="http://www.opw.ie/"><img src="http://www.opw.ie/en/media/opw-logo-december-2016.gif" width="405" height="225" /></a>
</body>
</html>