[R-sig-Geo] Issue with ogrInfo

Daniel Marcelino dmarcelino at live.com
Sun May 10 17:31:14 CEST 2015


Dear all, I'm having the following issue when trying to read a
topographical json file:
The file is here
https://github.com/kjhealy/uk-elections/blob/master/maps/topo_wpc.json

> uk.map <- readOGR(dsn = "maps/topo_wpc.json", layer = "wpc")
Error in ogrInfo(dsn = dsn, layer = layer, encoding = encoding,
use_iconv = use_iconv,  :
  Cannot open file

> traceback()
5: .Call("ogrInfo", as.character(dsn), as.character(layer), PACKAGE = "rgdal")
4: ogrInfo(dsn = dsn, layer = layer, encoding = encoding, use_iconv = use_iconv,
       swapAxisOrder = swapAxisOrder, require_geomType = require_geomType)
3: withCallingHandlers(expr, message = function(c)
invokeRestart("muffleMessage"))
2: suppressMessages(ogr_info <- ogrInfo(dsn = dsn, layer = layer,
       encoding = encoding, use_iconv = use_iconv, swapAxisOrder =
swapAxisOrder,
       require_geomType = require_geomType))
1: readOGR(dsn = "maps/topo_wpc.json", layer = "wpc")


> sessionInfo()
R version 3.2.0 Patched (2015-04-19 r68207)
Platform: x86_64-apple-darwin10.8.0 (64-bit)
Running under: OS X 10.8.5 (Mountain Lion)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] rgdal_0.9-2 sp_1.1-0

loaded via a namespace (and not attached):
 [1] MASS_7.3-40      colorspace_1.2-6 scales_0.2.4     plyr_1.8.1
 [5] tools_3.2.0      gtable_0.1.2     reshape2_1.4.1   Rcpp_0.11.5
 [9] ggplot2_1.0.1    grid_3.2.0       stringr_0.6.2    digest_0.6.8
[13] proto_0.3-10     munsell_0.4.2    lattice_0.20-31



More information about the R-sig-Geo mailing list