[Qgis-user] Avoiding Label Clustering and custom placement

Alex Mandel tech_dev at wildintellect.com
Mon Oct 24 17:37:05 PDT 2011


On 10/24/2011 04:13 PM, Gerhardus Geldenhuis wrote:
> Hi
> I wanted to initially ask how do I avoid labels being on top of one another
> if data points are very close to one another. I then had a look at
> http://www.youtube.com/watch?v=sXK_0eEH3hc&feature=BFa&list=HL1319492137&lf=mh_lolzwhich
> does to an extent have the answer I was looking for. It appears that
> there is not automatic way and that I have to manually do label placement.
> 
> However here is my problem, I have imported a set of points from a CSV file
> using the "Add Delimited Text" layer plugin. Firstly I could not add any
> custom columns that I could use to set my label x and y co-ordinates again.
> So then I realized/thought that QGIS would probably not be writing back to
> my CSV file, so it wont add additional columns. I then added my own columns
> and set the values to 0 but when I set that my data defined positions it
> does not work, my labels disappear. I have initialized the values to be zero
> so perhaps that is the mistake... or perhaps qgis still can't or wont write
> back to the CSV file.
> 
> So a number of questions:
> Is the CSV file only imported once or is it dynamic so will it thus grow,
> shrink everytime there is a change to the file and I reload my project?
> How can I add custom writeable attributes to a CSV imported layer, if at
> all? Or do I need to "import" the CSV file and convert it to an QGIS type
> format?
> Am I approaching this the correct way or is there an easier way to customize
> my label setting so that I don't have labels overprinting.
> 
> Regards
> 

Once imported save the CSV as a spatial format like Shapefile (shp),
right click on the layer, save as. You should then be able to add
columns. Do not initialize the values of columns for data driven label
placement. Make sure to use the New style labelling engine found on the
menu or toolbar (not the properties of the layer). Once auto-placed you
can edit the values in the table or use a special move label tool on the
labelling toolbar to adjust as needed, hand adjustments should be
recorded automatically in the table for you.

Yes you're on the right track.

Alex



More information about the Qgis-user mailing list