Re: [R-sig-Geo] Reading tables without geometry from gdb?

2018-02-11 Thread obrl soil
Hi Mike, Here's a demo workflow that uses package sf as well as a standalone install of GDAL (I use the OSGeo4W package version, but any install that has the OpenFileGDB driver will do). Ogr2ogr can write to csv so its easy enough to pull out the non-spatial tables that way. I downloaded your dat

Re: [R-sig-Geo] Reading tables without geometry from gdb?

2018-02-11 Thread Edzer Pebesma
On 02/11/2018 05:22 AM, Michael Treglia wrote: > Hi All, > > I have a file geodatabase with non-spatial tables that can be joined to > other spatial objects. Is there a best/easiest way to import the > non-spatial tables in R these days? > > I've seen some solutions here: > https://gis.stackexc

Re: [R-sig-Geo] Reading tables without geometry from gdb?

2018-02-11 Thread obrl soil
The download wasn’t zipped correctly I think – after unzipping, add extension .gdb to the folder name. @obrl_soil On Sun, Feb 11, 2018 at 10:47 PM, Edzer Pebesma wrote: > > > On 02/11/2018 05:22 AM, Michael Treglia wrote: >> Hi All, >> >> I have a file geodatabase with non-spatial tables that ca

Re: [R-sig-Geo] Reading tables without geometry from gdb?

2018-02-11 Thread Edzer Pebesma
Bingo! Thanks, On 02/11/2018 01:52 PM, obrl soil wrote: > The download wasn’t zipped correctly I think – after unzipping, add > extension .gdb to the folder name. > > @obrl_soil > > On Sun, Feb 11, 2018 at 10:47 PM, Edzer Pebesma > wrote: >> >> >> On 02/11/2018 05:22 AM, Michael Treglia wrote:

Re: [R-sig-Geo] Reading tables without geometry from gdb?

2018-02-11 Thread Edzer Pebesma
sf::st_read now returns a data.frame if no geometry column is found, rather than raising an error: https://github.com/r-spatial/sf/commit/77a31f2989a1d217438fb629ac34d7ef31baa9c2 it does emit a warning in that case, now, since an object of a different type than expected is returned: > x = st_rea

Re: [R-sig-Geo] Reading tables without geometry from gdb?

2018-02-11 Thread Michael Treglia
This is great - thanks so much Edzer! I'm sure this will come in handy for others too. And thanks to @obrl_soil for the clear and thorough response too. Best, Mike On Sun, Feb 11, 2018 at 8:27 AM, Edzer Pebesma < edzer.pebe...@uni-muenster.de> wrote: > sf::st_read now returns a data.frame if no