You can use the package XMLto retrieve the coordinates.
library(RCurl)
url <- "http://upload.wikimedia.org/wikibooks/en/a/a8/XML_example_polygon.svg"
svg <- getURL(url)
library(XML)
doc <- htmlParse(svg)
p <- xpathSApply(doc, "//polygon", xmlGetAttr, "points")
p <- lapply( strsplit(p, " "), function(u)
matrix(as.numeric(unlist(strsplit(u, ","))),ncol=2,byrow=TRUE) )
p
However, this ignores any transformation applied to the polygon.
source
share