Created
December 19, 2016 12:45
-
-
Save KarthiAru/d3dc2e31ebcd4df3f3abf6650e42c616 to your computer and use it in GitHub Desktop.
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
# Get the layers from .kml file | |
layers <- ogrListLayers('bbmp.kml') | |
# Import layers to a list | |
timer_all <- Sys.time() | |
pb <- txtProgressBar(max=length(layers), style = 3) | |
options(warn=-1) # disable warnings | |
poly.data <- list() | |
for (i in 1:length(layers)) { | |
poly.data[i] <- readOGR(dsn="bbmp.kml", layer=layers[i], encoding="utf-8", verbose = F) | |
} | |
cat("***Process completed in",round(difftime(Sys.time(), timer_all, tz = "", units = "mins"),2),"min!***") | |
options(warn = 0) # re-enable warnings | |
close(pb) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment