neilcharles / geoviz

Functions to make it easy to process DEM data and add GPS traces to rstats Rayshader scenes, and to overlay mapbox and elevation shading imagery
http://www.hilltop-analytics.com
103 stars 11 forks source link

add_gps_to_rayshader does not work with EPSG:4326 (lat lon) #27

Closed carbonmetrics closed 5 years ago

carbonmetrics commented 5 years ago

Trying to plot own GPS tracks:

y[, .(lon,lat,ele)]
           lon        lat     ele
   1: 36.16192 -0.4924572 1833.37
   2: 36.16205 -0.4925422 1836.26
   3: 36.16213 -0.4925962 1836.74

gives

add_gps_to_rayshader(
+   raster_input=r,
+   lat=y$lat,
+   long=y$lon,
+   alt=y$ele,
+   line_width = 1.5,
+   lightsaber = TRUE,
+   colour = "red",
+   zscale = 5,
+   ground_shadow = TRUE
+ )
Error in sp::CRS("+init=EPSG:4326") : no system list, errno: 2
mdsumner commented 5 years ago

Try lower case epsg

carbonmetrics commented 5 years ago

The EPSG occurs in the error message. I cannot make that lower case.

mdsumner commented 5 years ago

@carbonmetrics if you want to test the change

remotes::install_github("mdsumner/geoviz@case-sensitive")
neilcharles commented 5 years ago

Thanks Michael