[R-sig-eco] readOGR and Multiple incompatible geometries in rgdal
Patrick Giraudoux
patrick.giraudoux at univ-fcomte.fr
Tue Jan 20 14:05:18 CET 2015
Dear all,
I have to cope with a MapInfo file (.TAB and associated files) with
obviously muliple geometries in (e.g. points and lines) and readOGR
(package: rgdal). When reading, I get the following error message:
readOGR(".","PacoursIKA")
Error in ogrInfo(dsn = dsn, layer = layer, encoding = encoding, use_iconv = use_iconv, :
Multiple incompatible geometries: wkbPoint:wkbLineString
Of course, the cause is obvious and I can manage reading the file from
e.g. QGIS (a dialog box permits to select one of the two geometries) and
then export to a single geometry shapefile. The latter can be read from
R using readOGR.
However, I would like to know if there is a work around within rgdal (eg
an extra argument in readOGR) that could make the job done within an R
environment. The workhorse in QGIS is gdal as in rgdal, so suppose
something may be possible.
Best,
Patrick
[[alternative HTML version deleted]]
More information about the R-sig-ecology
mailing list