All notable changes to sentinelsat
will be listed here.
- Missing
Online
field in OData response defaults toOnline: True
instead of raising aKeyError
(#281 @viktorbahr)
- Replaced direct
vcrpy
usage in unit tests withpytest-vcr
. Thepytest
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 for details. - Reduced code duplication in unit tests by making greater use of pytest fixtures.
- Query keywords with interval ranges now also support single-sided ranges by using
None
or'*'
to denote no bound, for examplequery(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 aFeatureCollection.
(#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
andIngestionDate
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
- Add support in the CLI for reading credentials from ~/.netrc and document existing functionality in the API (#90)
- 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.
- 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 bypytest-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 aSocketBlockedError
in such cases. (#207)
- made exceptions more verbose regarding optional dependencies (#176)
- CLI username, password and DHuS URL can be set with environment variables
DHUS_USER
,DHUS_PASSWORD
andDHUS_URL
(#184, @temal-) - added information about known errors and DHuS issues to docs (#186, @martinber)
- remove hard coded product type list from cli (#190, @lenniezelk)
- Made the function signature of
count()
fully compatible withquery()
. Irrelevant parameters are simply ignored.
- environment variables
SENTINEL_USER
andSENTINEL_PASSWORD
are superceded byDHUS_USER
andDHUS_PASSWORD
- 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.
- Made checksumming the default behavior, and removed its flag from the CLI. (@gbaier2)
- set
requests
encoding to UTF8 - fixed a backwards incompatible change in the
geojson
dependency - inconsistent documentation on the use of range parameters such as
date=
- Option to change the type of spatial relation for the AOI in
query()
. The choices are 'Interesects', 'Contains' and 'IsWithin'. order_by
option toquery()
which controls the fields by which the products are sorted on the server side before being returned.-o/--order-by
on the CLI.limit
the number of products returned byquery()
and to set the number of products to skip viaoffset
.-l/--limit
on the CLI.- Added
raw
parameter toquery()
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()
. - CLI option to query by UUID (
--uuid
) or filename (--name
). - 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
toFalse
. Progressbars may be customized by overriding the_tqdm()
method. - Contribution guidelines.
- Tests for validity of documentation and RST files.
- Merged CLI subcommands
sentinel search
andsentinel download
intosentinelsat
. - CLI uses keywords instead of positional arguments, i.e.
--user <username>
. initial_date
andend_date
parameters inquery()
have been replaced with a singledate
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 fromdownload()
anddownload_all()
. Similar functionality has been provided in the newcheck_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+
query_raw()
has been merged withquery()
and is deprecated. Usequery(raw=...)
instead.
- 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.
- Replace
pycurl
dependency withrequests
. This makes installation significantly easier. (#117) - An exception is raised in
download_all()
if all downloads failed. - Change 'Sentinels Scientific Datahub' to 'Copernicus Open Access Hub' (#100)
- Renamed
py.test
option--vcr reset_all
to--vcr reset
to better reflect its true behavior.
- 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 iffull=True
is set.- Added
query_raw()
that takes full text search string as input and returns a parsed dictionary just like the updatedquery()
method. - CLI:
--sentinel=<int>
option to select satellite (constellation)
SentinelAPI
, etc. can be directly imported fromsentinelsat
rather thansentinelsat.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.
- The
download_all()
expects a list of product IDs as input. This is compatible with the output ofquery()
.get_coordinates()
has been replaced with functionsread_geojson()
andgeojson_to_wkt()
. (Issue #101)- Use more compact and descriptive error messages from the response headers, if available.
- CLI:
--sentinel1
and--sentinel2
will be removed with the next major release
to_dict()
has been removed since it is no longer required.load_query()
has been made private (renamed to_load_query()
).
- 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.
--version
option to command line utilities- install requirements for building the documentation
- documentation of sorting with
to_*
convenience functions
- Added
to_dict
,to_dataframe
andto_geodataframe
which convert the response content to respective types. The pandas, geopandas and shapely dependencies are not installed by default.
--footprints
now includes all returned product properties in the output.KeyError('No results returned.')
is no longer returned for zero returned products in a response.- Renamed
get_footprint
toto_geojson
andget_product_info
toget_product_odata
. - Added underscore to methods and functions that are not expected to be used outside the package.
- Instance variables
url
andcontent
have been removed,last_query
andlast_status_code
have been made private.
- added a changelog
- use logging instead of print
- docs represent new
query
anddownload_all
behaviour
- options to create new, reset or ignore vcr cassettes for testing
query
now returns a list of search resultsdownload_all
requires the list of search results as an argument
SentinelAPI
does not save query results as class attributes
- Travis tests for Python 3.6
- changed
SentinelAPI
max_rows
attribute topage_size
to better reflect pagination - tests use
vcrpy
cassettes
- support GeoJSON polygons with optional (third) z-coordinate
- pagination support for query results
- number of query results per page set to 100
- support for large queries
- Removed redundant information from Readme that is also present on Readthedocs
initial_date
/--start
changed from ingestion to acquisition date
- Sphinx documentation setup with autodoc and numpydoc
- Redthedocs.org integration
- Sentinel-2 support
- Travis added as continuous integration service for automated testing
- validate downloaded products with their MD5 checksums
- option to select a different dhus api
--url
https://scihub.esa.int/apihub/
as standard url
- method to manually select the CA certificate bundle
- function to return footprints of the queried Sentinel scenes
- CA-certificate SSL errors
--query
parameter to use extra search keywords in the cli
- first release