[Qgis-developer] Thoughts about multi-type tables in QGIS

Bernhard Ströbl bernhard.stroebl at jena.de
Tue Apr 7 00:05:39 PDT 2015


Hi,

as a PostGIS user I followed this thread until now and want to add my 2 
cents:
The "OpenGIS Simple Features Specification For SQL, Revision 1.1" from 
1999 stated geometry being an abstract class, so the limitation is 
rather 16 years old (not 25), although I do not know if it has been 
influenced by the shape file format :-). The latest document from 2007 
does not contain this passage any more [1].
However I never put geometries of different types into the same table.
Here is an example (as it was asked for one previosly in this thread): I 
have compensating measures for development in the city. They can be 
polygon (e.g. a pond), linestring (e.g. a hedgerow) or even points (e.g. 
trees). My workaround in the database is to seperate geometries and 
attributes in different tables. So one table with attributes and three 
tables with geometries all drawing their primary key from the same 
sequence. Foreign keys and triggers ensure data consistency.
Even if QGIS supported different geometry types in the same table I 
doubt I would use such a feature as this would be too complicated for my 
users (they sometimes already have problems understanding the notion of 
multi-geometries).

IMHO this is not a pressing issue as these rare cases can be accomodated 
with database design. But it is worth thinking about as the distinction 
is in fact somewhat artificial, but any implementation must be 
accompanied with a _very_ good GUI design because the users are used to 
this distinction. A more important step (IMHO) would be to be able to 
apply a style to a different geometry-type layer than it was made for 
and/or have settings on the group level (e.g. color, min/max scale ...).

Bernhard

[1] http://www.opengeospatial.org/standards/sfs

Am 07.04.2015 07:26, schrieb Denis Rouzaud:
> Instead of allowing mixed geometries, why not keeping the existing
> behavior but allow for additional geometry columns.
>
> Hence, current API remains: you're still waiting for a type of geometry,
> and features have only one geometry.
>
> But now, you allow to add additional geometries. They could be used in
> symbolization by adding rules for the additional geometries.
>
> Thoughts?
>
>
>
> On 04/06/2015 09:59 PM, Matthias Kuhn wrote:
>> Hi
>>
>> On 04/06/2015 12:08 PM, Nyall Dawson wrote:
>>> Then, we could add a new "Add record" button to the attribute table
>>> dialog for adding a new (empty) row, which would initially contain no
>>> geometry. That fixes the first part of my issues with geometry
>>> columns.
>> That button should already be there for non-geometry layers. I wonder if
>> it would be sufficient to remove an if-clause around it.
>>
>> Matthias
>>
>>
>>
>> _______________________________________________
>> Qgis-developer mailing list
>> Qgis-developer at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
>


__________ Information from ESET Mail Security, version of virus signature database 11434 (20150407) __________

The message was checked by ESET Mail Security.
http://www.eset.com




More information about the Qgis-developer mailing list