Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- paste (shpPath, "/", layers, "_WGS84.shp", sep = "")
- uploadShpfile <- reactive({
- if (!is.null(input$zip)) {
- zipFile <- input$zip
- zipPath <- substr(zipFile$datapath, 1, nchar(zipFile$datapath) - 5)
- unzip(zipFile$datapath, exdir = zipPath)
- pwd <- getwd()
- updir <- dirname(zipFile$datapath[1])
- setwd(updir)
- for (i in 1:nrow(zipFile)) {
- file.rename(zipFile$datapath[i], zipFile$name[i])
- }
- shpName <- zipFile$name[grep(x = zipFile$name, pattern = "*.shp")]
- shpPath <- paste(updir, shpName, sep = "/")
- setwd(updir)
- Layers <- ogrListLayers(shpPath)
- shpName <- readOGR(shpPath)
- shpName <- spTransform(shpName,CRS("+proj=longlat +datum=WGS84"))
- shapefile(shpName, paste(shpPath, "/", Layers, "_WGS84.shp", sep = ""))
- shpName
- }
- })
- observeEvent(input$send, {
- x <- 'blabla.sh /blabla/blabla.shp input$indice input$dates[1] input$dates[2]'
- system(x)
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement