terra icon indicating copy to clipboard operation
terra copied to clipboard

Can't save names in GPX format

Open kadyb opened this issue 2 years ago • 1 comments

Repost from: https://github.com/r-spatial/sf/issues/2202

library("terra")
gdal(warn = 1)

n = 5
df = data.frame(x = runif(n), y = runif(n))
df = vect(df, geom = c("x", "y"), crs = "epsg:4326")
df$name = rep(paste0("cam", 1:5))
writeVector(df, "test.gpx", filetype = "GPX", options = "")
#> Warning messages:
#>   1: Value 'cam1' of field test.ele parsed incompletely to real 0. (GDAL 1)
vect("test.gpx", layer = "waypoints")$name
#> [1] NA NA NA NA NA

kadyb avatar Jul 14 '23 08:07 kadyb

Repost from: r-spatial/sf#2202

library("terra")
gdal(warn = 1)

n = 5
df = data.frame(x = runif(n), y = runif(n))
df = vect(df, geom = c("x", "y"), crs = "epsg:4326")
df$name = rep(paste0("cam", 1:5))
writeVector(df, "test.gpx", filetype = "GPX", options = "")
#> Warning messages:
#>   1: Value 'cam1' of field test.ele parsed incompletely to real 0. (GDAL 1)
vect("test.gpx", layer = "waypoints")$name
#> [1] NA NA NA NA NA

I have also been trying to do this, any update on this issue?

derek-corcoran-barrios avatar Aug 06 '24 09:08 derek-corcoran-barrios