1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124
|
R version 3.6.2 (2019-12-12) -- "Dark and Stormy Night"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> suppressPackageStartupMessages(library(maps))
> suppressPackageStartupMessages(library(sf))
>
> m = map(xlim = c(4,9), ylim = c(48,55), fill = TRUE, plot = FALSE)
> st_as_sf(m)
Simple feature collection with 6 features and 1 field
geometry type: MULTIPOLYGON
dimension: XY
bbox: xmin: -4.7625 ymin: 42.34048 xmax: 15.0166 ymax: 57.73692
geographic CRS: WGS 84
ID geom
1 Belgium MULTIPOLYGON (((5.993945 50...
2 Germany MULTIPOLYGON (((8.587891 54...
3 Denmark MULTIPOLYGON (((9.739746 54...
4 France MULTIPOLYGON (((5.789746 49...
5 Luxembourg MULTIPOLYGON (((6.116504 50...
6 Netherlands MULTIPOLYGON (((4.226171 51...
> m = map(xlim = c(4,9), ylim = c(48,55), plot = FALSE)
> st_as_sf(m, fill = FALSE)
Simple feature collection with 6 features and 1 field
geometry type: MULTILINESTRING
dimension: XY
bbox: xmin: 2.524902 ymin: 47.59272 xmax: 10.92617 ymax: 57.73692
geographic CRS: WGS 84
ID geom
1 Belgium MULTILINESTRING ((5.993945 ...
2 Germany MULTILINESTRING ((6.116504 ...
3 Denmark MULTILINESTRING ((4.226171 ...
4 France MULTILINESTRING ((8.587891 ...
5 Luxembourg MULTILINESTRING ((7.615625 ...
6 Netherlands MULTILINESTRING ((6.344336 ...
> st_as_sf(map(), fill = FALSE)
Simple feature collection with 253 features and 1 field
geometry type: MULTILINESTRING
dimension: XY
bbox: xmin: -180 ymin: -84.51308 xmax: 189.4905 ymax: 83.57725
geographic CRS: WGS 84
First 10 features:
ID geom
1 Aruba MULTILINESTRING ((-69.89912...
2 Afghanistan MULTILINESTRING ((74.89131 ...
3 Angola MULTILINESTRING ((74.5414 3...
4 Anguilla MULTILINESTRING ((61.26201 ...
5 Albania MULTILINESTRING ((66.52226 ...
6 Finland MULTILINESTRING ((67.75899 ...
7 Andorra MULTILINESTRING ((11.74307 ...
8 United Arab Emirates MULTILINESTRING ((13.06816 ...
9 Argentina MULTILINESTRING ((20.56621 ...
10 Armenia MULTILINESTRING ((20.61133 ...
> st_as_sf(map(fill = TRUE))
Simple feature collection with 253 features and 1 field
geometry type: MULTIPOLYGON
dimension: XY
bbox: xmin: -180 ymin: -85.19218 xmax: 190.2708 ymax: 83.59961
geographic CRS: WGS 84
First 10 features:
ID geom
1 Aruba MULTIPOLYGON (((-69.89912 1...
2 Afghanistan MULTIPOLYGON (((74.89131 37...
3 Angola MULTIPOLYGON (((23.9665 -10...
4 Anguilla MULTIPOLYGON (((-63.00122 1...
5 Albania MULTIPOLYGON (((20.06396 42...
6 Finland MULTIPOLYGON (((20.61133 60...
7 Andorra MULTIPOLYGON (((1.706055 42...
8 United Arab Emirates MULTIPOLYGON (((53.92783 24...
9 Argentina MULTIPOLYGON (((-64.54916 -...
10 Armenia MULTIPOLYGON (((45.55235 40...
> st_as_sf(map(), fill = FALSE, group = FALSE)
Simple feature collection with 1627 features and 1 field
geometry type: MULTILINESTRING
dimension: XY
bbox: xmin: -180 ymin: -84.51308 xmax: 189.4905 ymax: 83.57725
geographic CRS: WGS 84
First 10 features:
ID geom
1 Aruba MULTILINESTRING ((-69.89912...
2 Afghanistan MULTILINESTRING ((74.89131 ...
3 Angola MULTILINESTRING ((74.5414 3...
4 Angola:Cabinda MULTILINESTRING ((60.84336 ...
5 Anguilla MULTILINESTRING ((61.26201 ...
6 Albania MULTILINESTRING ((66.52226 ...
7 Finland:Aland Islands:Foglo MULTILINESTRING ((67.75899 ...
8 Finland:Aland Islands:Eckero MULTILINESTRING ((23.9665 -...
9 Finland:Aland Islands:Fasta Aland MULTILINESTRING ((23.38066 ...
10 Andorra MULTILINESTRING ((11.74307 ...
> st_as_sf(map(fill = TRUE), group = FALSE)
Simple feature collection with 1627 features and 1 field
geometry type: MULTIPOLYGON
dimension: XY
bbox: xmin: -180 ymin: -85.19218 xmax: 190.2708 ymax: 83.59961
geographic CRS: WGS 84
First 10 features:
ID geom
1 Aruba MULTIPOLYGON (((-69.89912 1...
2 Afghanistan MULTIPOLYGON (((74.89131 37...
3 Angola MULTIPOLYGON (((23.9665 -10...
4 Angola:Cabinda MULTIPOLYGON (((12.21367 -5...
5 Anguilla MULTIPOLYGON (((-63.00122 1...
6 Albania MULTIPOLYGON (((20.06396 42...
7 Finland:Aland Islands:Foglo MULTIPOLYGON (((20.61133 60...
8 Finland:Aland Islands:Eckero MULTIPOLYGON (((19.6623 60....
9 Finland:Aland Islands:Fasta Aland MULTIPOLYGON (((19.98955 60...
10 Andorra MULTIPOLYGON (((1.706055 42...
>
> proc.time()
user system elapsed
1.173 0.067 1.230
|