[R-sig-Geo] Issues importing BIG shapefile - Limitations of R or something else?

Roger Bivand Roger.Bivand at nhh.no
Sat Mar 28 13:04:15 CET 2009


On Fri, 27 Mar 2009, Tyler Dean Rudolph wrote:

> I have no trouble importing a subset of a road network for my study area as
> a shapefile into R, but when I try to import the complete network (area
> equivalent to approximately 30,000 km^2), I get the following error message
> (even when I split up the two class formats into two separate commands):
>
>> fullroads<-as(as(readShapeLines(fn="D:\\GIS\\roadnet.shp"),
> "SpatialLines"), "psp")
> *Error in function (classes, fdef, mtable)  :
>  unable to find an inherited method for function "coordinates", for
> signature "numeric"*
> **
> Is this due to the memory limitations of R, or to those of my particular
> machine, or to something else I'm missing?

It may be the file, it isn't memory (the error message would say so), and 
it is unlikely to be your machine. Please provide sessionInfo() and 
traceback() from immediately after the error. If the files in question can 
be made available as a zip archive on a website, this may allow others to 
try to debug the problem. We saw something like this with odd polygon 
geometries recently, but not with lines.

Roger

> The processes I am trying to
> model are happening at very "large" spatial scales and it would be a great
> deal more efficient if I could use the entire road network rather than
> dealing with multiple subsets of a greater image.  Importing as an ascii
> grid is not an option due to subsequent operations using distmap() which are
> based on the psp format.
>
> Tyler
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no



More information about the R-sig-Geo mailing list