Skip to content
Prev 6801 / 29559 Next

Problem with writeOGR()

Hi Agustin, you will need to determine which columns in the data frame
are causing problems.

Can you run this and let us know what you see?

summary(gpsori1)

For example, you cannot write POSIXct columns to SHP and would need to
convert to text, or numeri:

library(rgdal)
d <- data.frame(x = 1:10, y = 1:10, z = 1:10)
coordinates(d) <- ~x+y

## OK
writeOGR(d, ".", "test", "ESRI Shapefile")
unlink("test.shp")

d$z <- Sys.time() + 1:10
## not OK
writeOGR(d, ".", "test", "ESRI Shapefile")


Regards, Mike.
On Thu, Nov 5, 2009 at 7:11 AM, Agustin Lobo <alobolistas at gmail.com> wrote: