Message-ID: <CA+2DmwgzxVe+GKSGWOcNzy=d7ej2Tq9Vna-JbV78f_aq2Nu1AQ@mail.gmail.com>
Date: 2016-04-06T14:52:01Z
From: Vinh Nguyen
Subject: can't read in shapefile
Hi,
I have two shapefiles, both generated from ArcGIS using similar
methods. I was able to read in one file using readOGR but not the
other. Any thoughts on how best to figure out why I can't read in the
file? Here's the error:
> dFloodRisk <- readOGR(floodshapedir, shapefilebase, verbose=TRUE)
Error in ogrInfo(dsn = dsn, layer = layer, encoding = encoding,
use_iconv = use_iconv, :
Cannot open layer
> 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(floodshapedir, shapefilebase,
verbose = TRUE)
Thanks for your help.
-- Vinh