[R-sig-eco] readOGR and Multiple incompatible geometries in rgdal

Ivailo ubuntero.9161 at gmail.com
Wed Jan 21 07:43:10 CET 2015


On Tue, Jan 20, 2015 at 3:05 PM, Patrick Giraudoux
<patrick.giraudoux at univ-fcomte.fr> wrote:
> 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

Patrick,

I don't know the answer to your question but if you post it on the
R-sig-Geo list (https://stat.ethz.ch/mailman/listinfo/r-sig-geo) you
might get a satisfying answer faster.

Cheers,
Ivailo



More information about the R-sig-ecology mailing list