Feature request #13113
Support for multiple geometry in QGIS
|Pull Request or Patch supplied:||No||Resolution:|
|Easy fix?:||No||Copied to github as #:||21178|
I've had problems with rendering multiple geometry in QGIS. At first, I thought that it's problem of GDAL: https://trac.osgeo.org/gdal/ticket/6031
It's not. QGIS (v 1.6.0 on windows 7, both 32 and 64-bit) generates .gfs file, that does not support GDAL 1.11 options for multiple geometries.
This is 'geometry' part of QGIS-generated .gfs file:
<Name>CadastralParcel</Name> <ElementPath>CadastralParcel</ElementPath> <GeometryType>3</GeometryType> <SRSName>EPSG:5514</SRSName>
This is how it should look like (according to the answer on GDAL bug report linked above):
<Name>CadastralParcel</Name> <ElementPath>CadastralParcel</ElementPath> <GeomPropertyDefn> <Name>polygonGeometry</Name> <ElementPath>geometry</ElementPath> <GeometryType>3</GeometryType> <SRSName>EPSG:5514</SRSName> </GeomPropertyDefn>
According to the document "Starting with OGR 1.11, the <GeometryElementPath> and <GeometryType> can be specified as many times as there are geometry fields in the GML file. Another possibility is to define a <GeomPropertyDefn>element as many times as necessary."
If .gfs is manually rewritten, it renderes features fine according to the first
geometryType element in the file. If there is more than one geometry definition, QGIS reads the first one and ignores the second one. That is really not comfortable for 'ordinary users'.
It would be nice to do:
- proper generating of .gfs
- tool faciliating selecting type of geometry to be used
#2 Updated by Michal Med over 4 years ago
Nathan Woodrow wrote:
I think the best thing here would be if we can detect the different types and open new layers for each one. Support for mixed geometry types in one layer isn't going to happen in QGIS for a long time if ever.
That's definitely solution as well, maybe clearer and for sure easier. Thing is that INSPIRE requires it, GDAL supports it and no SW implemented it yet.
#3 Updated by Tomasz Nycz over 3 years ago
Nathan Woodrow wrote:
Support for mixed geometry types in one layer isn't going to happen in QGIS for a long time if ever.
Support for mixed geometry styling in one layer will be an revolution in desktop cartography. We're tied up to shapefile geometries as paradigm. Maybe QGIS 3.0 is best (only) moment to rebuild Vector Layer rendering code base.