[R-sig-Geo] Opening non-spatial layer/feature class in gdb
Worrall, James -FS
jworrall at fs.fed.us
Mon Feb 8 19:17:00 CET 2016
I've been playing with getting info on and opening geodatabases. I was pleasantly surprised to find that rgdal could examine and open layers from them. But I wonder if it can open non-spatial objects in them? Or if there is any other R way to do that?
I have a geodatabase that looks like this:
> ogrListLayers( "D:USvegNRIS.gdb" )
[1] "NRIS_VegCharacterizations" "NRIS_VegDisturbances" "NRIS_VegGisCalcs" "NRIS_VegPolyLinks"
[5] "NRIS_VegSubpopulations" "NRIS_VegPointLinks" "NRIS_VegLocations" "NRIS_VegPoint"
[9] "NRIS_VegPoly"
attr(,"driver")
[1] "OpenFileGDB"
attr(,"nlayers")
[1] 9
I can open NRIS_VegPoly as a SpatialPolygonsDataFrame with readOGR() (at least I can in another gdb with a similar layer, but this one is too enormous and R crashes).
But I am also interested in NRIS_VegSubpopulation. This is simply a table, with multiple rows per polygon, with IDs linking them to polygons, but no spatial data. Trying to open it doesn't work:
Error in readOGR(dsn = "USVEGNRIS.gdb", layer = "NRIS_VegSubpopulations") :
no features found
In addition: Warning message:
In ogrInfo(dsn = dsn, layer = layer, encoding = encoding, use_iconv = use_iconv, :
ogrInfo: all features NULL
Can you think of a way to get at such data within R?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20160208/8ea58267/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 92 bytes
Desc: image001.gif
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20160208/8ea58267/attachment.gif>
More information about the R-sig-Geo
mailing list