Group Abstract Group Abstract

Message Boards Message Boards

Export GeoGraphics output to vector graphics

Posted 5 hours ago

In the release notes of WL 14.3, it is said that "An important feature of these maps is that they’re all produced with resolution-independent vector graphics."

How can I export to svg or pdf a vector graphics of a geographic map of the Eiffel Tower, for example?

GeoGraphics[Entity["Building", "EiffelTower::5h9w8"], 
 GeoBackground -> "VectorClassic", GeoRange -> Quantity[400, "Meters"]]

I right clicked on the output and clicked "Save Graphic as...", pdf format. I clicked the settings button and set "Use Highest Quality vector representation" as in the screenshot. Still, the pdf file is a raster graphics and not a vector graphics. Same when exporting to svg file.

enter image description here

POSTED BY: Ehud Behar
2 Replies

Part of the problem is that the graphics data contain polygons with holes, which are not supported for vector export:

Export["holes.pdf",
 Graphics[Polygon[{{0, 0}, {1, 0}, {1, 1}, {0, 1}} ->
    {{1/2, 1/2}, {3/4, 1/2}, {3/4, 3/4}}]]]
POSTED BY: Gianluca Gorni

The short answer is, they cannot. While the result from evaluation contains graphics primitives (instead of a raster), the renderer does not support writing them out as such to PDF and SVG. So instead they are rasterized. This is similar to what happens when you use HatchFilling and friends in 2D (which is implemented as a pixel shader).

POSTED BY: Ian Hojnicki
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard