<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    Il 25/07/2022 16:12, Tudorache, Marian ha scritto:<br>
    <blockquote type="cite"
cite="mid:YQXPR01MB38310BF177FC789DEA13B610E6959@YQXPR01MB3831.CANPRD01.PROD.OUTLOOK.COM">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <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-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:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:10.0pt;
        font-family:"Calibri",sans-serif;}a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}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"><span
          style="font-size:11.0pt;mso-fareast-language:EN-US"></span><span
          style="font-size:11.0pt;mso-fareast-language:EN-US">When I
          open the QGIS project created with QGIS2.18 I got a message
          which notify me the project is an old version of QGIS and some
          conversion was done.<o:p></o:p></span><span
          style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p></o:p></span>
        <p class="MsoNormal"><span
            style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:11.0pt;mso-fareast-language:EN-US">So when
            I open QGIS 2.18 project something happened with the data
            and was transformed from LineString to MultiLineString.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:11.0pt;mso-fareast-language:EN-US">Is this
            normal behaviour for QGIS 3 to convert the geometry type
            from single part to multiple parts?<br>
          </span><span
            style="font-size:11.0pt;mso-fareast-language:EN-US">Is any
            method to supress this transformation?</span><br>
          <span style="font-size:11.0pt;mso-fareast-language:EN-US"></span></p>
      </div>
    </blockquote>
    <br>
    Hi Marian,<br>
    AFAIK the QGIS project update process doesn't actually transform any
    of your data, it only updates the qgs/qgz file.<br>
    <br>
    The different behaviour is probably due to a change in the QGIS API
    3 and in the way a Shapefile layer is loaded in QGIS 3.<br>
    Basic Shapefile layer shape types [1] are:<br>
    - Point<br>
    - MultiPoint<br>
    - PolyLine<br>
    - Polygon<br>
    <br>
    As you can see, there are Point and MultiPoint types, but only
    PolyLine and Polygon types and not also MultiPolyLine and
    MultiPolygon types.<br>
    <br>
    In fact, the Shapefile format treats the PolyLine and the Polygon
    shape types as layers that can contain both (multi-part) geometries
    with only 1 part and (multi-part) geometries with 2 or more parts.
    They are actually multi-part layer types.<br>
    <br>
    With QGIS 2.18, a feature geometry with only 1 part in a PolyLine
    shape type Shapefile layer was considered as a LineString WKT
    geometry type, while a feature geometry with 2 or more parts in the
    same layer was considered as a MultiLineString WKT geometry type.
    Thus, you needed to correctly use asPolyline() or asMultiPolyline()
    for features geometries in the same PolyLine shape type Shapefile
    layer depending on the actual feature geometry type.<br>
    <br>
    With QGIS 3, both the feature geometry with only 1 part and the
    feature geometry with 2 or more parts in a PolyLine shape type
    Shapefile layer are considered as MultiLineString WKT geometry type.
    Thus, you can always use asMultiPolyline() for all the geometries in
    the same PolyLine shape type Shapefile layer.<br>
    <br>
    Best regards.<br>
    <br>
    Andrea<br>
    <br>
    [1]
<a class="moz-txt-link-freetext" href="https://www.esri.com/content/dam/esrisites/sitecore-archive/Files/Pdfs/library/whitepapers/pdfs/shapefile.pdf">https://www.esri.com/content/dam/esrisites/sitecore-archive/Files/Pdfs/library/whitepapers/pdfs/shapefile.pdf</a><br>
    <br>
    <br>
  </body>
</html>