<p dir="ltr">I would not be in favour of supporting a many geometry type per layer type setup, it just makes things a heap more complicated IMO for little gain. </p>
<p dir="ltr">Also makes your code a lot more complicated, you now have to check each geometry for type because you are never sure what you will get.</p>
<p dir="ltr">MapInfo did this and it was more a pain then a   feature.</p>
<br><div class="gmail_quote">On Thu, 2 Apr 2015 10:11 pm Denis Rouzaud <<a href="mailto:denis.rouzaud@gmail.com">denis.rouzaud@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  

    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Hi Olivier,<br>
    <br>
    I think you can easily extend your reasoning to the support of
    multiple geometry columns in QGIS.<br>
    I believe that this would come in QGIS at some point.<br>
    <br>
    If QGIS 3 is getting closer, our company will support this feature.
    <br>
    <br>
    As you suggest, the layer could have different geometry types and/or
    columns. This could be seen as sub-layer level for rendering:<br>
    layer > geometry types/columns > symbology rules<br>
    <br>
    I suppose this is quite a big change. Many things depends on the
    geometry type in QGIS (like map map tools), and that would represent
    a large API break.<br>
    <br>
    But, on my side, I believe it's a logic evolution for QGIS.<br>
    <br>
    Best wishes,<br>
    <br>
    Denis</div><div bgcolor="#FFFFFF" text="#000000"><br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <div>On 04/02/2015 01:52 PM, Olivier Dalang
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">
        <div>Hi,</div>
        <div><br>
        </div>
        <div>In some projects of mine, I work with multiple geometry
          types in one postgis table, using a column of type <font style="background-color:rgb(238,238,238)" face="monospace,
            monospace">geometry(Geometry,4326)</font>.</div>
        <div>This is very well supported by postgis.</div>
        <div><br>
        </div>
        <div>It is possible to load such a table in QGIS by manually
          selecting the geometry type you want to load. This means that
          to display all the features, you need to add the table three
          times, one for each feature type.</div>
        <div><br>
        </div>
        <div>This works more or less. There are a few bugs though :</div>
        <div>- <a href="http://hub.qgis.org/issues/12499" target="_blank">http://hub.qgis.org/issues/12499</a>
          (you can edit other type's node with the node tool)</div>
        <div>- <a href="http://hub.qgis.org/issues/12500" target="_blank">http://hub.qgis.org/issues/12500</a>
          (other type's records are shown in the attribute table)</div>
        <div><br>
        </div>
        <div>This also has some limitations. When having such a setup,
          it's pretty sure you'll want to have the same edit forms for
          all the layers. You'll also probably want the same filter, the
          same labels, the same actions, etc...</div>
        <div>The only thing you'd want to be able to define on a
          geometry type basis are the symbol (well, even the
          classification/colors/etc could be shared) and the label
          placement.</div>
        <div>For now, you must do all settings three times, because of
          this bug/feature request :</div>
        <div>- <a href="http://hub.qgis.org/issues/12303" target="_blank">http://hub.qgis.org/issues/12303</a>
          (copy/paste style from one geometry type to another)</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>As you see, support multiple geometry types in QGIS is not
          perfect.</div>
        <div><br>
        </div>
        <div>Of course it's possible to fix the bugs/pr, and there are
          some workarounds (postgis view instead of tables) but maybe
          it's also worth thinking a bit more in depth about this.</div>
        <div><br>
        </div>
        <div>We could consider point/line/polygons as
          subcategories/sublayers of a layer. A shapefile or a
          mono-typed table would have only one of those sublayer, but a
          postgis table could perfectly have the three. Most of the
          settings would be defined at the layer level, while only some
          settings would be defined at the subcategory level.</div>
        <div><br>
        </div>
        <div>This is probably especially relevant when thinking long
          term (the day we support 3D, curves, etc...).</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>What do you think ?</div>
        <div>Do you think the relation 1 layer = 1 geometry type will
          hold ?</div>
        <div><br>
        </div>
        <div>I think we inherited this from the old shapefile format,
          but most data sources QGIS handles don't have this limitation.
          I also think it does not hold with quite a lot of modern GIS
          uses (especially web related, think of openstreetmaps for
          instance).</div>
        <div><br>
        </div>
        <div>There's this feature request (6th oldest open issue on the
          tracker) about postgis geometry collections  : <a href="http://hub.qgis.org/issues/167" target="_blank">http://hub.qgis.org/issues/167</a></div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>Best,</div>
        <div><br>
        </div>
        <div>Olivier</div>
        <div><br>
        </div>
      </div>
      <br>
      <br>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
Qgis-developer mailing list
<a href="mailto:Qgis-developer@lists.osgeo.org" target="_blank">Qgis-developer@lists.osgeo.org</a>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a></pre>
      <br>
      <br>
    </blockquote>
    <br>
    <br>
  </div>

______________________________<u></u>_________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org" target="_blank">Qgis-developer@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/qgis-<u></u>developer</a></blockquote></div>