sentinelhub 3.11.2__py3-none-any.whl → 3.11.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sentinelhub/__init__.py +0 -2
- sentinelhub/_version.py +1 -1
- sentinelhub/api/__init__.py +0 -1
- sentinelhub/api/batch/process.py +1 -1
- sentinelhub/api/ogc.py +2 -45
- sentinelhub/constants.py +0 -1
- {sentinelhub-3.11.2.dist-info → sentinelhub-3.11.4.dist-info}/METADATA +1 -1
- {sentinelhub-3.11.2.dist-info → sentinelhub-3.11.4.dist-info}/RECORD +11 -12
- {sentinelhub-3.11.2.dist-info → sentinelhub-3.11.4.dist-info}/WHEEL +1 -1
- sentinelhub/api/fis.py +0 -143
- {sentinelhub-3.11.2.dist-info → sentinelhub-3.11.4.dist-info}/entry_points.txt +0 -0
- {sentinelhub-3.11.2.dist-info → sentinelhub-3.11.4.dist-info}/licenses/LICENSE.md +0 -0
sentinelhub/__init__.py
CHANGED
|
@@ -14,7 +14,6 @@ from .api import (
|
|
|
14
14
|
ByocCollectionAdditionalData,
|
|
15
15
|
ByocCollectionBand,
|
|
16
16
|
ByocTile,
|
|
17
|
-
FisRequest,
|
|
18
17
|
SentinelHubBatchStatistical,
|
|
19
18
|
SentinelHubBYOC,
|
|
20
19
|
SentinelHubCatalog,
|
|
@@ -30,7 +29,6 @@ from .api import (
|
|
|
30
29
|
monitor_batch_statistical_job,
|
|
31
30
|
opensearch,
|
|
32
31
|
)
|
|
33
|
-
from .api.fis import HistogramType
|
|
34
32
|
from .api.ogc import CustomUrlParam
|
|
35
33
|
from .api.opensearch import get_area_dates, get_area_info, get_tile_info, get_tile_info_id
|
|
36
34
|
from .areas import (
|
sentinelhub/_version.py
CHANGED
sentinelhub/api/__init__.py
CHANGED
|
@@ -16,7 +16,6 @@ from .batch import (
|
|
|
16
16
|
)
|
|
17
17
|
from .byoc import ByocCollection, ByocCollectionAdditionalData, ByocCollectionBand, ByocTile, SentinelHubBYOC
|
|
18
18
|
from .catalog import SentinelHubCatalog
|
|
19
|
-
from .fis import FisRequest
|
|
20
19
|
from .ogc import WcsRequest, WmsRequest
|
|
21
20
|
from .process import AsyncProcessRequest, SentinelHubRequest, get_async_running_status
|
|
22
21
|
from .statistical import SentinelHubStatistical
|
sentinelhub/api/batch/process.py
CHANGED
sentinelhub/api/ogc.py
CHANGED
|
@@ -19,7 +19,7 @@ from ..data_collections import DataCollection
|
|
|
19
19
|
from ..download import DownloadRequest, SentinelHubDownloadClient
|
|
20
20
|
from ..geo_utils import get_image_dimension
|
|
21
21
|
from ..geometry import BBox, Geometry
|
|
22
|
-
from ..time_utils import RawTimeIntervalType, RawTimeType, filter_times,
|
|
22
|
+
from ..time_utils import RawTimeIntervalType, RawTimeType, filter_times, serialize_time
|
|
23
23
|
from .wfs import WebFeatureService
|
|
24
24
|
|
|
25
25
|
LOGGER = logging.getLogger(__name__)
|
|
@@ -147,9 +147,6 @@ class OgcRequest(DataRequest):
|
|
|
147
147
|
if param not in CustomUrlParam:
|
|
148
148
|
raise ValueError(f"Parameter {param} is not a valid custom url parameter. Please check and fix.")
|
|
149
149
|
|
|
150
|
-
if self.service_type is ServiceType.FIS and CustomUrlParam.GEOMETRY in self.custom_url_params:
|
|
151
|
-
raise ValueError(f"{CustomUrlParam.GEOMETRY} should not be a custom url parameter of a FIS request")
|
|
152
|
-
|
|
153
150
|
def create_request(self, reset_wfs_iterator: bool = False) -> None:
|
|
154
151
|
"""Set download requests
|
|
155
152
|
|
|
@@ -346,7 +343,6 @@ class OgcImageService:
|
|
|
346
343
|
date: datetime.datetime | None = None,
|
|
347
344
|
size_x: None | str | int = None,
|
|
348
345
|
size_y: None | str | int = None,
|
|
349
|
-
geometry: None | BBox | Geometry = None,
|
|
350
346
|
) -> str:
|
|
351
347
|
"""Returns url to Sentinel Hub's OGC service for the product specified by the OgcRequest and date.
|
|
352
348
|
|
|
@@ -366,8 +362,6 @@ class OgcImageService:
|
|
|
366
362
|
params = {**params, **self._get_wms_url_parameters(request, size_x, size_y)} # type: ignore[arg-type]
|
|
367
363
|
elif request.service_type is ServiceType.WCS:
|
|
368
364
|
params = {**params, **self._get_wcs_url_parameters(request, size_x, size_y)} # type: ignore[arg-type]
|
|
369
|
-
elif request.service_type is ServiceType.FIS:
|
|
370
|
-
params = {**params, **self._get_fis_parameters(request, geometry)} # type: ignore[arg-type]
|
|
371
365
|
|
|
372
366
|
return f"{url}/{authority}?{urlencode(params)}"
|
|
373
367
|
|
|
@@ -386,7 +380,7 @@ class OgcImageService:
|
|
|
386
380
|
|
|
387
381
|
@staticmethod
|
|
388
382
|
def _get_common_url_parameters(request: OgcRequest) -> dict[str, Any]:
|
|
389
|
-
"""Returns parameters common dictionary for WMS,
|
|
383
|
+
"""Returns parameters common dictionary for WMS, and WCS request.
|
|
390
384
|
|
|
391
385
|
:param request: OGC-type request with specified bounding box, cloud coverage for specific product.
|
|
392
386
|
:return: dictionary with parameters
|
|
@@ -477,43 +471,6 @@ class OgcImageService:
|
|
|
477
471
|
"""
|
|
478
472
|
return {"RESX": size_x, "RESY": size_y, "COVERAGE": request.layer, "REQUEST": "GetCoverage", "VERSION": "1.1.2"}
|
|
479
473
|
|
|
480
|
-
@staticmethod
|
|
481
|
-
def _get_fis_parameters(request: OgcRequest, geometry: BBox | Geometry) -> dict[str, Any]:
|
|
482
|
-
"""Returns parameters dictionary for FIS request.
|
|
483
|
-
|
|
484
|
-
:param request: OGC-type request with specified bounding box, cloud coverage for specific product.
|
|
485
|
-
:param geometry: list of bounding boxes or geometries
|
|
486
|
-
:return: dictionary with parameters
|
|
487
|
-
"""
|
|
488
|
-
start_time, end_time = serialize_time(parse_time_interval(request.time), use_tz=True)
|
|
489
|
-
|
|
490
|
-
params = {
|
|
491
|
-
"CRS": CRS.ogc_string(geometry.crs),
|
|
492
|
-
"LAYER": request.layer,
|
|
493
|
-
"RESOLUTION": request.resolution, # type: ignore[attr-defined]
|
|
494
|
-
"TIME": f"{start_time}/{end_time}",
|
|
495
|
-
}
|
|
496
|
-
|
|
497
|
-
if not isinstance(geometry, (BBox, Geometry)):
|
|
498
|
-
raise ValueError(
|
|
499
|
-
f"Each geometry must be an instance of sentinelhub.{BBox.__name__} or "
|
|
500
|
-
f"sentinelhub.{Geometry.__name__} but {geometry} found"
|
|
501
|
-
)
|
|
502
|
-
if geometry.crs is CRS.WGS84:
|
|
503
|
-
geometry = geometry.reverse()
|
|
504
|
-
if isinstance(geometry, Geometry):
|
|
505
|
-
params["GEOMETRY"] = geometry.wkt
|
|
506
|
-
else:
|
|
507
|
-
params["BBOX"] = str(geometry)
|
|
508
|
-
|
|
509
|
-
if request.bins: # type: ignore[attr-defined]
|
|
510
|
-
params["BINS"] = request.bins # type: ignore[attr-defined]
|
|
511
|
-
|
|
512
|
-
if request.histogram_type: # type: ignore[attr-defined]
|
|
513
|
-
params["TYPE"] = request.histogram_type.value # type: ignore[attr-defined]
|
|
514
|
-
|
|
515
|
-
return params
|
|
516
|
-
|
|
517
474
|
def get_dates(self, request: OgcRequest) -> list[datetime.datetime | None]:
|
|
518
475
|
"""Get available Sentinel-2 acquisitions at least time_difference apart
|
|
519
476
|
|
sentinelhub/constants.py
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
sentinelhub/.utmzones.geojson,sha256=2kBUChuQK-ffIAc-5c8zluUa1JGgkop1HTShmhwp80s,768447
|
|
2
|
-
sentinelhub/__init__.py,sha256
|
|
3
|
-
sentinelhub/_version.py,sha256
|
|
2
|
+
sentinelhub/__init__.py,sha256=afTJRwmGy248Aw_7G8mRKAIGGFJxZ6bSwsupes1QaK4,2098
|
|
3
|
+
sentinelhub/_version.py,sha256=-5zAvyYWhKGpNnXX1dmgow5dBufUiN7Ql2khj9vnBMA,66
|
|
4
4
|
sentinelhub/areas.py,sha256=rdR-KW9tHCMm69ernIpBnCDK6TRT-7GXOx22l3fz6QY,28601
|
|
5
5
|
sentinelhub/base.py,sha256=g3E2Nh6I0c3GrkTmJ2rVK_disN2spQUn-yCWc_4NqMk,12857
|
|
6
6
|
sentinelhub/commands.py,sha256=KHDT0uJATP9vWxjNLpUpaboPfHoXC3nIlmFGqS8DL0E,3306
|
|
7
7
|
sentinelhub/config.py,sha256=d-BLW4o9AvkA6Ff87b3sO5yNjAA6QJgrjZWKjtfEX78,10396
|
|
8
|
-
sentinelhub/constants.py,sha256=
|
|
8
|
+
sentinelhub/constants.py,sha256=OQ1_wvqRsLvzIWH3PvJlZerwTXtKvu89UXKZf7BuKC4,13457
|
|
9
9
|
sentinelhub/data_collections.py,sha256=MxlNztn487sb-yBwbi1-uiLGis__-lCDvPSew8td6js,24305
|
|
10
10
|
sentinelhub/data_collections_bands.py,sha256=H-oQUyHjcROHfe063Rt0C9I-2csmPlAlmNmVyJfZ9iE,11308
|
|
11
11
|
sentinelhub/data_utils.py,sha256=8RPF1mg79ZgavtrPVPbvBBCaIphqEWYezTezyRJZcEY,7572
|
|
@@ -19,13 +19,12 @@ sentinelhub/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
19
19
|
sentinelhub/testing_utils.py,sha256=e6ZeYvHF6rHaMrXOXuwVY30_QDFWd2YqWG3PD1RWscc,2346
|
|
20
20
|
sentinelhub/time_utils.py,sha256=AcI8iRWMe6Qn073H8sKQnxSeGqZjuZ7dlZvuFwM7AtU,8029
|
|
21
21
|
sentinelhub/types.py,sha256=m5bZPsdXNf10uh43QBzE3ajcE6P26QfQcXCY11ky_uw,393
|
|
22
|
-
sentinelhub/api/__init__.py,sha256=
|
|
22
|
+
sentinelhub/api/__init__.py,sha256=JGUnIQTCofMH81KvLOdgMjXJvS4qfFQZIDnX82kXl-c,768
|
|
23
23
|
sentinelhub/api/base.py,sha256=EVgbL7trpTLj99Ei8nMSjmWq5MYJG1PPGyzQpK03JpY,4254
|
|
24
24
|
sentinelhub/api/base_request.py,sha256=jpczEjLbs4X__-5_-WFwFsgvlktdNDRlfmcCKJWJhhQ,9564
|
|
25
25
|
sentinelhub/api/byoc.py,sha256=CXB8jamhGfRiuhO0JyZDnKrqPetXa9LdHtLcXQ6Bqcs,12217
|
|
26
26
|
sentinelhub/api/catalog.py,sha256=WuInAWYf36wn9aHbV2OKuyOL07u75DA93MpWj7ugwnY,14040
|
|
27
|
-
sentinelhub/api/
|
|
28
|
-
sentinelhub/api/ogc.py,sha256=cYYBCQRkVh0IEsuzX5sIxzNZ09O86k8p5yxF4nTkC7U,30244
|
|
27
|
+
sentinelhub/api/ogc.py,sha256=zPy6x0c5BwobeTcYJWl-NqcC13ua9jLUOmcHRUziGlg,28272
|
|
29
28
|
sentinelhub/api/opensearch.py,sha256=nNaykGfpfX1OurS1gFj4NLxUzCwi-r6oPR0WOVNUOwg,7706
|
|
30
29
|
sentinelhub/api/process.py,sha256=wwd61zAdxI46jIQUcK1UW_PbKc6JwA_VWj-mwUWME7Q,13631
|
|
31
30
|
sentinelhub/api/statistical.py,sha256=E-PB85rw5rflCTQdkqDAWzpuJzGtJatwMbgZ3550VW8,5299
|
|
@@ -33,7 +32,7 @@ sentinelhub/api/utils.py,sha256=kjhHT_czAKFY14kPBxqkjUaJ9P-6RMKRceNC5_SrGm4,3730
|
|
|
33
32
|
sentinelhub/api/wfs.py,sha256=QFg1pTrTwYWhuAwvhFVAcjTTW5Kn_mEONpTBfL04asw,7604
|
|
34
33
|
sentinelhub/api/batch/__init__.py,sha256=DW5281vxem21YDxp-yEUrT3EuHrOsM5fodwDE1-uhlo,445
|
|
35
34
|
sentinelhub/api/batch/base.py,sha256=26b_RvNH_IMfufUabXzaqdSP242i3ta0wejr51cF8TY,4451
|
|
36
|
-
sentinelhub/api/batch/process.py,sha256=
|
|
35
|
+
sentinelhub/api/batch/process.py,sha256=M-ig0M7a5-yF0jGWa60pn7aPPbpMgdXAnX3X9gfjdes,14367
|
|
37
36
|
sentinelhub/api/batch/process_v2.py,sha256=ehDCJMIPDQo7y2Nk5Ww6yjrcl5xdT82RBq6hEP-Cvj4,491
|
|
38
37
|
sentinelhub/api/batch/statistical.py,sha256=5WKLX7yKce3xl_pvO-yu2V-bHG6Rt8IlcJpWMO8jhUk,8170
|
|
39
38
|
sentinelhub/api/batch/utils.py,sha256=W4kx3Q5GApvHXdzpC9I1fSKIUg3Afe6rE1xZK8l5Mfs,8576
|
|
@@ -56,8 +55,8 @@ sentinelhub/download/session.py,sha256=KMRUw6wVEb68g8FZknIMk3BkAQvmghiCpIQ1rhhIJ
|
|
|
56
55
|
sentinelhub/geopedia/__init__.py,sha256=R1wvAx_41U_KkDQif3Dubngyv2nR1zOIedxCdvhP3MM,263
|
|
57
56
|
sentinelhub/geopedia/core.py,sha256=gU7CWZe8q5ZlZX4j1Zub4kvg5Nd7YZvtLCHGcuQAkfY,16370
|
|
58
57
|
sentinelhub/geopedia/request.py,sha256=nmrEHJzqG13npSF8co23d8gZGXqxT5pyAu2geZ_fnmY,6618
|
|
59
|
-
sentinelhub-3.11.
|
|
60
|
-
sentinelhub-3.11.
|
|
61
|
-
sentinelhub-3.11.
|
|
62
|
-
sentinelhub-3.11.
|
|
63
|
-
sentinelhub-3.11.
|
|
58
|
+
sentinelhub-3.11.4.dist-info/METADATA,sha256=z0K3D5PnJ5MFS6WPjbrwIsDlFd6oYniGQfqcbtUsg_c,10063
|
|
59
|
+
sentinelhub-3.11.4.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
60
|
+
sentinelhub-3.11.4.dist-info/entry_points.txt,sha256=nQiaLJk-L-7XCwyDiMozwfnJ7WI2Rc9FqnJDBt6K51g,212
|
|
61
|
+
sentinelhub-3.11.4.dist-info/licenses/LICENSE.md,sha256=Gczr65g8pY0N0OO_5g-zI3RTidQTMBVlL0JxM7n8tGM,1071
|
|
62
|
+
sentinelhub-3.11.4.dist-info/RECORD,,
|
sentinelhub/api/fis.py
DELETED
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Module for working with Sentinel Hub FIS service
|
|
3
|
-
"""
|
|
4
|
-
|
|
5
|
-
from __future__ import annotations
|
|
6
|
-
|
|
7
|
-
import datetime
|
|
8
|
-
import warnings
|
|
9
|
-
from enum import Enum
|
|
10
|
-
from typing import Any
|
|
11
|
-
|
|
12
|
-
from ..constants import MimeType, RequestType, ServiceType
|
|
13
|
-
from ..download import DownloadRequest
|
|
14
|
-
from ..exceptions import SHDeprecationWarning
|
|
15
|
-
from ..geometry import BBox, Geometry
|
|
16
|
-
from ..time_utils import RawTimeIntervalType, RawTimeType
|
|
17
|
-
from .ogc import OgcImageService, OgcRequest
|
|
18
|
-
from .wfs import WebFeatureService
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
class HistogramType(Enum):
|
|
22
|
-
"""Enum class for types of histogram supported by Sentinel Hub FIS service
|
|
23
|
-
|
|
24
|
-
Supported histogram types are EQUALFREQUENCY, EQUIDISTANT and STREAMING
|
|
25
|
-
"""
|
|
26
|
-
|
|
27
|
-
EQUALFREQUENCY = "equalfrequency"
|
|
28
|
-
EQUIDISTANT = "equidistant"
|
|
29
|
-
STREAMING = "streaming"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
class FisRequest(OgcRequest):
|
|
33
|
-
"""``Deprecated - use Statistical API instead!``
|
|
34
|
-
|
|
35
|
-
The class for interacting with Feature Info Service.
|
|
36
|
-
|
|
37
|
-
For more info check `FIS documentation <https://www.sentinel-hub.com/develop/api/ogc/fis-request/>`__.
|
|
38
|
-
"""
|
|
39
|
-
|
|
40
|
-
DEPRECATION_MESSAGE = (
|
|
41
|
-
"Fis service is being deprecated in favour of SentinelHubStatistical. Although no immediate action is needed as"
|
|
42
|
-
" FIS is still supported, consider switching to Statistical API because it provides additional functionalities."
|
|
43
|
-
)
|
|
44
|
-
|
|
45
|
-
def __init__(
|
|
46
|
-
self,
|
|
47
|
-
layer: str,
|
|
48
|
-
time: RawTimeType | RawTimeIntervalType,
|
|
49
|
-
geometry_list: list[Geometry | BBox],
|
|
50
|
-
*,
|
|
51
|
-
resolution: str = "10m",
|
|
52
|
-
bins: str | None = None,
|
|
53
|
-
histogram_type: HistogramType | None = None,
|
|
54
|
-
**kwargs: Any,
|
|
55
|
-
):
|
|
56
|
-
"""
|
|
57
|
-
:param layer: An ID of a layer configured in Sentinel Hub Dashboard. It has to be configured for the same
|
|
58
|
-
instance ID which will be used for this request. The satellite collection of the layer in Dashboard
|
|
59
|
-
must also match the one given by `data_collection` parameter.
|
|
60
|
-
:param time: time or time range for which to return the results, in ISO8601 format
|
|
61
|
-
(year-month-date, for example: ``2016-01-01``, or year-month-dateThours:minutes:seconds format,
|
|
62
|
-
i.e. ``2016-01-01T16:31:21``). Examples: ``'2016-01-01'``, or ``('2016-01-01', ' 2016-01-31')``
|
|
63
|
-
(datetime.datetime, datetime.datetime)
|
|
64
|
-
:param geometry_list: A WKT representation of a geometry describing the region of interest.
|
|
65
|
-
Note that WCS 1.1.1 standard is used here, so for EPSG:4326 coordinates should be in latitude/longitude
|
|
66
|
-
order.
|
|
67
|
-
:param resolution: Specifies the spatial resolution, in meters per pixel, of the image from which the statistics
|
|
68
|
-
are to be estimated. When using CRS=EPSG:4326 one has to add the "m" suffix to
|
|
69
|
-
enforce resolution in meters per pixel (e.g. RESOLUTION=10m).
|
|
70
|
-
:param bins: The number of bins (a positive integer) in the histogram. If this parameter is absent no histogram
|
|
71
|
-
is computed.
|
|
72
|
-
:param histogram_type: type of histogram
|
|
73
|
-
:param data_collection: A collection of requested satellite data. It has to be the same as defined in Sentinel
|
|
74
|
-
Hub Dashboard for the given layer. Default is Sentinel-2 L1C.
|
|
75
|
-
:param maxcc: maximum accepted cloud coverage of an image. Float between 0.0 and 1.0. Default is ``1.0``.
|
|
76
|
-
:param custom_url_params: Dictionary of CustomUrlParameters and their values supported by Sentinel Hub's WMS
|
|
77
|
-
and WCS services. All available parameters are described in
|
|
78
|
-
`documentation <https://www.sentinel-hub.com/develop/api/ogc/custom-parameters/>`__. Note: in
|
|
79
|
-
case of constants.CustomUrlParam.EVALSCRIPT the dictionary value must be a string
|
|
80
|
-
of Javascript code that is not encoded into base64.
|
|
81
|
-
:param data_folder: location of the directory where the fetched data will be saved.
|
|
82
|
-
:param config: A custom instance of config class to override parameters from the saved configuration.
|
|
83
|
-
"""
|
|
84
|
-
self.geometry_list = geometry_list
|
|
85
|
-
self.resolution = resolution
|
|
86
|
-
self.bins = bins
|
|
87
|
-
self.histogram_type = HistogramType(histogram_type) if histogram_type else None
|
|
88
|
-
|
|
89
|
-
super().__init__(
|
|
90
|
-
bbox=None, layer=layer, time=time, service_type=ServiceType.FIS, **kwargs # type: ignore[arg-type]
|
|
91
|
-
)
|
|
92
|
-
|
|
93
|
-
def create_request(self) -> None: # type: ignore[override]
|
|
94
|
-
"""Set download requests
|
|
95
|
-
|
|
96
|
-
Create a list of DownloadRequests for all Sentinel-2 acquisitions within request's time interval and
|
|
97
|
-
acceptable cloud coverage.
|
|
98
|
-
"""
|
|
99
|
-
|
|
100
|
-
warnings.warn(self.DEPRECATION_MESSAGE, category=SHDeprecationWarning, stacklevel=2)
|
|
101
|
-
fis_service = _FisService(config=self.config)
|
|
102
|
-
self.download_list = fis_service.get_request(self)
|
|
103
|
-
|
|
104
|
-
def get_dates(self) -> list[datetime.datetime | None]:
|
|
105
|
-
"""This method is not supported for FIS request"""
|
|
106
|
-
raise NotImplementedError
|
|
107
|
-
|
|
108
|
-
def get_tiles(self) -> WebFeatureService | None:
|
|
109
|
-
"""This method is not supported for FIS request"""
|
|
110
|
-
raise NotImplementedError
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
class _FisService(OgcImageService):
|
|
114
|
-
"""Sentinel Hub OGC services class for providing FIS data
|
|
115
|
-
|
|
116
|
-
Intermediate layer between FIS requests and the Sentinel Hub FIS services.
|
|
117
|
-
"""
|
|
118
|
-
|
|
119
|
-
def get_request(self, request: FisRequest) -> list[DownloadRequest]: # type: ignore[override]
|
|
120
|
-
"""Get download requests
|
|
121
|
-
|
|
122
|
-
Create a list of DownloadRequests for all Sentinel-2 acquisitions within request's time interval and
|
|
123
|
-
acceptable cloud coverage.
|
|
124
|
-
|
|
125
|
-
:param request: OGC-type request with specified bounding box, time interval, and cloud coverage for specific
|
|
126
|
-
product.
|
|
127
|
-
"""
|
|
128
|
-
|
|
129
|
-
return [self._create_request(request=request, geometry=geometry) for geometry in request.geometry_list]
|
|
130
|
-
|
|
131
|
-
def _create_request(self, request: FisRequest, geometry: BBox | Geometry) -> DownloadRequest:
|
|
132
|
-
url = self.get_base_url(request)
|
|
133
|
-
|
|
134
|
-
post_data = {**self._get_common_url_parameters(request), **self._get_fis_parameters(request, geometry)}
|
|
135
|
-
post_data = {k.lower(): v for k, v in post_data.items()} # lowercase required on SH service
|
|
136
|
-
|
|
137
|
-
return DownloadRequest(
|
|
138
|
-
url=f"{url}/{self.config.instance_id}",
|
|
139
|
-
post_values=post_data,
|
|
140
|
-
data_type=MimeType.JSON,
|
|
141
|
-
headers={"Content-Type": MimeType.JSON.get_string()},
|
|
142
|
-
request_type=RequestType.POST,
|
|
143
|
-
)
|
|
File without changes
|
|
File without changes
|