Skip to content

shp to svg

3 messages · Georg Ruß, Marc Marí Dell'Olmo

#
Dear all,

I would like to convert a map in shp (shapefile arcview format) format
to a svg format with R. Does anyone know how?

Thank you very much,

Marc
#
On 09/03/11 13:22:19, Marc Mar? Dell'Olmo wrote:
You probably have to use readShapeSpatial (sp package) to get the data
into R. Then it's likely to be something like a SpatialPoints or similar
data frame which you can plot (or of which you can plot single layers)
using spplot.

I guess the plotting device would then be CairoSVG (Cairo package).

I'm just guessing since you didn't provide further info. Otherwise, you
may also try a decent GIS with a scripting interface to get reproducible
results.

Regards,
Georg.
--
Research Assistant
Otto-von-Guericke-Universit?t Magdeburg
research at georgruss.de
http://research.georgruss.de
#
Thank you for your help!

I have used the following sintax:

map <-readShapePoly(...)
CairoSVG(file = "newmap.svg", width = 12, height = 12, onefile = TRUE,
bg = "transparent")
plot(map, lwd=0.1)
dev.off()

and it works perfectly.

Regards,

Marc


2011/3/9 Georg Ru? <research at georgruss.de>: