Read .shp files
read_shp(file, col_spec = "?", encoding = NA, geometry_col = "geometry")
file | A vector of filenames. |
---|---|
col_spec | A character vector of length one with
one character for each column or one character to be used
for all columns. The following characters are supported
(designed to align with
|
encoding | Use |
geometry_col | The column name in which |
A tibble::tibble()
with geometry column
created using shp_geometry()
.
#> # A tibble: 36 x 5 #> NAME CAPITAL STATE_NAME POPULATION geometry #> <chr> <chr> <chr> <dbl> <shp:point> #> 1 Monterrey Y Nuevo Leon 2015000 (-100.31709 25.67735) #> 2 Mazatlan N Sinaloa 199830 (-106.41607 23.20383) #> 3 Guadalajara Y Jalisco 2325000 (-103.34380 20.67359) #> 4 Tampico N Tamaulipas 435000 ( -97.84263 22.24323) #> 5 Mexico City C Distrito Federal 14100000 ( -99.12757 19.42705) #> 6 Puebla de Zarag… Y Puebla 1055000 ( -98.19295 19.04863) #> 7 Veracruz N Veracruz-Llave 385000 ( -96.08524 19.00683) #> 8 Oaxaca Y Oaxaca 154223 ( -96.95135 16.90743) #> 9 Merida Y Yucatan 400142 ( -89.55286 20.82187) #> 10 Mexicali Y Baja California No… 365000 (-115.29424 32.62020) #> # … with 26 more rows