<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    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<br>
    <br>
    <div class="moz-cite-prefix">On 30/06/2017 10:39, Lars I. Nielsen,
      LIFA A/S wrote:<br>
    </div>
    <blockquote
      cite="mid:6EDB455314CAD940983B0F3ACAC4B0A53A893412@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: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";
        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.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";
        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-compose;
        font-family:"Calibri","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 lang="EN-US">Hi,<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></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.<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></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.<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></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”).<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></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.<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span lang="EN-US">Is there any way, that I
            can tell QGIS that the layer should contain line features ?<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span lang="EN-US">And how can I add
            suitable (line) styles to display the lines without any
            features present ?<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></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;font-family:"Arial
            Narrow","sans-serif";color:black">Med venlig
            hilsen<br>
            <b><br>
            </b>Lars I. Nielsen, LIFA A/S<br>
            GIS-konsulent</span><span
            style="font-size:10.0pt;font-family:"Arial
            Narrow","sans-serif";color:black;mso-fareast-language:DA"><br>
          </span><span
style="font-size:8.0pt;font-family:"Verdana","sans-serif";color:black;mso-fareast-language:DA"><br>
          </span><span style="font-size:8.0pt;font-family:"Arial
            Narrow","sans-serif";color:black;mso-fareast-language:DA"><br>
            <img id="Billede_x0020_1"
              src="cid:part1.00050403.04030303@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";color:black;mso-fareast-language:DA"><br>
            <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:9.0pt;font-family:"Arial","sans-serif";color:red;mso-fareast-language:DA"> 
          </span><span style="font-size:10.0pt;font-family:"Arial
            Narrow","sans-serif";color:black;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";color:black;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";color:black;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";color:black;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";color:black;mso-fareast-language:DA">2492
            4866</span><o:p></o:p></p>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Qgis-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></pre>
    </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>