Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download GEDI by extent error #67

Closed
ghost opened this issue Oct 29, 2023 · 6 comments
Closed

Download GEDI by extent error #67

ghost opened this issue Oct 29, 2023 · 6 comments

Comments

@ghost
Copy link

ghost commented Oct 29, 2023

Hi there, I am new to Julia, and trying to download GEDI for a roi, but I am getting this error. Any help would be much appreciated. Thanks
Screenshot from 2023-10-29 13-50-36

@evetion
Copy link
Owner

evetion commented Oct 29, 2023

Welcome to Julia!

You define an Extent by providing the dimensions, like so:

vietnam = Extent(X = (102., 107.0), Y = (8.0, 12.0))

@ghost
Copy link
Author

ghost commented Nov 4, 2023

Thanks. I passed the dims like you said, but still not working.
Screenshot from 2023-11-04 15-02-25

@evetion
Copy link
Owner

evetion commented Nov 5, 2023

Might I suggest you paste code as text, and not as screenshots? You can use ``` to quote code, like so

granules = search(:GEDI, :GEDI02_A, bbox=vietnam)

Incidentally, the above code snippet should work. In your screenshot, you pass the :bbox (a symbol), while you should pass the Extent object (in your case, vietnam).

@ghost
Copy link
Author

ghost commented Nov 6, 2023

Thanks very much for your patience with this. Much appreciated!

Here is the code:

using SpaceLiDAR
using Extents
using DataFrames
#include("utils.jl")

Define the extent for Can Tho, Vietnam

bbox = Extents(X = (105.77, 105.85), Y = (10.05, 10.15))
vietnam = Extent(X = (102., 107.0), Y = (8.0, 12.0))
granules = search(:ICESat2, :GEDI02_A,:bbox)

@evetion
Copy link
Owner

evetion commented Jan 8, 2024

Not sure if it now works for you. Your example code contains several syntax errors. I would advise following some Julia tutorial(s) to help with that.

bbox = Extents(X = (105.77, 105.85), Y = (10.05, 10.15))  # should be Extent (without the s)
vietnam = Extent(X = (102., 107.0), Y = (8.0, 12.0))
granules = search(:ICESat2, :GEDI02_A,:bbox) # This combination can't work, and :bbox is a symbol, not the variable you made on the first line

This should work

bbox = Extent(X = (105.77, 105.85), Y = (10.05, 10.15))
granules = search(:GEDI, :GEDI02_A; extent=bbox)  # note the keyword argument

@alex-s-gardner
Copy link
Collaborator

It looks like this issue was resolved... closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants