[R-sig-Geo] WKT to sp objects

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Sat Jul 10 19:48:26 CEST 2010


On Sat, Jul 10, 2010 at 6:43 PM, Carson Farmer <carson.farmer at gmail.com> wrote:
> Hello list,
>
> Does anyone know of a nice way to convert WKT strings to sp Spatial
> objects? The list archives don't turn up anything conclusive beyond
> the possibility of doing it using rgeos, but I was wondering if anyone
> knew of a more 'stable', all R way of doing it?

 I found a blog post for some desktop GIS that did it by having the
WKT in a CSV file, and then an OGR virtual vector file which specified
having its data in the CSV in WKT format.

http://www.mail-archive.com/jump-users@lists.jump-project.org/msg00124.html

 For all-R solution, you'd have to build the two files and then read
them with readOGR. Or is there anything in the gdal C code exposed
that does it?

Barry



More information about the R-sig-Geo mailing list