[R-sig-Geo] Encoding of attributes in SpatVector (terra package)

Tim Elrick @bo @end|ng |rom e|r|ck@de
Tue Jun 15 17:57:34 CEST 2021


Hi all,

Does anyone know how to change encoding for attributes in a SpatVector 
(terra package)?

library(sf) library(terra)
# importing a geojson file as sf object url <- 
"https://data.montreal.ca/dataset/00bd85eb-23aa-4669-8f1b-ba9a000e3dd8/resource/e9b0f927-8f75-458c-8fda-b5da65cc8b73/download/limadmin.geojson" 
mtl.sf <- read_sf(url)# convert sf object to SpatVector object mtl.spv 
<- vect(mtl) # while mtl.sf$NOM # displays French letters correctly, 
mtl.spv$NOM # does not anymore Thanks, Tim


	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list