<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body>
    <p>Hi Jakob,</p>
    <p>When adding a new Layer, QGIS checks the column definition in
      postgis and configures it accordingly.</p>
    <p>I suspect either of the following:</p>
    <p>- You have a project created on an old table definition and the
      table was altered later</p>
    <p>- There is a misconfiguration in your column definition (->
      ST_PointZ is a function, so I suspect you are using a view as
      layer, which might have been created as 2D and writing to a 3D
      table or similar).</p>
    <p>Matthias<br>
    </p>
    <div class="moz-cite-prefix">On 2/14/20 8:05 AM, Jakob Götesson
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:30ab37325f884d048bab9f44f6967c4c@shexch04.ad.boras.se">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <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;}
@font-face
        {font-family:inherit;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
/* 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
        {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;}
span.E-postmall17
        {mso-style-type:personal-compose;
        font-family:"Arial",sans-serif;
        color:windowtext;}
.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;}
--></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="font-size:12.0pt;font-family:"Arial",sans-serif">Hello
            everyone!<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:12.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Arial",sans-serif;color:#242729;background:#F9F8F6">I
            have a point-layer in Postgis v12 which is ST_pointZ
            according to PostGIS.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Arial",sans-serif;color:#242729;background:#F9F8F6"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Arial",sans-serif;color:#242729;background:#F9F8F6">When
            creating a new point in QGIS and then tries to save it, I
            get an error:<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Arial",sans-serif;color:#242729;background:#F9F8F6"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Arial",sans-serif;color:#242729;background:#F9F8F6">”</span><span
style="font-size:12.0pt;font-family:"Arial",sans-serif;color:#242729;background:#FBF2D4">
            Column has Z dimension but geometry does not</span><span
style="font-size:12.0pt;font-family:"Arial",sans-serif;color:#242729;background:#F9F8F6">”<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Arial",sans-serif;color:#242729;background:#F9F8F6"><o:p> </o:p></span></p>
        <p
style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;background:#F9F8F6;vertical-align:baseline"><span
style="font-family:"Arial",sans-serif;color:#242729">When
            looking in to the object identifier the derived attributes
            only contains X and Y. However, the rest of the points that
            loads from the database has a Z-value set to 0 attached to
            them. So i get that my created point dosen´t have a Z-value.<o:p></o:p></span></p>
        <p
style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;background:#F9F8F6;vertical-align:baseline;font-variant-ligatures:
          normal;font-variant-caps: normal;font-variant-numeric:
          inherit;font-variant-east-asian: inherit;font-stretch:
          inherit;line-height:inherit;box-sizing: inherit;orphans:
          2;widows: 2;-webkit-text-stroke-width:
          0px;text-decoration-style: initial;text-decoration-color:
          initial;word-spacing:0px">
          <span
            style="font-family:"Arial",sans-serif;color:#242729">Isn't
            it possible to create new data in 3 dimensional tables from
            Postgis in QGIS? Even with a deafult value of 0, I don´t
            even need to specify the Z-value at this moment.<o:p></o:p></span></p>
        <p
style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;background:#F9F8F6;vertical-align:baseline"><span
style="font-size:11.5pt;font-family:"Arial",sans-serif;color:#242729"><o:p> </o:p></span></p>
        <p
style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;background:#F9F8F6;vertical-align:baseline"><span
style="font-size:10.0pt;font-family:"Arial",sans-serif">(Found
            a work around but I prefer not to use this:<br>
          </span><span
style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#242729">If
            I save the QGIS-project and open the .qgs-file in text
            editor and look into the datasource-tag for the the layer I
            have:<o:p></o:p></span></p>
        <p
style="margin:0cm;margin-bottom:.0001pt;background:#F9F8F6;vertical-align:baseline;font-variant-ligatures:
          normal;font-variant-caps: normal;font-variant-numeric:
          inherit;font-variant-east-asian: inherit;font-stretch:
          inherit;line-height:inherit;box-sizing: inherit;orphans:
          2;widows: 2;-webkit-text-stroke-width:
          0px;text-decoration-style: initial;text-decoration-color:
          initial;word-spacing:0px">
          <em><span
style="font-size:10.0pt;font-family:"inherit",serif;color:#242729;border:none
              windowtext 1.0pt;padding:0cm">type=Point</span></em><span
style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#242729"><o:p></o:p></span></p>
        <p
style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;background:#F9F8F6;vertical-align:baseline;font-variant-ligatures:
          normal;font-variant-caps: normal;font-variant-numeric:
          inherit;font-variant-east-asian: inherit;font-stretch:
          inherit;line-height:inherit;box-sizing: inherit;orphans:
          2;widows: 2;-webkit-text-stroke-width:
          0px;text-decoration-style: initial;text-decoration-color:
          initial;word-spacing:0px">
          <span
style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#242729">When
            changing this to:<o:p></o:p></span></p>
        <p
style="margin:0cm;margin-bottom:.0001pt;background:#F9F8F6;vertical-align:baseline;font-variant-ligatures:
          normal;font-variant-caps: normal;font-variant-numeric:
          inherit;font-variant-east-asian: inherit;font-stretch:
          inherit;line-height:inherit;box-sizing: inherit;orphans:
          2;widows: 2;-webkit-text-stroke-width:
          0px;text-decoration-style: initial;text-decoration-color:
          initial;word-spacing:0px">
          <em><span
style="font-size:10.0pt;font-family:"inherit",serif;color:#242729;border:none
              windowtext 1.0pt;padding:0cm">type=PointZ</span></em><span
style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#242729"><o:p></o:p></span></p>
        <p
style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;background:#F9F8F6;vertical-align:baseline;font-variant-ligatures:
          normal;font-variant-caps: normal;font-variant-numeric:
          inherit;font-variant-east-asian: inherit;font-stretch:
          inherit;line-height:inherit;box-sizing: inherit;orphans:
          2;widows: 2;-webkit-text-stroke-width:
          0px;text-decoration-style: initial;text-decoration-color:
          initial;word-spacing:0px">
          <span
style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#242729">saves
            the project and try to create a new object, it works fine.)<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:"Arial",sans-serif">Regards<br>
            <br>
            <o:p></o:p></span></p>
        <p class="MsoNormal"
          style="margin-bottom:12.0pt;line-height:17.65pt;background:white">
          <b><span
style="font-size:12.0pt;font-family:"Arial",sans-serif;color:#4D4F53;mso-fareast-language:SV">Jakob
              Götesson<br>
            </span></b><span
style="font-size:12.0pt;font-family:"Arial",sans-serif;color:#4D4F53;mso-fareast-language:SV">GIS-ingenjör<br>
            - - - - - - - - - - - - - - - - - - - - - - - - - - -<br>
            <b>Borås Stad</b> – Samhällsbyggnadsförvaltningen<br>
            Kungsgatan 55, 501 80 Borås<br>
            033-35 84 66<br>
            boras.se<br>
            facebook.com/borasstad<b><o:p></o:p></b></span></p>
        <p class="MsoNormal"
          style="margin-bottom:12.0pt;line-height:17.65pt;background:white">
          <span
style="font-size:12.0pt;font-family:"Arial",sans-serif;color:#4D4F53;mso-fareast-language:SV">När
            du kommunicerar med Borås Stad behandlar vi dina
            personuppgifter. För mer information hur Borås Stad hanterar
            personuppgifter se
            <a href="https://www.boras.se/pub" title="länk till annan
              webbplats" moz-do-not-send="true"><span
                style="color:#005776">boras.se/pub</span><span
                style="color:#005776;text-decoration:none"><img
                  style="width:.1041in;height:.1041in" id="Bild_x0020_1"
                  src="cid:part1.3D078BFE.C943B73D@opengis.ch" alt="länk
                  till annan webbplats" class="" width="10" height="10"
                  border="0"></span></a><o:p></o:p></span></p>
        <p class="MsoNormal"><o:p> </o:p></p>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-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>
  </body>
</html>