[Qgis-developer] Multiple geometry columns per layer

Martin Dobias wonder.sk at gmail.com
Fri Nov 30 06:56:37 PST 2012

Hi Matthias

On Thu, Nov 29, 2012 at 3:32 PM, Matthias Kuhn <matthias.kuhn at gmx.ch> wrote:

> I think rendering one at a time is enough (as in my first mail: one as the
> default to display), with time one could include fun stuff like LOD,
> subitems in the layer legend, or whatever somebody might come up with (
> intersection etc).
> More interesting for me is the possibility to access additional geometry
> columns from a plugin, and therefore having the dataProvider ready for this.
> The idea of having multiple layers, pointing to the same table sounds
> interesting as well. This would probably mean separating the pretty strong
> linkage between layer (as representation) <=> table (as data), we've got
> now.

So right now we have QgsFeature that contains ID, attributes and a
geometry. I think we should keep that as-is because this is what is usually
expected from a layer.

In order to support multiple geometries per feature, we could possibly
allow QgsGeometry class as another attribute type (next to int, double and
QString). So providers like postgis that support multiple geometry columns
could return additional geometries wrapped as attributes in QVariant. Would
that work for you?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20121130/d81407a8/attachment.html>

More information about the Qgis-developer mailing list