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

Searching for Landsat-8 data #255

Open
vka012 opened this issue Sep 4, 2018 · 2 comments
Open

Searching for Landsat-8 data #255

vka012 opened this issue Sep 4, 2018 · 2 comments

Comments

@vka012
Copy link

vka012 commented Sep 4, 2018

Hi

I am searching for cloud-free Landsat-8 scenes of sea ice in the arctic region. I am running the landsat-util in python. However, I have some questions.

I have read that there at some point was possible to use a shapefile to define the footprint or region of interest when searching. Is this feature removed? And if so, why? As for now, I iterate over the latitudes and longitudes covering my region of interest, but this procedure is quite slow. Is there a better way to do this? Secondly, is it possible to determine the metadata returned for the products found? As for now only the cloud-coverpercentage, date, path, row, sat_type, sceneID, and thumbnail link (which does not work) is returned. I would for instance like to extract the exact time of acquisition, exact footprint, and product id.

Hope to hear from someone,
Vebjørn

@vka012
Copy link
Author

vka012 commented Sep 6, 2018

I have still not found out how (or if its possible) to use shapefiles for defining the bounding box I wish to search within.

However, I have found a way to extract the desired metadata. The metadata returned is determined in search.py. Just add a few extra lines when shaping the 'result' dict. For instance in line 144:159 of search.py:

            result['status'] = u'SUCCESS'
            result['total'] = r_dict['meta']['found']
            result['limit'] = r_dict['meta']['limit']
            result['total_returned'] = len(r_dict['results'])
            result['results'] = [{'sceneID': i['sceneID'],
                                  'sat_type': u'L8',
                                  'path': three_digit(i['path']),
                                  'row': three_digit(i['row']),
                                  'starttime' : i['sceneStartTime'], #ADDED
                                  'stoptime' : i['sceneStopTime'],  #ADDED
                                  'thumbnail': i['browseURL'],
                                  'date': i['acquisitionDate'],
                                  'cloud': i['cloud_coverage'],
                                  'productid': i['LANDSAT_PRODUCT_ID'],    #ADDED
                                  'footprint': i['data_geometry']['coordinates'][0]} #ADDED
                                 for i in r_dict['results']]

This would cause the result in candidate_scenes to include the productid, footprint, and start- and stoptime of acquisition (if geojson=False when searching).

Best,
Vebjørn

@vka012 vka012 changed the title Searching for Landsat-8 Data Searching for Landsat-8 Data with bounding box, and how to extract desired metadata. Sep 6, 2018
@vka012 vka012 changed the title Searching for Landsat-8 Data with bounding box, and how to extract desired metadata. Searching for Landsat-8 data Sep 6, 2018
@vka012 vka012 changed the title Searching for Landsat-8 data Searching for Landsat-8 data. Sep 6, 2018
@vka012 vka012 changed the title Searching for Landsat-8 data. Searching for Landsat-8 data Sep 6, 2018
@matthewhanson
Copy link
Contributor

Hi @vka012 Sorry for the delay.

landsat-util is on it's way to getting deprecated and we haven't had the time to put resources into new features. It's currently being replaced by our new sat-api and by sat-search. Sat-search allows you to search with a geojson and get the data, but doesn't have the processing capabilities that landsat-util does. We will be creating a new library in the coming months that completely replaces landsat-util with a tool that can be used on both Landsat-8 and Sentinel-2 (or any data source we add to sat-api).

In the meantime you might want to check those libraries out and see if they can help you:
https://medium.com/devseed/sat-api-an-api-for-spatiotemporal-asset-catalogs-88c3c78fdb0e
https://github.com/sat-utils/sat-search/

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