[R-sig-Geo] Incompatible geometry error with a .kml file using readOGR()

remissssss rgenevest at free.fr
Sat Apr 5 14:35:59 CEST 2014


Hello,
I got difficulties with reading a kml file, using rgdal package on a linux
OS. This file has been downloaded on the European Soil Database website (
http://eusoils.jrc.ec.europa.eu/ESDB_Archive/ESDBv3/googleearth/index.cfm
<http://eusoils.jrc.ec.europa.eu/ESDB_Archive/ESDBv3/googleearth/index.cfm>  
 What does "Incompatible geometry" refer to? and how can I solve this pb
without having to edit the .kml in a GIS software (if possible) ?

Below my code : 

> library(rgdal)
Loading required package: sp
rgdal: version: 0.8-16, (SVN revision 498)
Geospatial Data Abstraction Library extensions to R successfully loaded
Loaded GDAL runtime: GDAL 1.10.0, released 2013/04/24
Path to GDAL shared files: /usr/share/gdal/1.10
Loaded PROJ.4 runtime: Rel. 4.8.0, 6 March 2012, [PJ_VERSION: 480]
Path to PROJ.4 shared files: (autodetected)

> ogrListLayers("/windows/BDD_sol/BDD_esdb_kml/kml/EAWC_SUB.kml")
[1] "EAWC_SUB:Subsoil easily avail.water capac."

> readOGR(dsn="/windows/BDD_sol/BDD_esdb_kml/kml/EAWC_SUB.kml",layer="EAWC_SUB:Subsoil
> easily avail.water capac.")
OGR data source with driver: KML 
Source: "/windows/BDD_sol/BDD_esdb_kml/kml/EAWC_SUB.kml", layer:
"EAWC_SUB:Subsoil easily avail.water capac."
with 6 features and 2 fields
Feature type: wkbGeometryCollection with 3 dimensions
Error in readOGR(dsn = "/windows/BDD_sol/BDD_esdb_kml/kml/EAWC_SUB.kml",  : 
  *Incompatible geometry: 7*
In addition: Warning messages:
1: In readOGR(dsn = "/windows/BDD_sol/BDD_esdb_kml/kml/EAWC_SUB.kml",  :
  eType not chosen
2: In readOGR(dsn = "/windows/BDD_sol/BDD_esdb_kml/kml/EAWC_SUB.kml",  :
  eType not chosen
3: In readOGR(dsn = "/windows/BDD_sol/BDD_esdb_kml/kml/EAWC_SUB.kml",  :
  eType not chosen
4: In readOGR(dsn = "/windows/BDD_sol/BDD_esdb_kml/kml/EAWC_SUB.kml",  :
  eType not chosen
5: In readOGR(dsn = "/windows/BDD_sol/BDD_esdb_kml/kml/EAWC_SUB.kml",  :
  eType not chosen
6: In readOGR(dsn = "/windows/BDD_sol/BDD_esdb_kml/kml/EAWC_SUB.kml",  :
  eType not chosen

and some additional information about my R session :

> sessionInfo()
R version 3.1.0 beta (2014-03-28 r65330)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_GB.UTF-8        LC_COLLATE=en_GB.UTF-8    
 [5] LC_MONETARY=en_GB.UTF-8    LC_MESSAGES=en_GB.UTF-8   
 [7] LC_PAPER=en_GB.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] rgdal_0.8-16 sp_1.0-14   

loaded via a namespace (and not attached):
[1] grid_3.1.0      lattice_0.20-27 tools_3.1.0



--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/Incompatible-geometry-error-with-a-kml-file-using-readOGR-tp7586135.html
Sent from the R-sig-geo mailing list archive at Nabble.com.



More information about the R-sig-Geo mailing list