Skip to content
Snippets Groups Projects
Commit a2f0f0fa authored by Juliette Engelaere-Lefebvre's avatar Juliette Engelaere-Lefebvre
Browse files

bux fix nom champ geo conforme à l'original avec importer_data() - pour de bon

parent 4243cab4
No related branches found
No related tags found
No related merge requests found
Pipeline #58810 passed
......@@ -173,8 +173,9 @@ importer_data <- function(table = NULL, schema = NULL, db = "public", server =
if(exists("data_sf") & nrow(def_table) > 0) {
sf::st_geometry(data) <- sf::st_geometry(data_sf)
# renommage du champ geo a l'identique
sf_col_name <- attributes(data_sf)$sf_column
data <- dplyr::rename_with(data, ~gsub("^geometry$", sf_col_name, .x))
sf::st_geometry(data) <- attributes(data_sf)$sf_column
sf::st_geometry(data) <- sf_col_name
data <- dplyr::relocate(data, dplyr::all_of(defs$nms))
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment