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

Landsat 4 partly supported? #36

Open
anikaweinmann opened this issue Mar 2, 2021 · 3 comments
Open

Landsat 4 partly supported? #36

anikaweinmann opened this issue Mar 2, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@anikaweinmann
Copy link

anikaweinmann commented Mar 2, 2021

I try to get Lansat 5 data and get an error: landsatxplore.errors.LandsatxploreError: Failed to guess dataset from identifier.

import landsatxplore.api
from landsatxplore.earthexplorer import EarthExplorer

bb=('-0.49799280', '5.48261312', '0.67396018', '6.03887914')

scenes = landsat_api.search(dataset='landsat_tm_c2_l2', bbox=bb,start_date='1990-10-01', end_date='1991-01-31', max_cloud_cover='15', max_results=50)
# scenes are: [{'cloud_cover': 15.0, 'entity_id': 'LT41930561990359XXX03', ...]

ee.download(identifier="LT41930561990359XXX03",  output_dir=outdir, timeout=int(options["timeout"]))
*** landsatxplore.errors.LandsatxploreError: Failed to guess dataset from identifier.

It seems that with landsat_tm_c2_l2 I get scenes from landsat 4 and 5 (

"satellite": scene_id[2],
), but 4 is not yet supported
def landsat_dataset(satellite, collection="c1", level="l1"):
.

Is my assumption correct, or does the error come from somewhere else?
And is it possible to integrate landsat 4 completely?

@yannforget
Copy link
Owner

Hi,

Yes your assumption is correct! I did not plan to support Landsat 4.

You could try with the following change?

def landsat_dataset(satellite, collection="c1", level="l1"):
    """Get landsat dataset name."""
    if satellite == 4 or satellite == 5:
        sensor = "tm"

@anikaweinmann
Copy link
Author

anikaweinmann commented Mar 2, 2021

@yannforget Thank you this is working well. Is it okay to add this Landsat 4 support or better to remove it completely?

@yannforget yannforget added the enhancement New feature or request label Mar 2, 2021
@anikaweinmann
Copy link
Author

@yannforget I tried to remove the Landsat 4 scene: #37

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

No branches or pull requests

2 participants