[Qgis-developer] PostGIS tables with missing gemoetries: how to handle them?

Bernhard Ströbl bernhard.stroebl at jena.de
Thu Nov 20 05:32:28 PST 2014


Hi,

I wasn't aware of this. Although I do not understand why one should put 
points and lines in the _same_ table, geometries are allowed to be NULL 
if the field does not have a NOT NULL constraint. I see two possible 
solutions
1) mark the dataset as having no geometry
2) (preferred) do only load datasets which have a geometry

reasoning: As one can load any relation geometryless I would assume when 
loading the relation _with geometries_ there are geometries contained.

I am aware that solution 2) can be achieved with the user applying a 
filter like <code>"geom_column" IS NOT NULL</code> to the layer but 
that's for advanced users only

Bernhard



Am 20.11.2014 14:07, schrieb Paolo Cavallini:
> Hi all.
> If one has a pg table with records with a missing geometry (e.g. there are records
> with a geom in a point column, others in a line column, others with both), the table
> will show only the records with a geom; if I click on Show all, I also get records
> without a geom. Of course, selecting a record like this and clicking on Zoom to
> selected does nothing.
> I'm unsure this is the least confusing behaviour for the user: opinions?
> All the best.
>



__________ Information from ESET Mail Security, version of virus signature database 10754 (20141120) __________

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




More information about the Qgis-developer mailing list