Last active
November 15, 2017 03:07
-
-
Save Robinlovelace/29d387f6b48fd9bf9d2d to your computer and use it in GitHub Desktop.
Loading MapInfo .mid files with R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Loading MapInfo .mid files | |
library(rgdal) # rgdal library | |
drvs <- ogrDrivers() # ogr capabilities | |
drvs[grep("Inf", drvs$name),] # test MapInfo reading capability of gdal | |
f <- "folder/filename.mid" # filename | |
l <- ogrListLayers(f) # layer name | |
sp_object <- readOGR(f, layer = l[[1]]) # load! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Basically follows this answer: http://stackoverflow.com/questions/20101083/how-can-i-read-mapinfo-files-in-r