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

Suggest to rename argument in senSearch #10

Open
mcgregorian1 opened this issue Mar 25, 2021 · 0 comments
Open

Suggest to rename argument in senSearch #10

mcgregorian1 opened this issue Mar 25, 2021 · 0 comments

Comments

@mcgregorian1
Copy link

I noticed when trying to retrieve URLs from senSearch that the argument name "lonlat" and its description is misleading. I was searching for the point 97.65317 (lon), 24.15859 (lat), so in the "lonlat" argument I put it in this order. However, the function returned NULL saying there were no images, even though a manual search in Copernicus SciHub showed there was.

I tried switching the argument to lat, then lon, and the function worked.

Can I please suggest you rename the argument to be "latlon" and update the description?

Here is the code. First one does not work.

senSearch(
            username="****",
            password="*****", 
            verbose=TRUE, 
            platform="Sentinel-2", 
            product="S2MSI1C", 
            lonlat=c(97.65317, 24.15859), # c(lon, lat)
            startDate=as.Date("2015-01-01"), 
            endDate=as.Date("2018-12-17")
)

Adapting dates.
Adding platform name.
[1] "Adding query intersects"
Adding query intersects
Added product type.
https://scihub.copernicus.eu/dhus/search?q=beginposition:[2015-01-01T00:00:00.000Z%20TO%202018-12-17T23:59:59.999Z]%20AND%20platformname:Sentinel-2%20AND%20footprint:%22intersects(97.65317,%2024.15859)%22%20AND%20producttype:S2MSI1C&format=json&rows=100
Search Total result: 
There is no images in the response, check spatial and temporal arguments.
NULL

This one works.

senSearch(
            username="****",
            password="*****", 
            verbose=TRUE, 
            platform="Sentinel-2", 
            product="S2MSI1C", 
            lonlat=c(24.15859, 97.65317), # c(lat, lon)
            startDate=as.Date("2015-01-01"), 
            endDate=as.Date("2018-12-17")
)

Adapting dates.
Adding platform name.
[1] "Adding query intersects"
Adding query intersects
Added product type.
https://scihub.copernicus.eu/dhus/search?q=beginposition:[2015-01-01T00:00:00.000Z%20TO%202018-12-17T23:59:59.999Z]%20AND%20platformname:Sentinel-2%20AND%20footprint:%22intersects(24.15859,%2097.65317)%22%20AND%20producttype:S2MSI1C&format=json&rows=100
Search Total result: 121
Image result 1 Name:S2A_MSIL1C_20150815T041056_N0204_R047_T47QLG_20150815T041524
Image result 1 Url:https://scihub.copernicus.eu/dhus/odata/v1/Products('b3fc9f4e-f857-4f65-abcd-af74551b7c50')/$value
...
...
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

1 participant