3

Im creating an atlas but the labels on the edges sometimes get cut off:

enter image description here

When it should look like this:

enter image description here

The text is coming from a Point layer, and the Point is located at the "E" letter above. I know of this question: Prevent labels being cut off / clipped at edge of map, but the solution is to not draw "Ekebäckshult" at all.

How can I make the labels draw correctly on the edges?

2
  • 1
    One possible way is to anchor the the label position of that point to number 7 using Offset from point and reduce the font size for the same label, because the label font size is bigger than the available space. – ahmadhanb Dec 6 '18 at 8:37
  • I would need to find some way of doing this automatically since i have many labels and edges. – BERA Dec 6 '18 at 10:09
1
  1. Try setting a margin to 10% under Controlled by Atlas tab and then increase the size of your print composer by 10% so that the scale of your map will remain the same and you'll get overlapping tiles when you export.

Controlled by atlas tab

  1. Export the atlas.

  2. Split your atlas polygon into separate files with Split layer in QGIS. (This function creates geopackage files)

  3. Clip your atlas rasters with gdalwarp -crop_to_cutline -cutline tile_1.gpkg output_1.tif output_1_clip.tifand if you have many of these you could make a small shell script like this to batch this clipping if you have 10 tiles:


for i in {1..10}
do
    gdalwarp -crop_to_cutline -cutline page_${i}.gpkg output_${i}.tif output_${i}_clip.tif
done

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.