[R-sig-Geo] reading a feature class

JOSEPH BECHARA jbechara at lri-lb.org
Wed Jul 9 11:59:30 CEST 2014


Hi Michael, 

 

It worked partially.

I still have an error message

 

> dd<-ogrListLayers(dsn="C:/sophie/Allpoints/All_poly.gdb")

> bb<-readOGR(dsn=dd,layer="All_lays1")

Error in ogrInfo(dsn = dsn, layer = layer, encoding = encoding, use_iconv = use_iconv) : 

  Cannot open file

In addition: Warning messages:

1: In if (nchar(dsn) == 0) stop("empty name") :

  the condition has length > 1 and only the first element will be used

2: In if (nchar(dsn) == 0) stop("empty name") :

  the condition has length > 1 and only the first element will be used

 

 

JOSEPH BECHARA

Wildfire Management Component Coordinator

Ashrafieh 1020 Building, 8th floor, Mathaf, Beirut, Lebanon

Tel.: +961 (1) 426630-1-2

Fax: +961 (1) 426631

Mail:  <mailto:jbejjani at lri-lb.org> jbechara at lri-lb.org

 <http://www.lri-lb.org/> www.lri-lb.org

Description: Description: LRI-logo-Email

 

From: Michael Sumner [mailto:mdsumner at gmail.com] 
Sent: Wednesday, July 09, 2014 12:34 PM
To: Joseph Bechara
Cc: RsigGeo; Frede Aakmann Tøgersen
Subject: Re: [R-sig-Geo] reading a feature class

 

Try 

ogrListLayers( dsn="C:/sophie/Allpoints/All_poly.gdb")

that should give you the right layer name/s for use with readOGR

On 9 Jul 2014 16:59, "JOSEPH BECHARA" <jbechara at lri-lb.org> wrote:

Dear Frede, 

 

Thanks for your reply.

 

This is the function that is not working

bb<-readOGR(dsn="C:/sophie/Allpoints/All_poly.gdb",layer="All_lays1")

 

All lays is a feature class in a file gdb(new) .

The file is not corrupted I’m able to open it on ARCIS and I’m doing the zonal statisctics there.

I opened the rgdal library and I’m using R studio 

Rgdal version 0.8-16

 

JOSEPH BECHARA

Wildfire Management Component Coordinator

Ashrafieh 1020 Building, 8th floor, Mathaf, Beirut, Lebanon

Tel.: +961 (1) 426630-1-2

Fax: +961 (1) 426631 <tel:%2B961%20%281%29%20426631> 

Mail:  <mailto:jbejjani at lri-lb.org> jbechara at lri-lb.org

 <http://www.lri-lb.org/> www.lri-lb.org

Description: Description: LRI-logo-Email

 

From: Frede Aakmann Tøgersen [mailto:frtog at vestas.com] 
Sent: Tuesday, July 08, 2014 6:13 PM
To: JOSEPH BECHARA; r-sig-geo at r-project.org
Subject: RE: [R-sig-Geo] reading a feature class

 

Hi

 

I don't know the gdb file format. Is it in raster or vector format?

 

Since you used readOGR you probably did have a look at

 

http://www.gdal.org/ogr_formats.html

 

before asking. 

 

So there, two ESRI formats are mentioned: personal gdb (old) and file gdb (new?).

 

Do you what kind of gdb file you have?

 

Why you can't read the file could be because of several problems. 

 

Is the file corrupted?

 

What is your OS?

 

What version of R/rgdal?

 

Does the OS/R/rgdal combination involves formats for either pgdb or filegdb?

 

Nobody can help you with that little information you have given us. 

 

Br.

 

Frede

 

 

Sendt fra Samsung mobil



-------- Oprindelig meddelelse --------
Fra: JOSEPH BECHARA 
Dato:08/07/2014 16.35 (GMT+01:00) 
Til: r-sig-geo at r-project.org 
Emne: [R-sig-Geo] reading a feature class 

Dear All,

 

I ‘m trying ti import a feature class from a gdb to R using readOGR.

Unfortunately it is not working.

Anybody has a suggestion of a function to read it.

 

 

JOSEPH BECHARA

Wildfire Management Component Coordinator

Ashrafieh 1020 Building, 8th floor, Mathaf, Beirut, Lebanon

Tel.: +961 (1) 426630-1-2

Fax: +961 (1) 426631 <tel:%2B961%20%281%29%20426631> 

Mail:  <mailto:jbejjani at lri-lb.org> jbechara at lri-lb.org

 <http://www.lri-lb.org/> www.lri-lb.org

Description: Description: LRI-logo-Email

 


_______________________________________________
R-sig-Geo mailing list
R-sig-Geo at r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20140709/d8439539/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 16370 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20140709/d8439539/attachment.jpe>


More information about the R-sig-Geo mailing list