1

I'm trying to export a PDF of a map of northern Europe.

  1. I load a high detail shp (https://www.naturalearthdata.com/downloads/10m-physical-vectors/)
  2. Zoom to the area I want (British Isles, North Sea, parts of Norway)
  3. Create a map in the print composer
  4. Export to PDF

The resulting PDF file is missing the British Isles and smaller islands. This does not occur if I use a lesser detail shp (https://www.naturalearthdata.com/downloads/50m-physical-vectors/). I have also tried reducing the DPI settings (although that shouldn't matter for a vector) to no avail.

I'm using QGIS version 3.4.5-Madeira 64-bit on a Win10 64-bit machine. The problem also occurred when using QGIS 3.6.

6
  • 1
    You might be hitting the 32,768 vertices limit. you will need to generalise your data to accomadate.
    – Mapperz
    Commented Mar 1, 2019 at 15:58
  • Thanks for the comment. Do you know of a way to get the vertex count? Is this an absolute limit or is there a way to increase it?
    – Juan
    Commented Mar 1, 2019 at 16:06
  • What's the "32,768 vertices limit?" Google is pointing me towards Unity and Doom, which don't seem relevant. Is it a limitation of the shapefile data format, or QGIS, or...?
    – csk
    Commented Mar 1, 2019 at 17:30
  • @csk Adobe products has a limit of 32,768 vertices (16 bit limit?)
    – Mapperz
    Commented Mar 1, 2019 at 18:11
  • So why does cropping the shapefile help? Are the parts of the shapefile outside the map included in the output?
    – csk
    Commented Mar 1, 2019 at 18:19

2 Answers 2

3

There's a lot of useful information in the comments, which I summarize here so it doesn't get buried. Credit to @Mapperz and @Juan.

Adobe products have a limit of 32,768 vertices (16 bit limit?). The limit was reached in this situation because of a vector layer with

  • high vertex density (very detailed)
  • worldwide extent (much wider than the map extent)

QGIS doesn't crop the data to the map extent when exporting to pdf, so the vertices outside the map extent still count towards the total number of vertices. I made a feature request.

The current solution is to reduce the number of vertices before exporting. Starting with the layer with the most vertices, apply these methods until the output falls below the 32,768 vertex limit.

  1. Crop the data to the map extent, as explained in @Juan's answer. This method will not alter the data within the map extent.
  2. Use the Simplify algorithm to reduce the vertex density. This method will alter the data within the map extent.

    Simplify This algorithm simplifies the geometries in a line or polygon layer. It creates a new layer with the same features as the ones in the input layer, but with geometries containing a lower number of vertices.

A workaround would be to export as raster instead of vector. Rasters don't have vertices, so the 32,768 vertex limit doesn't apply.

enter image description here

These questions remain unanswered:

  • Is there a way to get the vertex count?
  • Is 32,768 vertices an absolute limit or is there a way to increase it?
  • Does filtering the layer reduce the number of vertices in the output? This would be a more convenient solution than cropping or simplifying.
1
  • A workaround for the vertex count mentioned by @csk would be to use the Extract vertices Tool which results in a new point-layer with one point per vertex. These are easy to count (e.g. just opening the attribute table and scrolling down)
    – Vincé
    Commented Jun 30, 2021 at 12:24
2

Mapperz seems to be correct. I cropped the original high detail shapefile (method: Cropping Shapefiles in QGIS?) and repeated the procedure described in my question. Everything looks as it should. Cheers!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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