Tell me more ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have several tables in my scqlserver database that have records that may or may not have geolocation information (eg defined polygon or point feature). If I have such a layer in my qgis project file and I try to load it the layer causes QGIS to not load the project correctly, resulting in empty layers.

I've got around the issue by creating views of these tables that only show records with geolocation information but views cannot be edited which creates another set of problems.

Simply put, is it mandatory that all records in a spatially enabled table/layer in qgis have a defined geolocation?

thanks! c

share|improve this question
what do you mean by they have no location. Is the field value null, or is it something like geometry::Null or geometry::Point('EMPTY GEOMETRTY')? – Geoist Aug 1 '12 at 2:48

closed as too localized by underdark Sep 30 '12 at 10:53

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.

1 Answer

A spatial layer always requires a valid geometry. Thats the point in "spatial". You can add non-spatial tables, but not mixed data. Of course, you can add the mixed data as non-spatial.

Try to export the views as shapefile, which makes them editable.

share|improve this answer
Geoist - the geometry field is null as there are some older records in our system which have no spatial data but for organizational purposes must be kept together with the the newer data that is spatial (qgis acts as a spatial viewer to our sql server database.) Andre - thanks for the reply. I figured that was the answer. Unfortunately given the type of system we have, exporting and editing shapefiles is not effective. thanks! – Carlos da Ponte Aug 1 '12 at 15:18

Not the answer you're looking for? Browse other questions tagged or ask your own question.