[R-sig-Geo] Error with readOGR and shape file

Roger Bivand Roger.Bivand at nhh.no
Tue Jul 7 13:28:28 CEST 2009


On Tue, 7 Jul 2009, Agustin Lobo wrote:

> I've found the following error at importing a shp file
> edited (deleting one line and creating another one) and saved with QGIS.
> SHP files made (not edited) and saved with QGIS can be imported into R
> with no problems.
> I'm reporting to the QGIS list as well:
>
>> fl2 <- 
>> readOGR(dsn="/media/Transcend/MONTSENY2008/MONTSENY_UAV2/",layer="flMata700v2")
> Error in ogrInfo(dsn = dsn, layer = layer, input_field_name_encoding =
> input_field_name_encoding) :
>  Multiple incompatible geometries: 2:25706376
>
> Note that ogrinfo does not report any problem:
> $ ogrinfo flMata700v2.shp
> INFO: Open of `flMata700v2.shp'
>      using driver `ESRI Shapefile' successful.
> 1: flMata700v2 (Line String)
>
> Let me know if I should upload the file.

Of course, without the offending file, no diagnosis is possible. More 
information is needed - this isn't a list question. It looks as though 
QGIS editing is not setting a geometry type correctly.

Roger

> Thanks
>
> Agus
>

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no



More information about the R-sig-Geo mailing list