Skip to content

Commit

Permalink
Auto-merge publish to staging
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Sep 12, 2024
2 parents bcf8032 + c335239 commit b58fdb6
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 19 deletions.
67 changes: 48 additions & 19 deletions FAQ.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -692,13 +692,13 @@ function evaluatePixel(sample) {
<p>In case you would like to get **point values** at a specific location (e.g., reflectance, NDVI, etc.), you can use the <code>GetFeatureInfo</code> request. This is often labeled as **“Identify features”** or **“feature info”** in various GIS applications.</p>

<p>Here is an example of such a request:</p>

```bash

https://sh.dataspace.copernicus.eu/ogc/wms/<INSTANCE_ID>?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetFeatureInfo&I=0&J=0&QUERY_LAYERS=NDVI&INFO_FORMAT=application/json&BBOX=38.55105530425345,-7.883667078518689,38.55269383803389,-7.885252872445627&CRS=EPSG:4326&MAXCC=100&WIDTH=1&HEIGHT=1&TIME=2017-03-16
::: {.panel-input}

```

<code>[https://sh.dataspace.copernicus.eu/ogc/wms/&lt;INSTANCE_ID&gt;?SERVICE=WMS&amp;VERSION=1.3.0&amp;REQUEST=GetFeatureInfo&amp;I=0&amp;J=0&amp;QUERY_LAYERS=NDVI&amp;INFO_FORMAT=application/json&amp;BBOX=38.55105530425345,-7.883667078518689,38.55269383803389,-7.885252872445627&amp;CRS=EPSG:4326&amp;MAXCC=100&amp;WIDTH=1&amp;HEIGHT=1&amp;TIME=2017-03-16](https://sh.dataspace.copernicus.eu/ogc/wms/&lt;INSTANCE_ID&gt;?SERVICE=WMS&amp;VERSION=1.3.0&amp;REQUEST=GetFeatureInfo&amp;I=0&amp;J=0&amp;QUERY_LAYERS=NDVI&amp;INFO_FORMAT=application/json&amp;BBOX=38.55105530425345,-7.883667078518689,38.55269383803389,-7.885252872445627&amp;CRS=EPSG:4326&amp;MAXCC=100&amp;WIDTH=1&amp;HEIGHT=1&amp;TIME=2017-03-16){target="_blank"}</code>

:::

<p>Check also the <a href="https://documentation.dataspace.copernicus.eu/APIs/SentinelHub/Statistical.html" target="_blank">Statistical API</a> for additional information.</p>
</details>

Expand Down Expand Up @@ -1206,11 +1206,32 @@ function evaluatePixel(samples) {
<p>You can add a parameter <code>GEOMETRY</code> as in this example:</p>
```bash
https://sh.dataspace.copernicus.eu/ogc/wms/<INSTANCE_ID&>?SERVICE=WMS&REQUEST=GetMap&VERSION=1.3.0&LAYERS=TRUE_COLOR&MAXCC=20&amp;WIDTH=640&HEIGHT=640&CRS=EPSG:4326&BBOX=-7.885,38.540,-7.870,38.560&GEOMETRY=POLYGON(( -7.877244 38.546511, -7.876377 38.547818, -7.871950 38.546125, -7.872611 38.545023, -7.871241 38.544475, -7.869831 38.544560, -7.866011 38.550445, -7.872323 38.552895, -7.874112 38.551451, -7.877110 38.552537, -7.878791 38.552976, -7.879413 38.553099, -7.880600 38.553320, -7.881314 38.553126, -7.882678 38.552762, -7.883951 38.552667, -7.885064 38.552160, -7.885370 38.549346, -7.877244 38.546511))
```
::: {.panel-input}
<code>https://sh.dataspace.copernicus.eu/ogc/wms/&lt;INSTANCE_ID&gt;?SERVICE=WMS&amp;REQUEST=GetMap&amp;VERSION=1.3.0&amp;LAYERS=TRUE_COLOR&amp;MAXCC=20&amp;WIDTH=640&amp;HEIGHT=640&amp;CRS=EPSG:4326<br>
&amp;BBOX=-7.885,38.540,-7.870,38.560&amp;<br>
GEOMETRY=POLYGON((<br>
-7.877244 38.546511, <br>
-7.876377 38.547818, <br>
-7.871950 38.546125, <br>
-7.872611 38.545023, <br>
-7.871241 38.544475, <br>
-7.869831 38.544560, <br>
-7.866011 38.550445, <br>
-7.872323 38.552895, <br>
-7.874112 38.551451, <br>
-7.877110 38.552537, <br>
-7.878791 38.552976, <br>
-7.879413 38.553099, <br>
-7.880600 38.553320, <br>
-7.881314 38.553126, <br>
-7.882678 38.552762, <br>
-7.883951 38.552667, <br>
-7.885064 38.552160, <br>
-7.885370 38.549346, <br>
-7.877244 38.546511))</code>
:::
<p>It is recommended to simplify geometry before passing it as a parameter to avoid exceeding the maximum number of characters in the URL.</p>
Expand Down Expand Up @@ -1238,14 +1259,17 @@ https://sh.dataspace.copernicus.eu/ogc/wms/<INSTANCE_ID&>?SERVICE=WMS&REQUEST=Ge
* Search for the location of your interest either by scrolling the map with your mouse or entering the location in the search field on the right side of your screen.
* Choose from which satellites you want to receive the data (dropdown menu on the left side of your screen under **Data Collections**).
* Select maximum **Cloud coverage percentage**.
* Select the time range by either typing the date or selecting the date from the calendar.<br>
![](FAQ_images/CustomScript1.png)
* Select the time range by either typing the date or selecting the date from the calendar.
<![](FAQ_images/run-custom-script1.png)
2. In the **Visualize** tab, choose the **Custom** (Create custom visualization) button under the Layers.
![](FAQ_images/run-custom-script2.png)
2. In the **Visualize** tab, choose the **Custom** (Create custom visualization) button under the Layers.<br>
![](FAQ_images/CustomScript2.png)
3. Open the custom script dialog by clicking on the **Custom script** tab.
3. Open the custom script dialog by clicking on the **Custom script** tab.<br>
![](FAQ_images/CustomScript3.png)
![](FAQ_images/run-custom-script3.png)
</details>
Expand All @@ -1263,7 +1287,9 @@ https://sh.dataspace.copernicus.eu/ogc/wms/<INSTANCE_ID&>?SERVICE=WMS&REQUEST=Ge
<p>Add the <code>EVALSCRIPT</code> parameter to your OGC request URL with the value of the base64 encoded script, as such: <code>evalscript=cmV0dXJuIFtCMDQqMi41LEIwMyoyLjUsQjAyKjIuNV0%3D</code>. More on custom scripts described <a href="https://documentation.dataspace.copernicus.eu/APIs/SentinelHub/Evalscript.html" target="_blank">here</a>.</p>
<p>A working WMS request from Copernicus Browser, using a [simple custom evaluation script](https://browser.dataspace.copernicus.eu/?zoom=10&lat=41.6429&lng=12.8862&themeId=DEFAULT-THEME&visualizationUrl=U2FsdGVkX1%2FdjVgXKNxsgHpvLC0Lk9xYTBFSuIxQlOH6qZOOtL3utpao5rghCRt8AHfhSUB3LFuwAZoDeBviT1Q%2BUoyJky7D6ZDKrnKwOfz3TPX8xluv1RNfpifr0lOU&evalscript=cmV0dXJuIFtCMDgqMi41LEIwNCoyLjUsQjAzKjIuNV07&datasetId=S2_L1C_CDAS&fromTime=2020-05-15T00%3A00%3A00.000Z&toTime=2020-05-15T23%3A59%3A59.999Z&cloudCoverage=30&dateMode=SINGLE#custom-script):</p>
<p>A working WMS request from Copernicus Browser, using a simple custom evaluation script</p>
<code>[https://browser.dataspace.copernicus.eu/?zoom=10&lat=41.6429&lng=12.8862&themeId=DEFAULT-THEME&visualizationUrl=U2FsdGVkX1%2FdjVgXKNxsgHpvLC0Lk9xYTBFSuIxQlOH6qZOOtL3utpao5rghCRt8AHfhSUB3LFuwAZoDeBviT1Q%2BUoyJky7D6ZDKrnKwOfz3TPX8xluv1RNfpifr0lOU&evalscript=cmV0dXJuIFtCMDgqMi41LEIwNCoyLjUsQjAzKjIuNV07&datasetId=S2_L1C_CDAS&fromTime=2020-05-15T00%3A00%3A00.000Z&toTime=2020-05-15T23%3A59%3A59.999Z&cloudCoverage=30&dateMode=SINGLE#custom-script](https://browser.dataspace.copernicus.eu/?zoom=10&lat=41.6429&lng=12.8862&themeId=DEFAULT-THEME&visualizationUrl=U2FsdGVkX1%2FdjVgXKNxsgHpvLC0Lk9xYTBFSuIxQlOH6qZOOtL3utpao5rghCRt8AHfhSUB3LFuwAZoDeBviT1Q%2BUoyJky7D6ZDKrnKwOfz3TPX8xluv1RNfpifr0lOU&evalscript=cmV0dXJuIFtCMDgqMi41LEIwNCoyLjUsQjAzKjIuNV07&datasetId=S2_L1C_CDAS&fromTime=2020-05-15T00%3A00%3A00.000Z&toTime=2020-05-15T23%3A59%3A59.999Z&cloudCoverage=30&dateMode=SINGLE#custom-script)</code>
<p>Note that the <code>LAYERS</code> parameter should be set as one of the existing layers in the configuration when using a <code>PRESET=CUSTOM</code> with a custom evalscript.</p>
Expand Down Expand Up @@ -1299,8 +1325,11 @@ return [ndvi]
<p>Scripts in Copernicus Browser are passed to Sentinel Hub service using a “GET request,” which is limited in the number of characters, depending on the browser used, between 1,000 and 4,000.</p> <p>But there is an easy way to work around this:</p>
1. Upload your script to a publicly accessible website, for example GitHub, like we do in the Custom Script repository. E.g. [LAI script](https://raw.githubusercontent.com/sentinel-hub/custom-scripts/master/sentinel-2/lai/script.js).<br>
2. Select “Use URL” and paste the URL to the script in the “Script URL” field.<br>
![](FAQ_images/Handlescripts.png)
2. Select “Use URL” and paste the URL to the script in the “Script URL” field.
![](FAQ_images/handle-long-scripts.png)
3. Click the “Refresh Evalscript” button.
</details>
Expand Down
Binary file removed FAQ_images/CustomScript1.png
Binary file not shown.
Binary file removed FAQ_images/CustomScript2.png
Binary file not shown.
Binary file removed FAQ_images/CustomScript3.png
Binary file not shown.
Binary file removed FAQ_images/Handlescripts.png
Binary file not shown.
Binary file added FAQ_images/handle-long-scripts.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added FAQ_images/run-custom-script1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added FAQ_images/run-custom-script2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added FAQ_images/run-custom-script3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b58fdb6

Please sign in to comment.