Goyo, while I enjoy working with postgis a lot, the reality is I cannot expect 
"my" users to hack a sql view each time they need to label a map. It is not 
feasible to anticipate all situations and just create new items in my database 
to handle each one. It's difficult enough to manage the data as it is.

I will just get a call or email asking how can the multiple labels be avoided, 
and there is no easy answer for that. The answer I've come up with is to select 
the features I want to label, and create a new layer in qgis with the 
corresponding query, remove the symbol and label it - much like the old label 
type layers in MapServer.

Thanks,
Duarte

-----Mensagem original-----
De: Goyo [mailto:goyod...@gmail.com] 
Enviada: quinta-feira, 3 de Outubro de 2013 20:19
Para: Duarte Carreira
Cc: Qgis (qgis-user@lists.osgeo.org)
Assunto: Re: [Qgis-user] labels: avoid duplicated labels

2013/10/3 Duarte Carreira <dcarre...@edia.pt>:
> Thanks for your suggestion.
>
> But this is not feasible. I cannot keep creating new spatial tables for 
> cartographic purposes, I just can't pay the maintenance cost of that 
> (updating).

I was thinking of shapefiles and the like. With a spatial dabase it should be 
even easier. You can have a second geometry field and mantain it using a 
trigger or a script running in the background or at night or use a spatial view 
or just use multipolygons instead of (not in addition to) single polygons. The 
best solution depends on your typical workflow, the size of your data, etc.

It also depends on which database engine you use. I have done this kind of 
things with spatialite and I think they can be done with postgis in a similar 
way. In particular I've found spatial views are a very powerful tool for 
cartography. I often want to show multipoint features as polygons 
(buffer(convexhull(geom), n)) or single points 
(centroid(buffer(convexhull(geom), n))) and I can do it even on the fly using 
the DB manager or the fast SQL layer plugin.

Goyo

> It is awkward to me missing this option...
>
> Duarte
>
>
>
> -----Mensagem original-----
> De: Goyo [mailto:goyod...@gmail.com]
> Enviada: quinta-feira, 3 de Outubro de 2013 16:57
> Para: Duarte Carreira
> Cc: Qgis (qgis-user@lists.osgeo.org)
> Assunto: Re: [Qgis-user] labels: avoid duplicated labels
>
> 2013/10/3 Duarte Carreira <dcarre...@edia.pt>
>>
>> Hi there.
>>
>>
>>
>> Is there any option to avoid duplication of labels when several polygons 
>> have the same label?
>
> Convert your polygons to multipoligons, grouping by the field shown in the 
> label.
>
> Goyo
>

_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to