Skip to content

Commit

Permalink
better
Browse files Browse the repository at this point in the history
  • Loading branch information
mdsumner committed Jun 11, 2024
1 parent a4c7425 commit 85a825e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions data-raw/geopackage.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
library(sf)
shapes <- dplyr::inner_join(measoshapes::measo_regions05, measoshapes::measo_names)
library(dplyr)
x <- group_by(measoshapes::measo_regions05, name) |> summarize()
x <- sf::st_set_crs(x, "+proj=laea +lat_0=-90 +lon_0=0 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs")
shapes <- dplyr::inner_join(x, measoshapes::measo_names, "name")
sf::st_write(shapes, "inst/extdata/measo_regions.gpkg")
shapes_ll <- dplyr::inner_join(measoshapes::measo_regions05_ll, measoshapes::measo_names)

shapes_ll <- dplyr::inner_join(measoshapes::measo_regions05_ll, measoshapes::measo_names, relationship = "many-to-many")
shapes_ll <- sf::st_set_crs(shapes_ll, "EPSG:4326")
sf::st_write(shapes_ll, "inst/extdata/measo_regions_ll.gpkg")

## for Quantarctica (?)
sf::write_sf(sf::st_transform(measoshapes::measo_regions05, "EPSG:3031"), "inst/extdata/measo_regions_epsg_3031.gpkg")
sf::write_sf(sf::st_transform(shapes, "EPSG:3031"), "inst/extdata/measo_regions_epsg_3031.gpkg")

0 comments on commit 85a825e

Please sign in to comment.