Git Product home page Git Product logo

rayvista's People

Contributors

gadenbuie avatar h-a-graham avatar matthew-law avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

rayvista's Issues

Error: The elevatr package requires longitude in a range from -180 to 180.

Hey,

When running this code from the readme file:

sistan_suture<- plot_3d_vista(27.82153210664024, 60.5107976729012,radius=15000,
                              overlay_detail = 13, elevation_detail=10,
                              show_vista = FALSE)

I get this response:

Error: The elevatr package requires longitude in a range from -180 to 180.
Retrying in 2 seconds.
Error: The elevatr package requires longitude in a range from -180 to 180.
Retrying in 1 seconds.
Error: The elevatr package requires longitude in a range from -180 to 180.
Retrying in 6 seconds.
Error: The elevatr package requires longitude in a range from -180 to 180.
Retrying in 8 seconds.
Error: The elevatr package requires longitude in a range from -180 to 180.
Error in `stop_rate_excess()`:
! Request failed after 5 attempts

I get similar response when using .lat <- 46.504, .long<- 12.946
But code runs successfully with .lat <- 57.219566, .long <- -6.092690

Any idea what is causing this please? Thanks

When downloading larger files, I will often timeout

When downloading some larger or more complex areas, I will sometimes get the error below. Is that a limitation of the api's or is something else going on that I am missing.
See example below

 .lat <- 34.086210
 .long <- 139.522432
 jima <- plot_3d_vista(lat = .lat, long = .long, phi=30
+                         , zscale = 2.5, radius = 10000)

_Downloading overlay...
Error in curl::curl_download(url = q, destfile = outfile) : 
  Timeout was reached: [] Resolving timed out after 10000 milliseconds_

Bad data in example

This is a wonderful package because it "just works" and simply returns all the pieces needed for great visualizations. Thanks!

The example now breaks because the DEM that's retrieved contains some crazy negative elevations. This results in the render appearing as an enormously tall box with the wee bitty terrain sitting on top. Using show_vista = FALSE, this fixes it:

.lat <- 57.21956608144513
.long <- -6.092690805001252

cuillins <- plot_3d_vista(lat = .lat, long = .long,show_vista = FALSE)

# set negative elevations to zero
cuillins$dem_matrix[cuillins$dem_matrix < 0] <- 0

rgl::clear3d()
cuillins$texture %>%
  plot_3d(cuillins$dem_matrix)
rayshader::render_snapshot(clear=TRUE)

render_highquality(clear = TRUE) not working

Hi again, Hugh!

I tried the rayvista package again, in one of my sites. The render function works. But, when I use "render_highquality(clear = TRUE), my R stops with an error message, as:

R Session Aborted

Thanks,

SS

Error in if (file.exists(over_cache) && file.exists(bbox_cache))

Hi there, I updated to version 0.1.3 and both on my Ubunto 20.04 and Windows 10 machines rayvista is not working anymore. I get the above error message just by running the sample from the plot_3d_vista example from the documentation. Many thanks in advance for having a look at it.

Here's the output of my sessioninfo:

R version 4.0.4 (2021-02-15)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)

Matrix products: default

locale:
[1] LC_COLLATE=German_Switzerland.1252  LC_CTYPE=German_Switzerland.1252   
[3] LC_MONETARY=German_Switzerland.1252 LC_NUMERIC=C                       
[5] LC_TIME=German_Switzerland.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] rayvista_0.1.3   rayshader_0.23.0

loaded via a namespace (and not attached):
 [1] rgl_0.105.22            Rcpp_1.0.6              prettyunits_1.1.1       class_7.3-18           
 [5] ps_1.6.0                utf8_1.2.1              assertthat_0.2.1        rprojroot_2.0.2        
 [9] digest_0.6.27           foreach_1.5.1           mime_0.10               R6_2.5.0               
[13] e1071_1.7-4             ggplot2_3.3.3           pillar_1.5.1            rlang_0.4.11           
[17] progress_1.2.2          curl_4.3.1              rstudioapi_0.13         miniUI_0.1.1.1         
[21] callr_3.5.1             desc_1.3.0              devtools_2.3.2          webshot_0.5.2          
[25] htmlwidgets_1.5.3       munsell_0.5.0           shiny_1.6.0             vipor_0.4.5            
[29] compiler_4.0.4          httpuv_1.5.5            xfun_0.22               pkgconfig_2.0.3        
[33] pkgbuild_1.2.0          ggbeeswarm_0.6.0        htmltools_0.5.1.1       tidyselect_1.1.0       
[37] tibble_3.1.0            codetools_0.2-18        fansi_0.4.2             crayon_1.4.1           
[41] dplyr_1.0.5             withr_2.4.1             later_1.1.0.1           sf_0.9-7               
[45] grid_4.0.4              gtable_0.3.0            jsonlite_1.7.2          xtable_1.8-4           
[49] lifecycle_1.0.0         DBI_1.1.1               magrittr_2.0.1          scales_1.1.1           
[53] units_0.7-0             KernSmooth_2.23-18      cli_2.3.1               cachem_1.0.4           
[57] fs_1.5.0                promises_1.2.0.1        remotes_2.2.0           doParallel_1.0.16      
[61] testthat_3.0.2          ellipsis_0.3.1          vctrs_0.3.6             generics_0.1.0         
[65] iterators_1.0.13        tools_4.0.4             manipulateWidget_0.10.1 beeswarm_0.3.1         
[69] glue_1.4.2              purrr_0.3.4             hms_1.0.0               crosstalk_1.1.1        
[73] processx_3.4.5          pkgload_1.2.0           parallel_4.0.4          fastmap_1.1.0          
[77] colorspace_2.0-0        sessioninfo_1.1.1       classInt_0.4-3          memoise_2.0.0          
[81] knitr_1.31              usethis_2.0.1          

Error in if (RStudio Version 1.4.1103, R Version 4.0.4, Ubuntu 20)

I get this error when I run your example.

Retrieving cached overlay data...
Error in if ((is.null(sp::wkt(locations)) | nchar(sp::wkt(locations)) == :
argument is of length zero

I get it immediately after I run this command from your example:

cuillins <- plot_3d_vista(lat = .lat, long = .long, phi = 30)

Add arg to request area rather than area around a point.

Suggestion raised here: #14

Shouldn't be too hard to add in but making a note here to remind myself to do it down the line.
Add an argument which accepts an sf object or sf readable file path - the extent of the objet is then used to set the requested area as an alternative to the current approach of area around a point.

If anyone has any suggestions on this please feel free to comment here.

Error: error in evaluating the argument 'CRSobj' in selecting a method for function 'spTransform': NA

Umm Hello I'm using Windows I tried to run The following code example It gave me a Lot of errors

Line of code

library(rayshader)
library(rayvista)

.lat <- 57.219566
.long <- -6.092690

cuillins <- plot_3d_vista(lat = .lat, long = .long, phi=30)

render_label(heightmap= cuillins, text='Bla Bheinn: 928 m', lat = .lat,
long=.long, extent = attr(cuillins, 'extent'),altitude=600,
clear_previous = T, zscale = 2)

render_compass()

render_scalebar(limits=c(
round(dim(cuillins)[2]*attr(cuillins, 'resolution')/1000,1)),
label_unit = 'km')

render_snapshot(clear=TRUE)

Error given

library(rayshader)

library(rayvista)
.lat <- 57.219566
.long <- -6.092690

cuillins <- plot_3d_vista(lat = .lat, long = .long, phi=30)
Downloading overlay...
Error: error in evaluating the argument 'CRSobj' in selecting a method for function 'spTransform': NA
Retrying in 2 seconds.
Error: error in evaluating the argument 'CRSobj' in selecting a method for function 'spTransform': NA
Retrying in 3 seconds.
Error: error in evaluating the argument 'CRSobj' in selecting a method for function 'spTransform': NA
Retrying in 7 seconds.
Error: error in evaluating the argument 'CRSobj' in selecting a method for function 'spTransform': NA
Retrying in 3 seconds.
Error: error in evaluating the argument 'CRSobj' in selecting a method for function 'spTransform': NA
Error: Request failed after 5 attempts
Run rlang::last_error() to see where the error occurred.
In addition: Warning message:
In showSRID(SRS_string, format = "PROJ", multiline = "NO", prefer_proj = prefer_proj) :
PROJ/GDAL PROJ string degradation in workflow
repeated warnings suppressed
Discarded ellps WGS 84 in Proj4 definition: +proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs +type=crs

render_label(heightmap= cuillins, text='Bla Bheinn: 928 m', lat = .lat,

  •          long=.long, extent = attr(cuillins, 'extent'),altitude=600,
    
  •          clear_previous = T, zscale = 2)
    

Error in render_label(heightmap = cuillins, text = "Bla Bheinn: 928 m", :
object 'cuillins' not found

render_compass()
Error in if (id) rgl.attrib.count(id, "colors") else rgl.getcolorcount() :
argument is not interpretable as logical

render_scalebar(limits=c(

  • round(dim(cuillins)[2]*attr(cuillins, 'resolution')/1000,1)),
  • label_unit = 'km')
    Error in render_scalebar(limits = c(round(dim(cuillins)[2] * attr(cuillins, :
    object 'cuillins' not found

render_snapshot(clear=TRUE)

Help Me

Errorin col2rgb(colors) : no method for coercing this S4 class to a vector

Hello,
This is such a great package -- thanks for writing it!
I'm trying to use render_polygons() on top of a plot_3d_vista(), and getting the following error message:

Errorin col2rgb(colors) : 
 no method for coercing this S4 class to a vector

I'm not sure of what's happening here. My polygon is a Simple Feature looking like this:

Simple feature collection with 1 feature and 8 fields
Geometry type: POLYGON
Dimension:     XY
Bounding box:  xmin: -105.3896 ymin: 39.93475 xmax: -105.3558 ymax: 39.95643

Its datum is WGS84.

I'm calling render_polygons like this:

render_polygons(mypolygon,
                attr(cropped_dem, "extent"),
                cropped_dem,
                parallel = TRUE,
                top = 10
                )

cropped_dem being an elevation raster in WGS84 that is a bit larger than the area generated via plot_3d_vista.
Would you have any idea of what might be happening? Thanks so much!

ERROR Longitude in a range from -180 to 180

I don't know why this error occurs. longtitude is 111.04041.

library(rayshader) 
# install.packages("devtools")
# devtools::install_github("h-a-graham/rayvista", dependencies=TRUE)
library(rayvista)

.lat <- 23.30974
.long <- 111.04041

cuillins <- plot_3d_vista(lat = .lat, long = .long, phi=30)

error:

Retrieving cached overlay data...
Error: The elevatr package requires longitude in a range from -180 to 180.
Retrying in 1 seconds.
Error: The elevatr package requires longitude in a range from -180 to 180.
Retrying in 2 seconds.
Error: The elevatr package requires longitude in a range from -180 to 180.
Retrying in 7 seconds.
Error: The elevatr package requires longitude in a range from -180 to 180.
Retrying in 4 seconds.
Error: The elevatr package requires longitude in a range from -180 to 180.
Error in `stop_rate_excess()`:
! Request failed after 5 attempts
Run `rlang::last_error()` to see where the error occurred.

bounds object not recognised

Hi there, this is a really geat looking package and have just been playing with a fresh install, however, I am getting an error with the crop function:

Seems like the bounds object generated here in download_elevation.R:
bounds <- sf::st_bbox(bounds_sf)

is not recognised as the crop function then throws:
Error in .local(x, y, ...) : Cannot get an Extent object from argument y

Fine with all other elevation datasets args - just applies to "aws" where you have the patch from commit:
9ae923c

Thanks!

R version 3.6.3

3D rendering surface/ground using LiDAR file

Hello,

First of all, thank you for creating this beautiful package mate. I am using the plot_3d_vista function to 3D render a LiDAR point cloud ground surface data. So, I took the X and Y columns of the LAS file to give to .lat and .long variables, but I get an error while running the plot_3d_vista function. Btw the LiDAR file is in EPSG:32611. How can I fix this? The LAS file when loaded in R is just like a data.frame as seen here.


# LiDAR 3D modeling
LAS_lat = LAS.Ground@data$Y
LAS_long = LAS.Ground@data$X
LAS.G_3D.Render = plot_3d_vista(lat = LAS_lat , long = LAS_long , phi=30)

Error in getClassDim(x, length(x), dim, "POINT") : 
  5158186 is an illegal number of columns for a POINT

Cheers

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.