Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to have dynamic labels, set by editable x y parameters in the attribute table, on a layer which also has a query applied, in QGIS?

i.e. I want to set the query and get all the peripheral data off the map canvas, then align the remaining labels with the "move label" tools in QGIS 1.8.

If I create a second shapefile just for labelling, later on when the master dataset has edits, I end up loosing the x y coords established for the labels.

share|improve this question
I'm not sure I understand your question fully. Why can't you label the features first and then apply the query? – underdark Dec 19 '12 at 11:26
The purpose of manually aligning the lablels is to reduce the overlap. If there is no query, the overlaps occur differently to the final product (more busy). – Willy Dec 19 '12 at 20:53
up vote 3 down vote accepted

The simple answer is. No. Not with shapefiles.

Shapefiles can not have a query set (this is a OGR SQL query) and also be in edit mode. This is a limitation coming up from OGR into QGIS not QGIS itself forcing the lack of editing.

The answer:

Use Spatialite, or another database format. These formats support editing while a query has been set on the layer. So you can filter the layer using the Query.. button and still move your label positions using the label tools.

share|improve this answer
Thanks Nathan, yes it is with shp – Willy Dec 21 '12 at 22:11
Hi Nathan, you should make this a wiki – Willy Dec 22 '12 at 23:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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