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

When I try to use the earthdatalogin package to download HIL data, I always have the following problems. How can I solve them #1269

Open
LJ5233 opened this issue Jan 19, 2025 · 2 comments
Assignees
Labels
Milestone

Comments

@LJ5233
Copy link

LJ5233 commented Jan 19, 2025

When I try to use the earthdatalogin function to create netrc files and download data in HIL, the following problems always occur. What is the cause and how to solve them
This is my code
library(earthdatalogin)
Sys.setenv(EDGE_NETRC = "D:/文档/.netrc")

earthdatalogin::edl_netrc(
username = '[email protected]',
password = ''
)

设置 .netrc 文件路径

Sys.setenv(EDGE_NETRC = "E:/netrc")

roi <- c(
lon_min = 45.6422, lat_min = 24.0335,
lon_max = 45.0840, lat_max = 23.6178
)
hls_cube_s2 <- sits_cube(
source = 'HLS',
collection = 'HLSS30',
roi = roi,
bands = c('BLUE', 'GREEN', 'RED', 'CLOUD'),
start_date = as.Date('2020-06-01'),
end_date = as.Date('2020-09-01'),
progress = FALSE
)
plot(hls_cube_s2, red = 'RED', green = 'GREEN', blue = 'BLUE', date = '2020-06-20')
This is the problem that shows up
错误: .check_stac_items: NULL value not allowed for items - collection search returned no items
check 'roi', 'start_date', 'end_date', and 'tile' parameters
此外: Warning message:
In .check_netrc_gdal(attributes = .conf("HLS_ACCESS_URL")) :
netrc environment variable configuration detected (GDAL_HTTP_NETRC_FILE)
please, make sure it is available to all R sessions. To learn more, see the instructions in Chapter 4 of the online book

@gilbertocamara
Copy link
Contributor

Dear @LJ5233 we will look into the matter and come back to you ASAP.

@OldLipe
Copy link
Contributor

OldLipe commented Jan 20, 2025

Dear @LJ5233, we successfully reproduced your error.

Last year, EarthData STAC changed the date format to datetime.
We have fixed this in the dev branch. Please install dev using: devtools::install_github("e-sensing/sits@dev").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

4 participants