MapInfo文件有一个OGR驱动程序(包
rgdal
):
R> library(“rgdal”)
R> ogrDrivers()[28, ]
name write
28 MapInfo File TRUE
</code>
但是你的文件/几何有问题,
readOGR
给出错误消息:
R> ogrListLayers(“R02_rfl09_UTM20N1000.mid”)
[1] “R02_rfl09_UTM20N1000”
R> readOGR(“R02_rfl09_UTM20N1000.mid”, layer=”R02_rfl09_UTM20N1000”)
OGR data source with driver: MapInfo File
Source: “R02_rfl09_UTM20N1000.mid”, layer: “R02_rfl09_UTM20N1000”
with 967 features and 4 fields
Feature type: wkbPolygon with 2 dimensions
Error in stopifnot(is.list(srl)) : ring not closed
</code>
但是,我能够读取文件
GRASS GIS
,可以从R(包
spgrass6
):
v.in.ogr dsn=R02_rfl09_UTM20N1000.mid output=R02_rfl09_UTM20N1000 snap=1e-08
</code>
