Skip to content

WKT to sp objects

4 messages · Carson Farmer, Barry Rowlingson, Roger Bivand

#
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?

Thanks for any hints or thoughts you might have.

Carson

--
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
#
On Sat, Jul 10, 2010 at 6:43 PM, Carson Farmer <carson.farmer at gmail.com> wrote:
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 at 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
#
On Sat, 10 Jul 2010, Carson Farmer wrote:

            
Please do try to support the rgeos effort, the code for reading and 
writing is there already, and is used in the testing suited ported there. 
The GSoC project is almost at mid-term, so the more developers trying 
functionalities the better.

Best wishes,

Roger

  
    
#
I've actually just started playing around with rgeos, and it looks
like it will do what I need. I'll try to push it a bit more this week.
The reason I was looking for an all R solution was that the code would
be running on a server somewhere that I won't have access to, and at
this stage the server doesn't have rgeos installed (and the admins
probably won't want to install it for little ol' me either). In the
mean time, I'll fiddle about and see what I can come up with until I
can convince them to install rgeos.

Carson
On 10 July 2010 19:00, Roger Bivand <Roger.Bivand at nhh.no> wrote: