In my project I downloaded some map polygons from the Open Government portal of Canada.

One of the files contains annotations for provinces, territories, water bodies, and more.

When I import it into my QGIS project I only see polygons filled with a solid color (see map figure). But I believe it would be possible to fill the polygon with text, that is also provided in the attribute table.

I got as far as displaying the text at specific X and Y coordinates, but it did not fit into the given polygons.

Maybe I could make use of the other files that were provided for my "base_anno.*" file?

Overall I think it should be possible to bring the text into the boxes provided by the shapefile. I just don't know where and how I could do that

My state of the map. As one can see, the text does not fit into the given polygons.

Labeling options, Attributes

enter image description here

  • Welcome to GIS SE! As a new user be sure to take the Tour to learn about our focussed Q&A format. You say "One of the files contains annotations for provinces, territories, water bodies, and more." and your question title mentions shapefiles. However, shapefiles do not support annotation so what format are these files in? – PolyGeo Apr 25 '18 at 8:43
  • Thanks @PolyGeo =) So I imported a Shapefile via the Add Vector Layer Tool. It is called "base_anno.shp" and is visible as the green polygons visible in the map image. But there are more files with the same name and different endings (*.dbf; *.prj; *.sbn; *.sbx; *.shx). The attribute table of my imported layer has a lot of entries (see top image). Now I am trying to play around with the "abs Labels" tool to display the text properly. – Timespirelegend Apr 25 '18 at 8:51
  • Please use the edit button beneath your question to revise it with any requested clarifications. Although it has "anno" in its name my bet is that base_anno.shp is a point (possibly line or polygon) shapefile with one of more fields designed to be used for labelling to give the appearance of annotation (but not true annotation). – PolyGeo Apr 25 '18 at 8:59
  • Some old systems use shapefiles to store text placement locations, aka annotations, not 'geodatabase annotation' in the arcgis sense...you can find these for street labels, etc. – DPSSpatial Apr 25 '18 at 16:03

I was able to solve my problem by doing the following:

In the Labeling tool under the option "Placement" I selected the Placement "Free (slow)".

This seems to almost work perfectly.

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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