I am attempting to plot a polygon in R using MySQL as a db source. These data are polygon points that were originally generated from loading ESRI shapefile data into MySQL using ogr2ogr.
(QGIS > OGR > MySQL > R)
The connection to the MySQL server works nicely using RMySQL. The data is retrieved using an SQL query as follows.
shape <- dbGetQuery(mydb, 'select astext(shape) from world where ogr_fid = 1')
The data looks like this when output in R.
POLYGON((149.751386816 -34.700984991,149.752416704 -34.6955999555,149.755517664 -34.695999944..... ))
Can anyone tell me what format is this data in and is there an R library that can plot the polygon?
Many thanks