-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* align Sentinel-1 & Sentinel-2 * small adapt Landast * housekeeping * not overwrite ENVs * more house-keeping * added LANDSAT_PROVIDER * removed projection & sar extension * change name of default * updated CHANGELOG
- Loading branch information
1 parent
88ffe16
commit 4e7af2d
Showing
10 changed files
with
83 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "1.3.4" | ||
__version__ = "1.4.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
from enum import Enum | ||
|
||
from pydantic import BaseModel | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import pystac | ||
from geojson import Feature | ||
from pystac import ProviderRole | ||
from pystac.extensions.sar import FrequencyBand, SarExtension, Polarization | ||
|
||
|
||
def fill_sar_ext(sar_ext: SarExtension, meta: Feature): | ||
# Fixed properties | ||
sar_ext.frequency_band = FrequencyBand("C") | ||
sar_ext.center_frequency = 5.405 | ||
# rest (like e.g. sar:pixel_spacing_range) cannot be known from API response AFAIK | ||
|
||
# Read properties | ||
sar_ext.instrument_mode = meta["properties"]["sensoroperationalmode"] | ||
sar_ext.product_type = meta["properties"]["producttype"] | ||
|
||
# TODO maybe this is not good, because we often only use one later on | ||
sar_ext.polarizations = [Polarization(p) for p in meta["properties"]["polarisationmode"].split(" ")] | ||
|
||
|
||
# constants | ||
SENTINEL_PROVIDER = pystac.Provider( | ||
name="ESA", | ||
roles=[ | ||
ProviderRole.PRODUCER, | ||
ProviderRole.PROCESSOR, | ||
ProviderRole.LICENSOR, | ||
], | ||
url="https://earth.esa.int/web/guest/home", | ||
) | ||
|
||
LANDSAT_PROVIDER = pystac.Provider( | ||
name="USGS", | ||
roles=[ | ||
ProviderRole.PRODUCER, | ||
ProviderRole.PROCESSOR, | ||
ProviderRole.LICENSOR, | ||
], | ||
url="https://earthexplorer.usgs.gov/", | ||
) |