Dear list,

I'm trying to read a gpx file using rgdal::readOGR function. I get the
following error, as demonstrated by using the example from the help file of
readOGR.

dsn <- system.file("vectors/test_trk2.gpx", package = "rgdal")[1]
dsn
  [1]
"C:/Users/romunov/Documents/R/win-library/2.13/rgdal/vectors/test_trk2.gpx"
test_trk2 <- try(readOGR(dsn=dsn, layer="tracks"))
  Error in ogrInfo(dsn = dsn, layer = layer, input_field_name_encoding =
input_field_name_encoding) :
    Cannot open file


I've traced the ogrInfo and it stops at the line where it makes a .Call to
"ogrInfo" function.

debug: ogrinfo <- .Call("ogrInfo", as.character(dsn), as.character(layer),
    PACKAGE = "rgdal")
Browse[3]> n
Error in ogrInfo(dsn = dsn, layer = layer, input_field_name_encoding =
input_field_name_encoding) :
  Cannot open file


What am I missing?

Here's my sessionInfo.

> sessionInfo()
R version 2.13.1 (2011-07-08)
Platform: x86_64-pc-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=Slovenian_Slovenia.1250  LC_CTYPE=Slovenian_Slovenia.1250
[3] LC_MONETARY=Slovenian_Slovenia.1250 LC_NUMERIC=C
[5] LC_TIME=Slovenian_Slovenia.1250
attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base
other attached packages:
[1] rgdal_0.7-1 sp_0.9-79
loaded via a namespace (and not attached):
[1] grid_2.13.1     lattice_0.19-30 tools_2.13.1


Any tips on how to solve this will be much appreciated.


Cheers,
Roman



   --
In God we trust, all others bring data.

	[[alternative HTML version deleted]]

