Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SwissVectorMap Data #2

Open
ratnanil opened this issue Jan 5, 2019 · 1 comment
Open

Add SwissVectorMap Data #2

ratnanil opened this issue Jan 5, 2019 · 1 comment

Comments

@ratnanil
Copy link
Contributor

ratnanil commented Jan 5, 2019

Add data from the swissvectormap dataset. There are two scales available:

@ratnanil
Copy link
Contributor Author

I inspected the data and narrowed it down to a smaller subset:

dataset 1:500'000:

  • 16_DKM500_EISENBAHN_BRUECKE.shp
  • 21_DKM500_STRASSE.shp
  • 23_DKM500_HOHEITSGRENZE.shp
  • 25_DKM500_GEWAESSER_LIN.shp
  • 28_DKM500_BODENBEDECKUNG.shp

from the 1:100'000 dataset:

  • 17_DKM1M_EISENBAHN.shp
  • 18_DKM1M_STRASSE.shp
  • 20_DKM1M_GEWAESSER_PLY.shp
  • 21_DKM1M_GEWAESSER_LIN.shp
  • 23_DKM1M_HOHEITSGRENZE.shp
  • DKM1M_HOHEITSGEBIET.shp

for future reference, I used the following code to inspect the data:

library(sf)
library(tidyverse)
shapefiles <- list.files("C:/Users/rata/Downloads/SMV1000_SHAPE_CHLV95/20161001_SMV1000_SHAPE_CHLV95/Shapefiles",".shp$",full.names = T)
# shapefiles <- list.files("C:/Users/rata/Downloads/SMV500_SHAPE_CHLV95/20161001_SMV500_SHAPE_CHL95/Shapefiles/",".shp$",full.names = T)

shapefiles %>%
  map(~st_set_crs(read_sf(.x),2056)) %>%
  map2(.y = shapefiles, function(x,y){
    bname <- strsplit(basename(y),split = "\\.")[[1]][1]
    p <- ggplot(x) + 
             geom_sf() +
      labs(title = bname)
    strsplit(bname,split = ".")[[1]]
    ggsave(filename = paste0("C:/Users/rata/Temp/plots/",bname,".png"),plot = p)
  })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant