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 <[email protected]> wrote:
> I'm puzzled with this:
>
>> class(gpsori1)
> [1] "SpatialPointsDataFrame"
> attr(,"package")
> [1] "sp"
>> writeOGR(gpsori1, dsn="CAST20090907",
>> layer="CAST20090907gps1",driver="ESRI Shapefile")
> Error in writeOGR(gpsori1, dsn = "CAST20090907", layer = "CAST20090907gps1",
>  :
>  unknown data type
>
> Am I doing something wrong or is there a recent change that I'm not aware
> of?
>
> Thanks
>
> Agus
>
>
> _______________________________________________
> R-sig-Geo mailing list
> [email protected]
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
>

_______________________________________________
R-sig-Geo mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to