[R-sig-Geo] Error importing ESRI Shapefile

Frede Aakmann Tøgersen frtog at vestas.com
Tue Mar 10 09:49:55 CET 2015


Hi Alec

It is very impolite to cross post you questions. Besides the r-sig-geo you have probably posted on

1) http://onlinedevs.com/problem-reading-shapefile-using-r/ 
2) http://gis.stackexchange.com/questions/138217/problem-reading-shapefile-using-r 
3) http://stackoverflow.com/questions/28957014/error-reading-in-esri-shapefile-using-r 

Are those sites sharing information? Do people on those sites see my specific answer to your question on r-sig-geo?

Also please do not post in html but in plain text. Set your email client to post in text when posting to r-sig-geo.

Nobody can really help you. You give no information from which we can see why you get this error message.

To make you help us to help you please do something along this route. If you get an error please issue an

> traceback()

at command prompt in the R shell. Now do this at R prompt:

> library(rgdal)

and post the output from that call probably something like this:

" Loading required package: sp
rgdal: version: 0.9-1, (SVN revision 518)
Geospatial Data Abstraction Library extensions to R successfully loaded
Loaded GDAL runtime: GDAL 1.11.1, released 2014/09/24
Path to GDAL shared files: c:/Programmer/R/R-3.1.2/library/rgdal/gdal
GDAL does not use iconv for recoding strings.
Loaded PROJ.4 runtime: Rel. 4.8.0, 6 March 2012, [PJ_VERSION: 480]
Path to PROJ.4 shared files: c:/Programmer/R/R-3.1.2/library/rgdal/proj"

> sessionInfo()

Post the output!

> ogrDrivers()

> dsn <- "/path/to/layer"

> file.choose(dsn)

Can you see any shapefiles?

> ogrListLayers(dsn)

Can you see any layer names?

> ogrInfo(dsn=dsn, layer="layer")

Any information from this call?


Yours sincerely / Med venlig hilsen


Frede Aakmann Tøgersen
Specialist, M.Sc., Ph.D.
Plant Performance & Modeling

Technology & Service Solutions
T +45 9730 5135
M +45 2547 6050
frtog at vestas.com
http://www.vestas.com

Company reg. name: Vestas Wind Systems A/S
This e-mail is subject to our e-mail disclaimer statement.
Please refer to www.vestas.com/legal/notice
If you have received this e-mail in error please contact the sender. 

> -----Original Message-----
> From: R-sig-Geo [mailto:r-sig-geo-bounces at r-project.org] On Behalf Of Alec
> Friedhoff
> Sent: 10. marts 2015 07:21
> To: r-sig-geo at r-project.org
> Subject: [R-sig-Geo] Error importing ESRI Shapefile
> 
> Hi all,
> I'm trying to read in a Shapefile using the rgdal library, and am unable to do
> so.When using the following code, geo <-
> readOGR("/path/to/layer","layer"),I'm met with the error "Error in
> stopifnot(is.list(srl)) : infinite label point"
> This one has me stumped. My searches haven't yielded any useful
> information about this error. I suspect there are some bad geometries in the
> underlying file. I have access to ArcMap and tried running the
> RepairGeometry_management method of arcpy, but this has no effect.
> How can I go about understanding this error and ultimately fixing it?
> Many thanks!
> -HR
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo



More information about the R-sig-Geo mailing list