Skip to content

Instantly share code, notes, and snippets.

@willrayeo
Last active December 14, 2023 17:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save willrayeo/a2dd0bcebe3fe7ac0a731e89d0666e52 to your computer and use it in GitHub Desktop.
Save willrayeo/a2dd0bcebe3fe7ac0a731e89d0666e52 to your computer and use it in GitHub Desktop.
evalscript_true_color = """
//VERSION=3
function setup() {
return {
input: [{
bands: ["B02", "B03", "B04"]
}],
output: {
bands: 3
}
};
}
function evaluatePixel(sample) {
return [sample.B04, sample.B03, sample.B02];
}
"""
request_true_color = SentinelHubRequest(
evalscript=evalscript_true_color,
input_data=[
SentinelHubRequest.input_data(
data_collection=DataCollection.SENTINEL2_L2A.define_from(
name="s2", service_url="https://sh.dataspace.copernicus.eu"
),
time_interval=('2022-06-01', '2022-06-30'),
other_args={"dataFilter": {"mosaickingOrder": "leastCC"}} )
],
responses=[SentinelHubRequest.output_response("default", MimeType.PNG)],
bbox=aoi_bbox,
size=aoi_size,
config=config,
)
@anikfal
Copy link

anikfal commented Nov 9, 2023

May I know why have you put snippets, instead of a complete download code?
Is there a complete code available somewhere?

@willrayeo
Copy link
Author

Hi, we created snippets to insert into articles. The full examples can be found in the Copernicus Data Space Ecosystem notebook samples repository

@Kamilacs
Copy link

verdade, apenas trechos de códigos...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment