Search and download Copernicus Sentinel satellite images

Overview

sentinelsat

PyPI package Travis-CI codecov.io code coverage Documentation gitter.im chat Zenodo DOI

Sentinelsat makes searching, downloading and retrieving the metadata of Sentinel satellite images from the Copernicus Open Access Hub easy.

It offers an easy-to-use command line interface

sentinelsat -u <user> -p <password> -g <search_polygon.geojson> --sentinel 2 --cloud 30

and a powerful Python API.

from sentinelsat import SentinelAPI, read_geojson, geojson_to_wkt

api = SentinelAPI('user', 'password')
footprint = geojson_to_wkt(read_geojson('search_polygon.geojson'))
products = api.query(footprint,
                     producttype='SLC',
                     orbitdirection='ASCENDING')
api.download_all(products)

Documentation is published at http://sentinelsat.readthedocs.io/.

Installation

Install sentinelsat through pip:

pip install sentinelsat

Usage

Sentinelsat provides a Python API and a command line interface to search, download and retrieve the metadata for Sentinel products.

Python Library

from sentinelsat import SentinelAPI, read_geojson, geojson_to_wkt
from datetime import date

# connect to the API
api = SentinelAPI('user', 'password', 'https://scihub.copernicus.eu/dhus')

# download single scene by known product id
api.download(<product_id>)

# search by polygon, time, and Hub query keywords
footprint = geojson_to_wkt(read_geojson('map.geojson'))
products = api.query(footprint,
                     date = ('20151219', date(2015, 12, 29)),
                     platformname = 'Sentinel-2',
                     cloudcoverpercentage = (0, 30))

# download all results from the search
api.download_all(products)

# GeoJSON FeatureCollection containing footprints and metadata of the scenes
api.to_geojson(products)

# GeoPandas GeoDataFrame with the metadata of the scenes and the footprints as geometries
api.to_geodataframe(products)

# Get basic information about the product: its title, file size, MD5 sum, date, footprint and
# its download url
api.get_product_odata(<product_id>)

# Get the product's full metadata available on the server
api.get_product_odata(<product_id>, full=True)

Valid search query keywords can be found at the Copernicus Open Access Hub documentation.

Command Line Interface

A basic search query consists of a search area geometry as well as the username and password to access the Copernicus Open Access Hub.

sentinelsat -u <user> -p <password> -g <geojson>

Search areas are provided as GeoJSON files, which can be created with QGIS or geojson.io. If you do not specify a start and end date only products published in the last 24 hours will be queried.

Example

Search and download all Sentinel-1 scenes of type SLC, in descending orbit, for the year 2015.

sentinelsat -u <user> -p <password> -g <search_polygon.geojson> -s 20150101 -e 20151231 -d \
--producttype SLC -q "orbitdirection=Descending" \
--url "https://scihub.copernicus.eu/dhus"

Username, password and DHuS URL can also be set via environment variables for convenience.

# same result as query above
export DHUS_USER="<user>"
export DHUS_PASSWORD="<password>"
export DHUS_URL="https://scihub.copernicus.eu/dhus"

sentinelsat -g <search_polygon.geojson> -s 20150101 -e 20151231 -d \
--producttype SLC -q "orbitdirection=Descending"

Options

-u --user TEXT Username [required] (or environment variable DHUS_USER)
-p --password TEXT Password [required] (or environment variable DHUS_PASSWORD)
  --url TEXT Define another API URL. Default URL is 'https://scihub.copernicus.eu/apihub/'.
-s --start TEXT Start date of the query in the format YYYYMMDD.
-e --end TEXT End date of the query in the format YYYYMMDD.
-g --geometry PATH Search area geometry as GeoJSON file.
  --uuid TEXT Select a specific product UUID instead of a query. Multiple UUIDs can separated by commas.
  --name TEXT Select specific product(s) by filename. Supports wildcards.
  --sentinel INT Limit search to a Sentinel satellite (constellation).
  --instrument TEXT Limit search to a specific instrument on a Sentinel satellite.
  --producttype TEXT Limit search to a Sentinel product type.
-c --cloud INT Maximum cloud cover in percent. (requires --sentinel to be 2 or 3)
-o --order-by TEXT Comma-separated list of keywords to order the result by. Prefix '-' for descending order.
-l --limit INT Maximum number of results to return. Defaults to no limit.
-d --download   Download all results of the query.
  --path PATH Set the path where the files will be saved.
-q --query TEXT Extra search keywords you want to use in the query. Separate keywords with comma. Example: 'producttype=GRD,polarisationmode=HH'.
-f --footprints   Create geojson file search_footprints.geojson with footprints of the query result.
  --info   Display DHuS server information.
  --version   Show version number and exit.
-h --help   Show help message and exit.

Tests

To run the tests on sentinelsat:

git clone https://github.com/sentinelsat/sentinelsat.git
cd sentinelsat
pip install -e .[dev]
pytest -v

By default, prerecorded responses to Copernicus Open Access Hub queries are used to not be affected by its downtime. To allow the tests to run actual queries against the Copernicus Open Access Hub set the environment variables

export DHUS_USER=<username>
export DHUS_PASSWORD=<password>

and add --disable-vcr to pytest arguments. To update the recordings use --vcr-record with once, new_episodes or all. See vcrpy docs for details.

Documentation

To build the documentation:

git clone https://github.com/sentinelsat/sentinelsat.git
cd sentinelsat
pip install -e .[dev]
cd docs
make html

The full documentation is also published at http://sentinelsat.readthedocs.io/.

Changelog

See CHANGELOG. You can also use GitHub's compare view to see the changes in the master branch since last release.

Contributors

We invite anyone to participate by contributing code, reporting bugs, fixing bugs, writing documentation and tutorials and discussing the future of this project. Please check CONTRIBUTE.rst.

For a list of maintainers and contributors please see AUTHORS.rst and the contributor graph.

License

GPLv3+

Comments
  • Download freezes in command line

    Download freezes in command line

    Hi.

    I build a batch file with instructions to download sentinel products in command line. The download starts but at some point (9%, 13% or other value) the download stops and nothing happens. Does anyone know what is happened? This is what happens. Stopped at 9% in this case.

    question 
    opened by liaduarte 34
  • HTTP status 403 Forbidden: User quota exceeded

    HTTP status 403 Forbidden: User quota exceeded

    The download_all module causes the following error message:

    Fetching archival status:  17%|█▋        | 4/24 [00:05<00:27,  1.36s/ products]User quota exceeded: MediaRegulationException : An exception occured while creating a stream: Maximum number of 4 concurrent flows achieved by the user "xxx"
    Fetching archival status:  17%|█▋        | 4/24 [00:06<00:34,  1.72s/ products]
    Traceback (most recent call last):
      File "C:\Users\xxx\miniforge3\lib\site-packages\IPython\core\interactiveshell.py", line 3437, in run_code
        exec(code_obj, self.user_global_ns, self.user_ns)
      File "<ipython-input-7-35ca78a4b9cf>", line 1, in <module>
        __api.download_all(product_ids, directory_path=dest_path, n_concurrent_dl=1)
      File "C:\Users\xxx\miniforge3\lib\site-packages\sentinelsat\sentinel.py", line 723, in download_all
        is_online = not self.trigger_offline_retrieval(pid)
      File "C:\Users\xxx\miniforge3\lib\site-packages\sentinelsat\sentinel.py", line 636, in trigger_offline_retrieval
        raise LTAError(msg, r)
    sentinelsat.exceptions.LTAError: HTTP status 403 Forbidden: User quota exceeded: MediaRegulationException : An exception occured while creating a stream: Maximum number of 4 concurrent flows achieved by the user "xxx"
    

    Even if I try to set the parameter n_concurrent_dl to 1, the result is the same. However, I am able to download every single product with a loop and by using the download function:

    for item in products.keys():
        api.download(item, "")
    

    Why I wanted to use the download_all function is, I would like to download conveniently products from the LTA, as you described here.

    Are there a workaround for this issue? I saw the merge request #491. But even with this code the download_all function does not work for me.

    bug 
    opened by ibaris 25
  • Could not download OLCI from https://coda.eumetsat.int

    Could not download OLCI from https://coda.eumetsat.int

    Hi

    I'm new to using sentinelsat. I'm currently running the master branch (v0.13-37-g533e243) of sentinelsat (due to this issue #294) and trying to download OLCI data from eumetsat. The command is this:

    sentinelsat --url https://coda.eumetsat.int -u uname -p 'password' -g some.json --sentinel 3 -s 20190515 -e 20190518 --instrument OLCI -d

    The output I get is this:

    Found 25 products Will download 25 products using 2 workers

    Traceback (most recent call last):
      File "/home/pal/.local/bin/sentinelsat", line 11, in <module>
        load_entry_point('sentinelsat==0.13', 'console_scripts', 'sentinelsat')()
      File "/home/user/.local/lib/python3.6/site-packages/click/core.py", line 764, in __call__
        return self.main(*args, **kwargs)
      File "/home/user/.local/lib/python3.6/site-packages/click/core.py", line 717, in main
        rv = self.invoke(ctx)
      File "/home/user/.local/lib/python3.6/site-packages/click/core.py", line 956, in invoke
        return ctx.invoke(self.callback, **ctx.params)
      File "/home/user/.local/lib/python3.6/site-packages/click/core.py", line 555, in invoke
        return callback(*args, **kwargs)
      File "/home/user/.local/lib/python3.6/site-packages/sentinelsat/scripts/cli.py", line 168, in cli
        product_infos, triggered, failed_downloads = api.download_all(products, path)
      File "/home/user/.local/lib/python3.6/site-packages/sentinelsat/sentinel.py", line 690, in download_all
        raise next(iter(x.exception() for x in dl_tasks if x.exception()))
      File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
        result = self.fn(*self.args, **self.kwargs)
      File "/home/user/.local/lib/python3.6/site-packages/sentinelsat/sentinel.py", line 761, in _download_online_retry
        if self.is_online(product_info['id']):
      File "/home/user/.local/lib/python3.6/site-packages/sentinelsat/sentinel.py", line 457, in is_online
        raise SentinelAPIError('Could not verify whether product {} is online'.format(id), r)
    sentinelsat.sentinel.SentinelAPIError: HTTP status 404 Not Found: Could not verify whether product 4c6186dd-f89e-4164-86bb-b597a478821a is online
    

    The json file is a 5 point polygon.

    Is this a bug, or a misstake on my side?

    bug 
    opened by paalge 20
  • Download doesn't work anymore

    Download doesn't work anymore

    Hello,

    I've used your code and it worked very well until recently. Now the products are found from my query but the downloaded file is just a faulty 276 byte .zip file. The download finsihes without error.

    After updating all python packages (via pip) i get the following errors when a product is found and attempted to download (no error when no product):

    Traceback (most recent call last):
    
      File "c:\anaconda2\lib\runpy.py", line 162, in _run_module_as_main
        "__main__", fname, loader, pkg_name)
    
      File "c:\anaconda2\lib\runpy.py", line 72, in _run_code
        exec code in run_globals
    
      File "C:\Anaconda2\Scripts\sentinel.exe\__main__.py", line 9, in <module>
      File "c:\anaconda2\lib\site-packages\click\core.py", line 716, in __call__
        return self.main(*args, **kwargs)
    
      File "c:\anaconda2\lib\site-packages\click\core.py", line 696, in main
        rv = self.invoke(ctx)
    
      File "c:\anaconda2\lib\site-packages\click\core.py", line 1060, in invoke
        return _process_result(sub_ctx.command.invoke(sub_ctx))
    
      File "c:\anaconda2\lib\site-packages\click\core.py", line 889, in invoke
        return ctx.invoke(self.callback, **ctx.params)
    
      File "c:\anaconda2\lib\site-packages\click\core.py", line 534, in invoke
        return callback(*args, **kwargs)
    
      File "c:\anaconda2\lib\site-packages\sentinelsat\scripts\cli.py", line 97, in search
        api.download_all(path)
    
      File "c:\anaconda2\lib\site-packages\sentinelsat\sentinel.py", line 270, in download_all
        self.download(product['id'], path, checksum, **kwargs)
    
      File "c:\anaconda2\lib\site-packages\sentinelsat\sentinel.py", line 251, in download
        download(product['url'], path=path, session=self.session, **kwargs)
    
      File "c:\anaconda2\lib\site-packages\homura-0.1.3-py2.7.egg\homura.py", line 274, in download
        hm.start()
    
      File "c:\anaconda2\lib\site-packages\homura-0.1.3-py2.7.egg\homura.py", line 196, in start
        raise e
    
    pycurl.error: (60, 'SSL certificate problem: self signed certificate in certificate chain')
    
    opened by Opadera 20
  • LTA retrieval is not triggered

    LTA retrieval is not triggered

    Hi, apologies if this has already been addressed, but I did not see it solved anywhere. When I try to download an S2 L1C tile that is in the LTA, I get the following response: "Product [product id here] is not online. Triggering retrieval from long term archive." So my strategy has been to wait for 24 hours and try again, but it turns out the tile is STILL in the LTA, and actually never makes it online. I'm not sure if the problem is with my code, with the sentinelsat API, or with the data hub. Do other people have the same issue? How do you resolve it?

    question 
    opened by andersknudby 18
  • Define 1.0 release

    Define 1.0 release

    I would like to get a discussion going what we define as the 1.0 milestone for sentinelsat.

    I would argue that we are pretty much feature complete now - if this can be said about a project without a clear definition of expected features. As long as there are no dramatic changes to the Open Access Hub Software new additions will mainly be when new satellites/sensors are included, for which we are well prepared with the generalized layout of the API.

    What I see mostly happening now is refinement and refactoring, where the biggest part is likely the refactoring of the download function to alleviate the curl dependency as our only hard dependency on a compiled library (and the biggest source of install/user issues).

    What are changes you would expect to be made regarding a 1.0 release? I'll start with:

    • [x] refactoring download function and remove curl dependency
    opened by kr-stn 16
  • Required String parameter 'q' is not present

    Required String parameter 'q' is not present

    I'm trying to run this simple command but it throws an error:

    $ sentinelsat -u *** -p *** -g catalunya.geojson --sentinel 2 --cloud 30
    Traceback (most recent call last):
      File "/home/denis/satellogic/env-shub/bin/sentinelsat", line 11, in <module>
        sys.exit(cli())
      File "/home/denis/satellogic/env-shub/lib/python3.6/site-packages/click/core.py", line 764, in __call__
        return self.main(*args, **kwargs)
      File "/home/denis/satellogic/env-shub/lib/python3.6/site-packages/click/core.py", line 717, in main
        rv = self.invoke(ctx)
      File "/home/denis/satellogic/env-shub/lib/python3.6/site-packages/click/core.py", line 956, in invoke
        return ctx.invoke(self.callback, **ctx.params)
      File "/home/denis/satellogic/env-shub/lib/python3.6/site-packages/click/core.py", line 555, in invoke
        return callback(*args, **kwargs)
      File "/home/denis/satellogic/env-shub/lib/python3.6/site-packages/sentinelsat/scripts/cli.py", line 160, in cli
        order_by=order_by, limit=limit, **search_kwargs)
      File "/home/denis/satellogic/env-shub/lib/python3.6/site-packages/sentinelsat/sentinel.py", line 147, in query
        response, count = self._load_query(query, formatted_order_by, limit, offset)
      File "/home/denis/satellogic/env-shub/lib/python3.6/site-packages/sentinelsat/sentinel.py", line 272, in _load_query
        products, count = self._load_subquery(query, order_by, limit, offset)
      File "/home/denis/satellogic/env-shub/lib/python3.6/site-packages/sentinelsat/sentinel.py", line 304, in _load_subquery
        _check_scihub_response(response)
      File "/home/denis/satellogic/env-shub/lib/python3.6/site-packages/sentinelsat/sentinel.py", line 1027, in _check_scihub_response
        raise api_error
    sentinelsat.sentinel.SentinelAPIError: HTTP status 400 Bad Request: 
    # HTTP Status 400 - Required String parameter 'q' is not present
    
     **type** Status report
    
     **message** _Required String parameter 'q' is not present_
    
     **description** _The request sent by the client was syntactically incorrect._
    
    * * *
    
    ### Apache Tomcat/8.0.36
    
    opened by drnextgis 15
  • HTTP status 500 Internal Server Error: RemoteSolrException

    HTTP status 500 Internal Server Error: RemoteSolrException

    Error occurred while running the following command:

    sentinelsat -u <user> -p <password> -g region.geojson -s 20180101 -e 20181231 --producttype S2MSI1C -q "orbitdirection=Descending" --url "https://scihub.copernicus.eu/dhus" --footprints --cloud 30 --sentinel 2
    

    The error is:

    Traceback (most recent call last):
      File "/Users/rmartinez/anaconda3/envs/sentinelsat/bin/sentinelsat", line 11, in <module>
        sys.exit(cli())
      File "/Users/rmartinez/anaconda3/envs/sentinelsat/lib/python3.6/site-packages/click/core.py", line 722, in __call__
        return self.main(*args, **kwargs)
      File "/Users/rmartinez/anaconda3/envs/sentinelsat/lib/python3.6/site-packages/click/core.py", line 697, in main
        rv = self.invoke(ctx)
      File "/Users/rmartinez/anaconda3/envs/sentinelsat/lib/python3.6/site-packages/click/core.py", line 895, in invoke
        return ctx.invoke(self.callback, **ctx.params)
      File "/Users/rmartinez/anaconda3/envs/sentinelsat/lib/python3.6/site-packages/click/core.py", line 535, in invoke
        return callback(*args, **kwargs)
      File "/Users/rmartinez/anaconda3/envs/sentinelsat/lib/python3.6/site-packages/sentinelsat/scripts/cli.py", line 136, in cli
        order_by=order_by, limit=limit, **search_kwargs)
      File "/Users/rmartinez/anaconda3/envs/sentinelsat/lib/python3.6/site-packages/sentinelsat/sentinel.py", line 134, in query
        response, count = self._load_query(query, formatted_order_by, limit, offset)
      File "/Users/rmartinez/anaconda3/envs/sentinelsat/lib/python3.6/site-packages/sentinelsat/sentinel.py", line 242, in _load_query
        products, count = self._load_subquery(query, order_by, limit, offset)
      File "/Users/rmartinez/anaconda3/envs/sentinelsat/lib/python3.6/site-packages/sentinelsat/sentinel.py", line 272, in _load_subquery
        _check_scihub_response(response)
      File "/Users/rmartinez/anaconda3/envs/sentinelsat/lib/python3.6/site-packages/sentinelsat/sentinel.py", line 890, in _check_scihub_response
        raise api_error
    sentinelsat.sentinel.SentinelAPIError: HTTP status 500 Internal Server Error: RemoteSolrException : Error from server at http://172.30.175.69:8983/solr/dhus: non ok status: 414, message:Request-URI Too Long
    

    What could be the cause?

    I am using

    sentinelsat, version 0.12.2 , and macOS High Sierra

    bug 
    opened by robmartz 15
  • Merge query() and raw_query()

    Merge query() and raw_query()

    Since query() is really just an extended wrapper around query_raw(), we could easily further extend query() a bit and get rid of query_raw() entirely.

    This PR adds parameter raw= to query() and removes the query_raw() method. The raw string is just appended to the main query string with an AND in between. So, to get the equivalent functionality of query_raw() you can do query(None, None, None, raw="query") or query(raw="query", initial_date=None, end_date=None) now. Which, I have to admit, is kind of ugly. We will also have to prohibit ourselves from adding any query() parameters that would change the query string by default (as the date params do right now).

    My motivation stems from the way I have typically used query_raw() in my own code. That is:

    query = api.format_query(aoi, initial_date, end_date)
    query += " AND some additional query parameters"
    products = api.query_raw(query)
    

    I also reordered some query() args so the ones that will be passed to format_query() are always the first. This allowed me to make the signature of count() identical to query(), which makes it a lot easier to use.

    I'm interested in hearing what you guys think. Does it look like a good change?

    opened by valgur 15
  • Download doesn't work anymore

    Download doesn't work anymore

    Hello, I used sentinelsat until 4 days ago when this error showed up:

    Traceback (most recent call last): File "c:\users\crossi\appdata\local\continuum\anaconda2\lib\runpy.py", line 17 4, in _run_module_as_main "main", fname, loader, pkg_name) File "c:\users\crossi\appdata\local\continuum\anaconda2\lib\runpy.py", line 72 , in run_code exec code in run_globals File "C:\Users\crossi\AppData\Local\Continuum\Anaconda2\Scripts\sentinel.exe_ main.py", line 9, in File "c:\users\crossi\appdata\local\continuum\anaconda2\lib\site-packages\clic k\core.py", line 716, in call return self.main(_args, *_kwargs) File "c:\users\crossi\appdata\local\continuum\anaconda2\lib\site-packages\clic k\core.py", line 696, in main rv = self.invoke(ctx) File "c:\users\crossi\appdata\local\continuum\anaconda2\lib\site-packages\clic k\core.py", line 1060, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "c:\users\crossi\appdata\local\continuum\anaconda2\lib\site-packages\clic k\core.py", line 889, in invoke return ctx.invoke(self.callback, *_ctx.params) File "c:\users\crossi\appdata\local\continuum\anaconda2\lib\site-packages\clic k\core.py", line 534, in invoke return callback(_args, *_kwargs) File "c:\users\crossi\appdata\local\continuum\anaconda2\lib\site-packages\sent inelsat\scripts\cli.py", line 83, in search api.query(get_coordinates(geojson), start, end, *_search_kwargs) File "c:\users\crossi\appdata\local\continuum\anaconda2\lib\site-packages\sent inelsat\sentinel.py", line 130, in query self.query_raw(query) File "c:\users\crossi\appdata\local\continuum\anaconda2\lib\site-packages\sent inelsat\sentinel.py", line 138, in query_raw _check_scihub_response(self.content) File "c:\users\crossi\appdata\local\continuum\anaconda2\lib\site-packages\sent inelsat\sentinel.py", line 89, in _check_scihub_response raise SentinelAPIError(response.status_code, code, msg, response.content) sentinelsat.sentinel.SentinelAPIError: (HTTP status: 404, code: None) # HTTP Sta tus 404 -


    type Status report

    message __

    description The requested resource is not available.


    Apache Tomcat/7.0.47

    Any suggestions?

    opened by Rot90 15
  • pass any keyword argument to homura and fix CA errors

    pass any keyword argument to homura and fix CA errors

    This makes it possible e.g. to hide the progress bar with show_progress=False and other options already supported in the homura version on pypi, and most importantly to close #1 by providing a mechanism to pass the CA certificate path through homura to pycurl (once shichao-an/homura#4 is addressed).

    opened by ghost 15
  • sentinelsat.exceptions.ServerError: HTTP status 500: NullPointerException : Object not found

    sentinelsat.exceptions.ServerError: HTTP status 500: NullPointerException : Object not found

    Bug/Problem description

    Hi there! I am getting the following error when trying to download certain products. Here, I am attempting to download the product named S2A_MSIL1C_20220507T103631_N0400_R008_T32UMD_20220507T124253 with id c120ac84-9a1a-468f-8bf7-cd787c921203.

    Traceback (most recent call last):
      File "/home/sentinel/.automation/automation/lib/python3.10/site-packages/sentinelsat/sentinel.py", line 1017, in _check_scihub_response
        response.raise_for_status()
      File "/home/sentinel/.automation/automation/lib/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status
        raise HTTPError(http_error_msg, response=self)
    requests.exceptions.HTTPError: 500 Server Error:  for url: https://scihub.copernicus.eu/dhus/odata/v1/Products('c120ac84-9a1a-468f-8bf7-cd787c921203')/$value
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/home/sentinel/.automation/automation/lib/python3.10/site-packages/sentinelsat/download.py", line 700, in _download_online_retry
        return self.download(uuid, directory, stop_event=stop_event)
      File "/home/sentinel/.automation/automation/lib/python3.10/site-packages/sentinelsat/download.py", line 136, in download
        filename = self.api._get_filename(product_info)
      File "/home/sentinel/.automation/automation/lib/python3.10/site-packages/sentinelsat/sentinel.py", line 596, in _get_filename
        self._check_scihub_response(req, test_json=False)
      File "/home/sentinel/.automation/automation/lib/python3.10/site-packages/sentinelsat/sentinel.py", line 1063, in _check_scihub_response
        raise ServerError(msg, response)
    sentinelsat.exceptions.ServerError: HTTP status 500: NullPointerException : Object (c120ac84-9a1a-468f-8bf7-cd787c921203.zip)not found.
    ERROR:sentinelsat.SentinelAPI:There was an error downloading S2A_MSIL1C_20220507T103631_N0400_R008_T32UMD_20220507T124253
    Traceback (most recent call last):
      File "/home/sentinel/.automation/automation/lib/python3.10/site-packages/sentinelsat/sentinel.py", line 1017, in _check_scihub_response
        response.raise_for_status()
      File "/home/sentinel/.automation/automation/lib/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status
        raise HTTPError(http_error_msg, response=self)
    requests.exceptions.HTTPError: 500 Server Error:  for url: https://scihub.copernicus.eu/dhus/odata/v1/Products('c120ac84-9a1a-468f-8bf7-cd787c921203')/$value
    

    As far as I understand, the product is not found server side. This is weird, as I can check if the product is online using the is_online(id) function without any problem. I attached the code I am using so you can hopefully reproduce it.

    Code example

    from sentinelsat import SentinelAPI
    
    # Create API instance
    sentinel_api_instance = SentinelAPI(sentinel_api_username, sentinel_api_password, 'https://scihub.copernicus.eu/dhus/')
    
    # Query parameters
    TILE_NAME = "32UMD"
    RELATIVE_ORBIT_ID = 8
    START_DATE = "20220506"
    END_DATE = "20220508"
    query_kwargs = {
            'platformname': 'Sentinel-2',
            'producttype': 'S2MSI1C',
            'date': (START_DATE, END_DATE),
            'relativeorbitnumber':(RELATIVE_ORBIT_ID)}
    query_kwargs['tileid'] = TILE_NAME
    query_kwargs['raw'] = f'tileid:{TILE_NAME} OR filename:*_T{TILE_NAME}_*'
    
    # Query available products for parameters
    products = sentinel_api_instance.query(**query_kwargs)
    print(f"Amount of products found {len(products)}")
    
    # Extract product id and title and print them
    product_id = [product_id for product_id in products.keys()][0]
    product_title = [products[product_id]['title']  for product_id in products.keys()][0]
    print(f"Product title is: {product_title}")
    print(f"Product id is: {product_id}")
    
    # Check if the product is online
    is_online = sentinel_api_instance.is_online(product_id)
    print(f"Is online {is_online}")
    
    # As the product is online, download it
    sentinel_api_instance.download_all(products, directory_path=".", max_attempts=1)
    

    The output I am getting is:

    Amount of products found 1
    Product title is: S2A_MSIL1C_20220507T103631_N0400_R008_T32UMD_20220507T124253
    Product id is: c120ac84-9a1a-468f-8bf7-cd787c921203
    Is online True
    Downloading products:   0%|          | 0/1 [00:00<?, ?product/s]ERROR:sentinelsat.SentinelAPI:There was an error downloading S2A_MSIL1C_20220507T103631_N0400_R008_T32UMD_20220507T124253
    Traceback (most recent call last):
      File "/home/sentinel/.automation/automation/lib/python3.10/site-packages/sentinelsat/sentinel.py", line 1017, in _check_scihub_response
        response.raise_for_status()
      File "/home/sentinel/.automation/automation/lib/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status
        raise HTTPError(http_error_msg, response=self)
    requests.exceptions.HTTPError: 500 Server Error:  for url: https://scihub.copernicus.eu/dhus/odata/v1/Products('c120ac84-9a1a-468f-8bf7-cd787c921203')/$value
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/home/sentinel/.automation/automation/lib/python3.10/site-packages/sentinelsat/download.py", line 700, in _download_online_retry
        return self.download(uuid, directory, stop_event=stop_event)
      File "/home/sentinel/.automation/automation/lib/python3.10/site-packages/sentinelsat/download.py", line 136, in download
        filename = self.api._get_filename(product_info)
      File "/home/sentinel/.automation/automation/lib/python3.10/site-packages/sentinelsat/sentinel.py", line 596, in _get_filename
        self._check_scihub_response(req, test_json=False)
      File "/home/sentinel/.automation/automation/lib/python3.10/site-packages/sentinelsat/sentinel.py", line 1063, in _check_scihub_response
        raise ServerError(msg, response)
    sentinelsat.exceptions.ServerError: HTTP status 500: NullPointerException : Object (c120ac84-9a1a-468f-8bf7-cd787c921203.zip)not found.
    Downloading products: 100%|██████████| 1/1 [00:00<00:00,  2.65product/s]ERROR:sentinelsat.SentinelAPI:c120ac84-9a1a-468f-8bf7-cd787c921203 failed: Traceback (most recent call last):
      File "/home/sentinel/.automation/automation/lib/python3.10/site-packages/sentinelsat/sentinel.py", line 1017, in _check_scihub_response
        response.raise_for_status()
      File "/home/sentinel/.automation/automation/lib/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status
        raise HTTPError(http_error_msg, response=self)
    requests.exceptions.HTTPError: 500 Server Error:  for url: https://scihub.copernicus.eu/dhus/odata/v1/Products('c120ac84-9a1a-468f-8bf7-cd787c921203')/$value
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/lib/python3.10/concurrent/futures/thread.py", line 58, in run
        result = self.fn(*self.args, **self.kwargs)
      File "/home/sentinel/.automation/automation/lib/python3.10/site-packages/sentinelsat/download.py", line 721, in _download_online_retry
        raise last_exception
      File "/home/sentinel/.automation/automation/lib/python3.10/site-packages/sentinelsat/download.py", line 700, in _download_online_retry
        return self.download(uuid, directory, stop_event=stop_event)
      File "/home/sentinel/.automation/automation/lib/python3.10/site-packages/sentinelsat/download.py", line 136, in download
        filename = self.api._get_filename(product_info)
      File "/home/sentinel/.automation/automation/lib/python3.10/site-packages/sentinelsat/sentinel.py", line 596, in _get_filename
        self._check_scihub_response(req, test_json=False)
      File "/home/sentinel/.automation/automation/lib/python3.10/site-packages/sentinelsat/sentinel.py", line 1063, in _check_scihub_response
        raise ServerError(msg, response)
    sentinelsat.exceptions.ServerError: HTTP status 500: NullPointerException : Object (c120ac84-9a1a-468f-8bf7-cd787c921203.zip)not found.
    
    Downloading products: 100%|██████████| 1/1 [00:00<00:00,  2.63product/s]
    ResultTuple(downloaded={}, retrieval_triggered={}, failed={'c120ac84-9a1a-468f-8bf7-cd787c921203': {'id': 'c120ac84-9a1a-468f-8bf7-cd787c921203', 'title': 'S2A_MSIL1C_20220507T103631_N0400_R008_T32UMD_20220507T124253', 'size': 768608113, 'md5': '10e8de1b8058878200d5a467af468960', 'date': datetime.datetime(2022, 5, 7, 10, 36, 31, 24000), 'footprint': 'POLYGON((7.500940412097549 53.240200815060746,9.146276872400831 53.24953673463324,9.143007184742661 52.26245957867572,7.534433848467897 52.25344953517325,7.500940412097549 53.240200815060746))', 'url': "https://scihub.copernicus.eu/dhus/odata/v1/Products('c120ac84-9a1a-468f-8bf7-cd787c921203')/$value", 'Online': True, 'Creation Date': datetime.datetime(2022, 5, 7, 16, 13, 2, 145000), 'Ingestion Date': datetime.datetime(2022, 5, 7, 16, 12, 20, 655000), 'quicklook_url': "https://scihub.copernicus.eu/dhus/odata/v1/Products('c120ac84-9a1a-468f-8bf7-cd787c921203')/Products('Quicklook')/$value", 'exception': ServerError('NullPointerException : Object (c120ac84-9a1a-468f-8bf7-cd787c921203.zip)not found.', <Response [500]>)}})
    

    Any help is appreciated!

    Best, Olli

    opened by Jan-Oliver 0
  • updated path filter & addition to chain node filters

    updated path filter & addition to chain node filters

    Based on the issue #574, enhancement to support-

    • Path filters to accept a sequence of pattern
    • Chain multiple node filters

    Example notebook added here.

    Please let me know if more changes are required, as I am new to this may need some help.

    enhancement 
    opened by cOsprey 1
  • Make_path_filter with several conditions

    Make_path_filter with several conditions

    Hi,

    I am downloading S2 data and I want to download only one band. I use make_path_filter in order to define my filter, for example: path_filter = make_path_filter("B01", exclude=False) to download only B01 band. It works but I also need xml files that are available in the products. How can I add an other condition in make_path_filter to download one band and xml files ?

    Thanks in advance for your help.

    enhancement question 
    opened by siana1234 12
  • Fix nodefilter not working with Sentinel-3 products

    Fix nodefilter not working with Sentinel-3 products

    Fixes issue #566, which was caused by the code not handling the product folder path and manifest filename based on the type of product. Since most Sentinel products have a folder path ending in .SAFE and a manifest file named manifest.safe, this was an issue only with products such as Sentinel-3, whose folder path ends in .SEN3 and whose manifest file is named xfdumanifest.xml. By fetching the full odata metadata of the queried product, it is possible to get the correct folder path, and sets the manifest filename accordingly.

    If there are products whose folder path does not end in '.SAFE' or '.SEN3', they should be handled accordingly.

    bug hacktoberfest-accepted 
    opened by valpamp 14
  • How to download only enchanced_measrement.nc file from a Sen-3 SRAL product using node filter ?

    How to download only enchanced_measrement.nc file from a Sen-3 SRAL product using node filter ?

    Hi,

    I'm trying to download only enhanced_measurement.nc file from a SEN 3 SRAL product using node_filter but I'm getting error every time:

    Unexpected nav segment Navigation Property: org.apache.olingo.odata2.core...

    I think I'm not making my node_filter right so kindly help me make a node_filter for my case.

    Thanks alot.

    bug 
    opened by usamarehan557 13
  • Add return to CLI script

    Add return to CLI script

    When building a tool on sentinelsat, it would be great to be able to reuse the provided CLI. Currently one has to implement their own CLI that will then query the Python-API but of course there will be much duplication to https://github.com/sentinelsat/sentinelsat/blob/main/sentinelsat/scripts/cli.py .

    I'm not sure if this a valid use case or feasible (considering that different options return different data).

    For example if https://github.com/sentinelsat/sentinelsat/blob/7cf7854f6b86477d8b389337bb6c0168b3e4ea0b/sentinelsat/scripts/cli.py#L372 , https://github.com/sentinelsat/sentinelsat/blob/7cf7854f6b86477d8b389337bb6c0168b3e4ea0b/sentinelsat/scripts/cli.py#L377 , https://github.com/sentinelsat/sentinelsat/blob/7cf7854f6b86477d8b389337bb6c0168b3e4ea0b/sentinelsat/scripts/cli.py#L384 and https://github.com/sentinelsat/sentinelsat/blob/7cf7854f6b86477d8b389337bb6c0168b3e4ea0b/sentinelsat/scripts/cli.py#L400 would return their result instead of printing, or duping it, it could be used in other workflows e.g. to further process the downloaded data.

    enhancement 
    opened by SlowMo24 1
Releases(v1.1.1)
  • v1.1.1(Jan 5, 2022)

    Fixed

    • Fixed handling of missing Online OData attribute in older DHuS versions, such as https://coda.eumetsat.int. (#535 @valgur)
    • Fixed the filter_node function generated by make_path_filter so that node paths are no longer converted to lowercase before pattern matching. (#541 @avalentino)
    • In download_all(), the initial check on already existing files now ignores server errors when determining the file name. Any existing files are still skipped when initiating the download. (#543 @joooeey)

    CLI changes

    • Show help instead of an error when no CLI arguments are provided.

    Changed

    • Tests are no longer included in the Python source package to significantly reduce its size.
    Source code(tar.gz)
    Source code(zip)
  • v1.1.0(Aug 19, 2021)

    download_all() has been completely rewritten to correctly handle server-side concurrency limits and bugs.

    CLI changes

    • New CLI option --fmt to specify the format of the listed products. (#526 @avalentino)
    • More detailed progress info during downloads. Added progressbars for overall download and LTA retrieval progress. Product names are now included in individual download progress bars. (#532 @valgur)
    • Progressbars no longer conflict with logging output. (#531 @valgur)
    • Added --fail-fast option for downloading. (#532)

    Added

    • Added concurrent_dl_limit and concurrent_lta_trigger_limit parameters to SentinelAPI which are used to ensure that the server-side limit for concurrent downloads (4 for scihub.copernicus.eu) and the maximum number of concurrent LTA retrievals (set to 10 by default) are respected everywhere. (#532)
    • Added an optional lta_timeout parameter to SentinelAPI, which sets the maximum time to wait for products to be retrieved from the LTA. Defaults to unlimited. (#532)
    • Added dl_retry_delay parameter to SentinelAPI, which defaults to 10 seconds and limits the rate of download retries to give the server some time to recover. (#532)
    • Added fail_fast option to download_all(). (#532)
    • Added support for SHA3-256 checksums used by some newer Sentinel-2 products. (#523 @valgur)
    • For more advanced use-cases, Downloader.download_all(), which returns a detailed DownloadStatus enum for each product, can now be used. (#532)
    • GeoJSON geometries consisting of multiple features are now supported. (#530 @mackland)

    Changed

    • download_all() now waits for all LTA retrievals to finish before exiting. (#532)
    • Default n_concurrent_dl in download_all() increased from 2 to 4. (#532)
    • Default LTA retry period was reduced from 600 to 60 seconds. (#532)
    • SentinelProductsAPI has been merged into SentinelAPI and will be removed in a future release. (#532)
    • Suppressed the unnecessary server stacktrace printing for QueryLengthError. (#524 @valgur)

    Fixed

    • Changed logic for _get_filename when Content-Disposition header not present (#494 @rbrishabh)
    • download_all() strictly tracks and limits the number of concurrent GET requests made (which includes LTA triggering) to respect server-side limits. (#532, #508 @avalentino).
    • Triggering is now much more robust against server-side bugs (such as the frequent HTTP 500: NullPonterException, Postgres bugs, etc.). (#532)
    • Better handling of HTTP 403 error in trigger_offline_retrieval() (#491 @z4zz)
    • Downloading with download_all() can now be cleanly interrupted without the downloads remaining active in the background. (#481, #532 @valgur)

    Development Changes

    • All downloading-related functionality has been moved into a separate Downloader class to keep the code more organized. The existing API has been kept as-is, however. (#532)
    Source code(tar.gz)
    Source code(zip)
  • v1.0.1(May 25, 2021)

    • Fixed broken triggering of offline LTA products - use GET instead of HEAD since HEAD does not appear to be triggering retrieval correctly. (#486, related to #386)
    Source code(tar.gz)
    Source code(zip)
  • v1.0.0(May 19, 2021)

    Dropped support for Python 2.7. Now setuptools requires Python >= 3.6.

    CLI changes

    • --start and --end CLI arguments no longer use the default values of NOW-1DAY and NOW. (#459 @valgur)
    • --footprints now expects a path for the output file to be specified instead of using the previous default <--path>/search_footprints.geojson. (#462 @valgur, #407 @IpsumCapra)
    • --uuid, --name and --query must now be repeated instead of passing a single comma-separated string. Repeated keywords get treated as an "or" expression. (#463 @valgur)
    • Display DHuS server version with CLI flag --info (#367 @thomasyoung-audet)
    • Added searching by placenames with the CLI flag --location (#372 @thomasyoung-audet)
    • Added CLI support for --geometry input as a WKT or GeoJSON string (#381 @thomasyoung-audet)
    • Download quicklooks directly with the CLI flag --quicklook (#361 @mackland)
    • Got rid of the special handling of --uuid and --name CLI arguments. The product IDs are now simply passed to api.query() as a set. As a result they no longer ignore the date range arguments (fixes #387). (#390 @valgur)
    • Added --timeout option with a default value of 60 seconds to avoid waiting indefinitely for a response. (#475 @valgur)
    • New --gnss CLI flag to use the GNSS end-point for orbit products query and download (#441 @avalentino).

    Added

    • Added setinelsat/__main__.py (#412 @avalentino)
    • Added get_stream() (#430 @fwfichtner)
    • New sentinelsat/products.py module providing a "product nodes" API that allows to filter and download only selected files of the requested products (#414 @avalentino)
    • Added trigger_offline_retrieval(). (#476 @valgur)
    • Added download_quicklooks() and download_all_quicklooks() (#361 @mackland)

    Changed

    • Replaced SentinelAPIError exceptions with more specific types. The new exceptions are still subclasses of SentinelAPIError for backwards compatibility. (#285 @valgur, @dwlsalmeida)
      • SentinelAPIError – the parent, catch-all exception. Only used when no other more specific exception can be applied.
      • ServerError – raised when the server responded in an unexpected manner, typically due to undergoing maintenance.
      • UnauthorizedError – raised when attempting to retrieve a product with incorrect credentials.
      • QuerySyntaxError – raised when the query string could not be parsed on the server side.
      • QueryLengthError – raised when the query string length was excessively long.
      • InvalidKeyError – raised when product with given key was not found on the server.
      • InvalidChecksumError – MD5 checksum of a local file does not match the one from the server.
      • LTAError – raised when triggering a retrieval from the Long Term Archive failed.
      • LTATriggered – raised in some cases when the product is offline and retrieval was triggered successfully.
    • Tidied up the (internal) download code logic (#378 @valgur)
    • Added an "exception" field to the failed_products dict returned by in .download_all() for easier debugging (#378 @valgur)
    • Fixed the server-side space handling change issue reported in #383 by quoting instead of backslash-escaping the strings. (#390 @valgur)
    • Queries now use (key:value OR key:value) format instead of the previous key:(value OR value) format, which for some reason took tens of seconds per query. (#390 @valgur)
    • Empty queries raise a ValueError immediately on the client side instead of letting the server generate it. (#390 @valgur)
    • Added stricter checks for empty keyword values in queries, which would cause server-side errors. (#390 @valgur)
    • Gracefully handle cancelled futures. (#448 and #479 @avalentino)
    • Use the HTTP status instead of OData metadata to determine the online status of a product when downloading. This is a workaround for the rare server-side bug of the OData info for the online status being incorrect (#467). (#469 @valgur)
    • download() now raises LTATriggered or LTAError if the requested product is offline. (#476 @valgur) This is a workaround for the rare server-side bug of the OData info for the online status being incorrect (#467). (#469 @valgur)
    • Set the default query timeout to 60 seconds to avoid waiting indefinitely for a response. (#475 @valgur)
    • download_all now returns a named tuple for clarity. (#477 @valgur)
    • Search queries now use GET instead of POST requests because the Sentinel-5P Pre-Operations Data Hub does not support POST (#380). As a consequence, the search query contents are now limited to latin1 encoding instead of UTF-8. (#473 @valgur)
    • Use tqdm.auto for nicer progress reporting in notebooks. (#480 @valgur)

    Deprecated

    • Removed query_raw() that was deprecated in v0.12.

    Fixed

    • Fix location information for Nominatim bounding box queries (#384)
    • Get file name extension more reliably from either the HTTP header or an OData attribute. (#378, #472 @valgur)
    • Updated the API Hub URL to https://apihub.copernicus.eu/apihub/.
    • Server-side error info has become much more detailed and the client code has been updated to correctly handle that.
    • check_existing() now determines the filename correctly for Sentinel-5 products. (@valgur #452)
    • Fix accidental downloading of the whole product in memory when the product is actually available despite being marked as offline in its metadata. (#386, #421, #454 @lucadelu)
    • Fixed timeout not being used in some queries. (#454 @valgur)

    Development Changes

    • Replaced Travis CI with Github Actions. Added testing on MacOS and Windows. (#438 @avalentino)
    • Made tests more robust by not relying on specific products being returned where possible.
    Source code(tar.gz)
    Source code(zip)
  • v0.14(Jun 12, 2020)

    Added

    • trigger retrieval of offline products from LTA, while downloading online products (#297 @gbaier)
    • allow input of multiple values per query parameter as logical OR (#321 @OlgaCh)
    • document CODA password limitations (#315 @nishadhka)

    Changed

    • warn users about complex queries (#290)

    Deprecated

    • discontinued support for Python <= 3.4

    Fixed

    • Missing Online field in OData response defaults to Online: True instead of raising a KeyError (#281 @viktorbahr)
    • Missing ContentGeometry field in OData response defaults to footprint: None instead of raising a TypeError (#286 #325 @lukasbindreiter)

    Development Changes

    • code formatting with black checked by Travis-CI (#352)
    • reorganize unit tests into small groups with their own files (#287)
    • reduced code duplication in unit tests by making greater use of pytest fixtures. (#287)
    • force unit tests to include one of the markers 'fast', 'scihub' or 'mock_api' (#287)
    • automatic return code checking of CLI tests (#287)
    • Replaced direct vcrpy usage in unit tests with pytest-vcr. The pytest command line options changed from --vcr disable to --disable-vcr and --vcr [use|record_new|reset] to --vcr-record [once|record_new|all. See vcrpy docs <https://vcrpy.readthedocs.io/en/latest/usage.html#record-modes>_ for details. (#283)
    Source code(tar.gz)
    Source code(zip)
    sentinelsat-0.14-py2.py3-none-any.whl(35.73 KB)
    sentinelsat-0.14.tar.gz(1.08 MB)
  • v0.13(Apr 5, 2019)

    Added

    • Query keywords with interval ranges now also support single-sided ranges by using None or '*' to denote no bound, for example query(date=(None, 'NOW-1YEAR')). If both bounds are set to unlimited, the keyword will be removed from the query. (#210)
    • Raise an exception in case of duplicate keywords present in a query. Case is ignored to match the server-side behavior. (#210)
    • Support for Python 3.7
    • Support for GeoJSON files with a single Feature without a FeatureCollection. (#224 @scottstanie)
    • Added support for Unicode symbols in search queries. (#230)
    • Raise ValueError exception if longitude is outside [-180, 180] or latitude is outside [-90, 90] (#236, #218 @Andrey-Raspopov)
    • optional timeout attribute to avoid indefinite wait on response from the server (#256, @viktorbahr)
    • Parsing the Online, CreationDate and IngestionDate fields of an OData response
    • Trying to download an offline product from the Copernicus Open Access Hub triggers its retrieval from the long term archive. Downloading of the product is not scheduled.
    • Added support for downloading Sentinel 5P data in the CLI via the '--sentinel 5' flag

    Changed

    • Add support in the CLI for reading credentials from ~/.netrc and document existing functionality in the API (#90)

    Fixed

    • Spaces in query parameter values are now handled correctly be escaping them with a backslash, where appropriate. (#169, #211)
    • Fixed some CLI errors not returning a non-zero exit code. (#209)
    • Fixed typo for area_relation query parameter documentation from 'Intersection' to 'Intersects'. (#225 @scottstanie)
    • Updated check_query_length() logic to match the changed server-side behavior. (#230)
    • Clarify usage of GeoJSON files with CLI in docs (#229 @psal93)
    • to_geopandas() now returns an empty GeoDataFrame for an empty product list input.

    Development Changes

    • Replaced [test] and [docs] with a single [dev] installation extras target. (#208)
    • Adapted .travis.yml to build fiona and pyproj from source for Python 3.7.
    • Minimum pytest version pytest >= 3.6.3 required by pytest-socket.
    • The existing practice of not accessing the network from unit tests, unless running with --vcr record_new or --vcr reset, is now enforced by throwing a SocketBlockedError in such cases. (#207)
    Source code(tar.gz)
    Source code(zip)
    sentinelsat-0.13-py2.py3-none-any.whl(33.75 KB)
    sentinelsat-0.13.tar.gz(993.40 KB)
  • v0.12.2(Jun 20, 2018)

    Added

    • made exceptions more verbose regarding optional dependencies (#176)
    • CLI username, password and DHuS URL can be set with environment variables DHUS_USER, DHUS_PASSWORD and DHUS_URL (#184, @temal-)
    • added information about known errors and DHuS issues to docs (#186, @martinber)

    Changed

    • remove hard coded product type list from cli (#190, @lenniezelk)
    • Made the function signature of count() fully compatible with query(). Irrelevant parameters are simply ignored.

    Deprecated

    • environment variables SENTINEL_USER and SENTINEL_PASSWORD are superceded by DHUS_USER and DHUS_PASSWORD

    Fixed

    • Updated handling of invalid queries. An exception is raised in such cases. #168
    • Fixed order_by parameter being ignored in queries that require multiple subqueries (that is, queries that return more than 100 products) (#200)
    • Special handling of quote symbols in query strings due to a server-side error is no longer necessary and has been removed. #168
    • Updated effective query length calculation in check_query_length() to reflect server-side changes.
    • skip failing tests on optional dependency Pandas for Python 3.3 and 3.4
    • Unit tests work irrespective of the directory they are run from.
    Source code(tar.gz)
    Source code(zip)
    sentinelsat-0.12.2-py2.py3-none-any.whl(23.67 KB)
    sentinelsat-0.12.2.tar.gz(889.53 KB)
  • v0.12.1(Oct 24, 2017)

  • v0.12(Aug 10, 2017)

    Added

    • CLI option to query by UUID (--uuid) or filename (--name).
    • Added order_by option to query() which controls the fields by which the products are sorted on the server side before being returned. -o/--order-by on the CLI.
    • Added the option to limit the number of products returned by query() and to set the number of products to skip via offset. -l/--limit on the CLI.
    • Option to change the type of spatial relation for the AOI in query(). The choices are 'Interesects', 'Contains' and 'IsWithin'.
    • Added raw parameter to query() to append any additional raw query string to the query.
    • Query parameters that take intervals as values can now be passed a tuple of the interval range values.
    • Date validation and parsing has been extended to all date-type parameters in queries, such as 'ingestiondate'.
    • Added count() which quickly returns the number of products matching a query on the server without retrieving the full response.
    • Method check_query_length to check if a query will fail because of being excessively long.
    • Option to adjust the number of decimal figures in the coordinates of the WKT string returned by geojson_to_wkt().
    • A more informative error message is shown if a too long query string was likely the cause of the query failing on the server side. This can be useful if the WKT string length would cause the query to fail otherwise.
    • Progressbars can be disabled by setting show_progressbars to False. Progressbars may be customized by overriding the _tqdm() method.
    • Contribution guidelines.
    • Tests for validity of documentation and RST files.

    Changed

    • Merged CLI subcommands sentinel search and sentinel download into sentinelsat.
    • CLI uses keywords instead of positional arguments, i.e. --user <username>.
    • initial_date and end_date parameters in query() have been replaced with a single date parameter that takes a tuple of start and end dates as input.
    • Files being downloaded now include an '.incomplete' suffix in their name until the download is finished.
    • Removed check_existing option from download() and download_all(). Similar functionality has been provided in the new check_files() function.
    • format_query_date has been changed into a public function.
    • Added a progressbar to long-running queries.
    • Tests can now be run from any directory rather than the repository root.
    • Made the query string slightly more compact by getting rid of unnecessary 'AND' operators, spaces and parentheses.
    • Reduced the size of the VCR.py cassettes used in unit tests.
    • changed license from AGPLv3 to GPLv3+

    Deprecated

    • query_raw() has been merged with query() and is deprecated. Used query(raw=...) instead.

    Fixed

    • Show the correct progress value in the download progressbar when continuing from an incomplete file. (Thanks @gbaier!)
    • Added a workaround for a server-side bug when plus symbols are used in a query.
    Source code(tar.gz)
    Source code(zip)
    sentinelsat-0.12-py2.py3-none-any.whl(23.32 KB)
    sentinelsat-0.12.tar.gz(2.10 MB)
  • v0.11(Jun 1, 2017)

  • v0.10(May 30, 2017)

    Added

    • GeoJSON footprints are allowed to contain just a single geometry instead of a feature collection. Any geometry type that has a WKT equivalent is supported (rather than only Polygons).
    • get_product_odata() can be used to get the full metadata information available for a product if full-True is set.
    • Added query_raw() that takes full text search string as input and returns a parsed dictionary just like the updated query() method.
    • CLI: --sentinel-<int> option to select satellite (constellation)

    Changed

    • SentinelAPI, etc. can be directly imported from sentinelsat rather than sentinelsat.sentinel.
    • query() changes:
      • The area argument expects a WKT string as input instead of a coordinate string. (Issue #101)
      • Date arguments can be disabled by setting them to None and their values are validated on the client side. (Issue #101)
      • The return value has been changed to a dict of dicts of parsed metadata values. One entry per product with the product ID as the key.
    • download_all() expects a list of product IDs as input. This is compatible with the output of query().
    • get_coordinates() has been replaced with functions read_geojson() and geojson_to_wkt(). (Issue #101)
    • Use more compact and descriptive error messages from the response headers, if available.

    Deprecated

    • CLI: --sentinel1 and --sentinel2 will be removed with the next major release

    Removed

    • to_dict() has been removed since it is no longer required.
    • load_query() has been made private (renamed to _load_query()).

    Fixed

    • Fixed invalid GeoJSON output in both the CLI and API. (Issue #104)
    • Fixed broken reporting of failed downloads in the CLI. (Issue #88)
    • Attempting to download a product with an invalid ID no longer creates an infinite loop and a more informative error message is displayed in the CLI.
    Source code(tar.gz)
    Source code(zip)
    sentinelsat-0.10-py2.py3-none-any.whl(18.96 KB)
    sentinelsat-0.10.tar.gz(281.72 KB)
A Django application that provides country choices for use with forms, flag icons static files, and a country field for models.

Django Countries A Django application that provides country choices for use with forms, flag icons static files, and a country field for models. Insta

Chris Beaven 1.2k Jan 03, 2023
A GUI widget for Linux to show current time in different timezones.

A GUI widget to show current time in different timezones (under development). To use this widget: Run scripts/startup.py Select a country. A list of t

B.Jothin kumar 11 Nov 10, 2022
Manipulation and analysis of geometric objects

Shapely Manipulation and analysis of geometric objects in the Cartesian plane. Shapely is a BSD-licensed Python package for manipulation and analysis

3.1k Jan 03, 2023
PySAL: Python Spatial Analysis Library Meta-Package

Python Spatial Analysis Library PySAL, the Python spatial analysis library, is an open source cross-platform library for geospatial data science with

Python Spatial Analysis Library 1.1k Dec 18, 2022
EOReader is a multi-satellite reader allowing you to open optical and SAR data.

Remote-sensing opensource python library reading optical and SAR sensors, loading and stacking bands, clouds, DEM and index.

ICube-SERTIT 152 Dec 30, 2022
Software for Advanced Spatial Econometrics

GeoDaSpace Software for Advanced Spatial Econometrics GeoDaSpace current version 1.0 (32-bit) Development environment: Mac OSX 10.5.x (32-bit) wxPytho

GeoDa Center 38 Jan 03, 2023
Interactive Maps with Geopandas

Create Interactive maps 🗺️ with your geodataframe Geopatra extends geopandas for interactive mapping and attempts to wrap the goodness of amazing map

sangarshanan 46 Aug 16, 2022
A multi-page streamlit app for the geospatial community.

A multi-page streamlit app for the geospatial community.

Qiusheng Wu 522 Dec 30, 2022
Get Landsat surface reflectance time-series from google earth engine

geextract Google Earth Engine data extraction tool. Quickly obtain Landsat multispectral time-series for exploratory analysis and algorithm testing On

Loïc Dutrieux 50 Dec 15, 2022
This program analizes films database with adresses, and creates a folium map with closest films to the coordinates

Films-map-project UCU CS lab 1.2, 1st year This program analizes films database with adresses, and creates a folium map with closest films to the coor

Artem Moskovets 1 Feb 09, 2022
Python interface to PROJ (cartographic projections and coordinate transformations library)

pyproj Python interface to PROJ (cartographic projections and coordinate transformations library). Documentation Stable: http://pyproj4.github.io/pypr

832 Dec 31, 2022
A set of utility functions for working with GeoJSON annotations in Kaibu

kaibu-utils A set of utility functions for working with Kaibu. Create a new repository Create a new repository and select imjoy-team/imjoy-python-temp

ImJoy Team 0 Dec 12, 2021
Calculate & view the trajectory and live position of any earth-orbiting satellite

satellite-visualization A cross-platform application to calculate & view the trajectory and live position of any earth-orbiting satellite in 3D. This

Space Technology and Astronomy Cell - Open Source Society 3 Jan 08, 2022
Geocode rows in a SQLite database table

Geocode rows in a SQLite database table

Chris Amico 225 Dec 08, 2022
peartree: A library for converting transit data into a directed graph for sketch network analysis.

peartree 🍐 🌳 peartree is a library for converting GTFS feed schedules into a representative directed network graph. The tool uses Partridge to conve

Kuan Butts 183 Dec 29, 2022
Django model field that can hold a geoposition, and corresponding widget

django-geoposition A model field that can hold a geoposition (latitude/longitude), and corresponding admin/form widget. Prerequisites Starting with ve

Philipp Bosch 324 Oct 17, 2022
This is a simple python code to get IP address and its location using python

IP address & Location finder @DEV/ED : Pavan Ananth Sharma Dependencies: ip2geotools Note: use pip install ip2geotools to install this in your termin

Pavan Ananth Sharma 2 Jul 05, 2022
Minimum Bounding Box of Geospatial data

BBOX Problem definition: The spatial data users often are required to obtain the coordinates of the minimum bounding box of vector and raster data in

Ali Khosravi Kazazi 1 Sep 08, 2022
Implemented a Google Maps prototype that provides the shortest route in terms of distance

Implemented a Google Maps prototype that provides the shortest route in terms of distance, the fastest route, the route with the fewest turns, and a scenic route that avoids roads when provided a sou

1 Dec 26, 2021
Calculate the area inside of any GeoJSON geometry. This is a port of Mapbox's geojson-area for Python

geojson-area Calculate the area inside of any GeoJSON geometry. This is a port of Mapbox's geojson-area for Python. Installation $ pip install area U

Alireza 87 Dec 14, 2022