3D digital elevation maps with elevatr, rayshader and rayvista in R

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 ต.ค. 2024

ความคิดเห็น • 52

  • @Trappenheimer
    @Trappenheimer ปีที่แล้ว +2

    Always glad to watch your videos.

  • @AleksPopovic
    @AleksPopovic ปีที่แล้ว +1

    3D and rayshaders? Very cool tutorial Milos!

    • @milos-makes-maps
      @milos-makes-maps  ปีที่แล้ว +1

      Thank you for your comment! I'm thrilled to hear that you found the tutorial on creating 3D digital elevation maps using elevatr, rayshader, and rayvista packages in R cool! It's always fascinating to dive into the world of 3D visualization and explore the intricacies of rayshaders. If you have any specific questions or ideas for future projects, feel free to share them

  • @MdNahinAlam-x9d
    @MdNahinAlam-x9d ปีที่แล้ว +1

    Excellent. Appreciate your effort. I will back with my work soon 😃

    • @milos-makes-maps
      @milos-makes-maps  ปีที่แล้ว

      Thank you so much! I'm happy to hear that you found it useful. I can't wait to see your work. Please share it with me when you're done.😁

    • @MdNahinAlam-x9d
      @MdNahinAlam-x9d ปีที่แล้ว +1

      @@milos-makes-maps sure i will. BTW I am a regular follower on twitter and youtube.😇

  • @KyleDean66
    @KyleDean66 ปีที่แล้ว +1

    Well done sir. Very helpful.

    • @milos-makes-maps
      @milos-makes-maps  ปีที่แล้ว

      Much obliged, sir! I hope it'll be of help to you

  • @YuchenLiao-e6m
    @YuchenLiao-e6m ปีที่แล้ว +2

    Thank you for the informative tutorial.It's very helpful and useful. I'm looking for a clue on how to add polygons and lines to a 3D map in SHP file format. Could you provide some guidance?

    • @milos-makes-maps
      @milos-makes-maps  ปีที่แล้ว

      That's a great idea! I will cover it in one of my future tutorials

  • @roxycruz8121
    @roxycruz8121 2 หลายเดือนก่อน +1

    love your videos! what should i do if i am having trouble installing rayshader and rayrender? i keep getting this error: Error: Could not find tools necessary to compile a package

    • @milos-makes-maps
      @milos-makes-maps  2 หลายเดือนก่อน

      Thank you so much! It looks like you don't have RTools installed. Please find the guidelines here: th-cam.com/video/HzGVz8ju3W8/w-d-xo.html

  • @TheStrossicro
    @TheStrossicro ปีที่แล้ว +1

    Consider 11:18, The DEM layer can be any data; e.g. I can input my climate data SpatRaster and the 3d elevation will actually represent the input data variable. A DEM is simply a raster of elevation as the input data variable. Correct? The DEM part is where we decide which data to use?

    • @milos-makes-maps
      @milos-makes-maps  ปีที่แล้ว

      Yes definitely, very good point! As long as you work with RasterLayer (raster package) or SpatRaster (terra package) classes

    • @TheStrossicro
      @TheStrossicro ปีที่แล้ว +1

      @@milos-makes-maps I just wonder how it handles multiple nlyares of such a raster. Need to test when I catch a break from work.

  • @AndresEduardoGonzalezVidal
    @AndresEduardoGonzalezVidal ปีที่แล้ว +1

    Hi Milos, I am getting this error in the # 1. RAYVISTA - PLACE "Error: The elevatr package requires longitude in a range from -180 to 180." Do you know what it is?

    • @milos-makes-maps
      @milos-makes-maps  ปีที่แล้ว +1

      Hi Andres, are you trying to run my code or your own? I suggest updating the elevatr library as a first step

    • @AndresEduardoGonzalezVidal
      @AndresEduardoGonzalezVidal ปีที่แล้ว +1

      @@milos-makes-maps Same code, but I when I change long and lat it does work. Your plots are outstanding!

    • @milos-makes-maps
      @milos-makes-maps  ปีที่แล้ว

      @@AndresEduardoGonzalezVidal Thank you! Let me know if you experience more errors along the way. And I'd be happy to see your final map!

  • @0611131civil
    @0611131civil ปีที่แล้ว

    Wonderful video. I have a doubt. How to run the code in an online complier. The Library are stored in a local environment. IS there a way to change the code.?

    • @milos-makes-maps
      @milos-makes-maps  ปีที่แล้ว

      Thanks! Could you tell me the name of your preferred online compiler?

  • @JustMe-ur7td
    @JustMe-ur7td 5 หลายเดือนก่อน +1

    Could you share some code on how we (researchers) could add point to the map to indicate sampling sites?

    • @milos-makes-maps
      @milos-makes-maps  5 หลายเดือนก่อน

      Maybe this tutorial can help you render point layer using rayshader: th-cam.com/video/olNYYynSJfI/w-d-xo.html
      Let me know how it goes!

  • @sandunpriyankarasomarathna9281
    @sandunpriyankarasomarathna9281 ปีที่แล้ว +1

    sir can you give a link or website which used to draw a bounding box

    • @milos-makes-maps
      @milos-makes-maps  ปีที่แล้ว

      Yes, absolutely! Apologies for forgetting to include it in the description box: bboxfinder.com

    • @sandunpriyankarasomarathna9281
      @sandunpriyankarasomarathna9281 ปีที่แล้ว +1

      @@milos-makes-maps thank you very much sir.🌎

  • @IrakliKavtaradzepsyche
    @IrakliKavtaradzepsyche 11 หลายเดือนก่อน +1

    How do you view the map after downloading an elevation data with plot_3D_vista? Because it gives me a matrix and doesn't plot it with plot() base function

    • @milos-makes-maps
      @milos-makes-maps  11 หลายเดือนก่อน +1

      Hello, this function does not use the plot() base function to display the 3D scene. Instead, it opens an rgl window that shows the 3D scene interactively. To view the map after downloading the elevation data with plot_3D_vista, you need to run the function with the appropriate arguments and then use the mouse to rotate, zoom, and pan the 3D scene in the rgl window. You can also use other rayshader functions to further process the scene, such as adding shadows, lighting, or water effects. If you want to save the 3D scene as an image, you can use the rgl.snapshot() function to capture a screenshot of the current view in the rgl window. Alternatively, you can use the render_snapshot() function from the rayshader package to render a high-resolution image of the 3D scene

    • @IrakliKavtaradzepsyche
      @IrakliKavtaradzepsyche 11 หลายเดือนก่อน +1

      @@milos-makes-mapsThank you for a detailed answer. I understand there is a problem with rgl in my case as I get this error:
      Warning messages:
      1: 'rgl.surface' is deprecated.
      Use 'surface3d' instead.
      See help("Deprecated")
      2: 'rgl.viewpoint' is deprecated.
      Use 'view3d' instead.
      See help("Deprecated")
      3: 'rgl.triangles' is deprecated.
      Use 'triangles3d' instead.
      See help("Deprecated")
      I get the matrix but no visualisation of the map data.

    • @milos-makes-maps
      @milos-makes-maps  11 หลายเดือนก่อน

      @@IrakliKavtaradzepsyche Where does this warning occur when you run my code? Did you try updating rgl?

    • @IrakliKavtaradzepsyche
      @IrakliKavtaradzepsyche 11 หลายเดือนก่อน +1

      I updated rgl, it’s 1.2.1. Reinstalled xquartz, restarted the laptop but the same results about deprecated functions. My guess is rgl deprecated the functions and arguments that are used in rayvista function. Can that be the case? It might be a recent change.

    • @IrakliKavtaradzepsyche
      @IrakliKavtaradzepsyche 11 หลายเดือนก่อน +1

      And yes I use your code

  • @saiparasardas7906
    @saiparasardas7906 ปีที่แล้ว +1

    Hello Milos
    Can we make area maps similar to yours using specific shape files with polygon features ?

    • @saiparasardas7906
      @saiparasardas7906 ปีที่แล้ว +1

      Or is there any way to add polygon and points to your second map

    • @milos-makes-maps
      @milos-makes-maps  ปีที่แล้ว

      Hi, you can pass a polygon in sf format to `locations` argument in {elevatr} package and then render the scene using {rayvista} just as I did in the case of Ireland

    • @saiparasardas7906
      @saiparasardas7906 ปีที่แล้ว +1

      @@milos-makes-maps Thank you so much for your help. Have a good day

    • @milos-makes-maps
      @milos-makes-maps  ปีที่แล้ว

      @@saiparasardas7906 You're most welcome! I'm glad I could assist you. If you have any more questions or need further help in the future, don't hesitate to reach out. Also, looking forward to seeing your final map! Have a fantastic day ahead!

  • @TMDMSomasiri
    @TMDMSomasiri ปีที่แล้ว +1

    what is best methods for r learning

    • @milos-makes-maps
      @milos-makes-maps  ปีที่แล้ว

      The best way to learn R may depend on your personal learning style, motivation, and availability. I learned by doing: going through scripts and understanding what the code does in different scenarios. But if I were to do it all over again, I would go for TH-cam tutorials and books

  • @Tequeru
    @Tequeru 11 หลายเดือนก่อน +1

    hey my map in the 2. Rayvista - area is gettin white after loading

    • @milos-makes-maps
      @milos-makes-maps  11 หลายเดือนก่อน

      Hey, do you run the code from my tutorial when it happens? Also, what is the version of rayvista and rayshader that you use. Maybe it would be good to update them. Finally, do you work on Windows or Mac?

    • @Tequeru
      @Tequeru 11 หลายเดือนก่อน

      @@milos-makes-maps I was trying to catch up while you writte the code in the video, but I notice that you put it on description so I just downloaded it and erase the 1 and 3, and the first part of the code because I`ve alredy installed, I just keep the libs part and the 2 - area, it loads the map but gets white after a few seconds

    • @milos-makes-maps
      @milos-makes-maps  11 หลายเดือนก่อน

      I just re-ran # 2. RAYVISTA - AREA on my computer and I am able to render the scene. When you say "it loads the map but gets white after a few seconds" do you refer to the rgl window?

    • @Tequeru
      @Tequeru 11 หลายเดือนก่อน

      @@milos-makes-maps yes

    • @milos-makes-maps
      @milos-makes-maps  11 หลายเดือนก่อน

      @@Tequeru rgl window is first blank and after a shortwhile it displays the rendered scene