1

I am using QGIS and those two datasets:

https://www.naturalearthdata.com/downloads/50m-cultural-vectors/50m-admin-0-countries-2/ https://www.naturalearthdata.com/downloads/50m-cultural-vectors/50m-populated-places/

To export as SVG I have tried this:

  • Create new vector layer, import the shapefile(s)
  • Create new print layout
    • Add map (in top toolbar)
    • Area-select the map area on the whole square
  • Export as SVG

I want to have the populated places be circles instead of paths. Currently they are paths when I export as this, even perfectly round paths but still.

enter image description here

1 Answer 1

0

You could make a similar map with geopandas in Python, and then save it as an SVG file:

import matplotlib.pyplot as plt
import geopandas

fig, ax = plt.subplots(figsize=(10, 15))

# paths to shape files
ne_50m_admin_0_countries_shape = ".\\50m\\ne_50m_admin_0_countries\\ne_50m_admin_0_countries.shp"
ne_50m_populated_places_shape = ".\\50m\\ne_50m_populated_places\\ne_50m_populated_places.shp"

# load shape files to geo data frames
countries_gdf = geopandas.read_file(ne_50m_admin_0_countries_shape)
places_gdf = geopandas.read_file(ne_50m_populated_places_shape)

# plot geo data frames on one map
countries_gdf.plot(facecolor='gold', edgecolor='black', ax=ax)
places_gdf.plot(facecolor='lightgreen', edgecolor='black', ax=ax)

# set map extent
ax.set_xlim(45, 105)
ax.set_ylim(-3, 35)

# save map as an .svg picture
fig.savefig('Cities.svg')
    
plt.show()

The result will look like this:

enter image description here

Maybe this is not exactly what you are looking for, since you are using QGIS, but this seems to do what you need.

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.