I am using R and tikzdevice to export a ggplot2 drawing to a tikz drawing. The drawing consists of a raster layer for Germany and a shapefile for the country borders. The raster layer is saved as a png and linked to in the tikz file.
As long as I only use the raster layer, tex can compile the drawing, but as soon as I add the shape layer, tex runs out of memory. Apparently there is way to much information in the shapefile, but I have no idea how to compress it.
Is it possible to dynamically link to the png file? If I put the tikz-tex file and the png in a subfolder and integrate it into a main document, the tikz file searches for the png file in the main folder instead of the subfolder?
Thanks in advance