You've delivered your data to a Sentinel Hub Collection. Yay! Now let's understand how to be able to view the data within a collection and do some basic analysis within EOBrowser.
A collection is a place where data is stored. In order to visualize and derive insights from our image or image stack we need to create a Configuration. A Configuration contains Layers and these can be rendered within EO Browser or using OGC API's such as WMS, WMTS etc. A layer needs to be configured based on what the user wants to render/display. For example, I would like to display my SkySat image in True Color.
Let's take an example of Visualizing a SkySat Visual Asset that's stored in my Sentinel Hub Collection. This image should be rendered in True Color. To recap, a Collection is where the data is stored. Now to visualize the image, we need to do the following:
- Create a Configuration.
- Create compute/visualization Layers within a configuration to actually render the image, do post processing. You can have multiple Layers within a configuration.
1. Go to your Sentinel Hub Dashboard and create a New Configuration.
2. Once Configuration is creation, click on New Layer.
3. Input a Layer Name, Source, Collection Type and the Collection ID (also appears as a drop down). The Time Range of the data within the Collection is also specified in this step.
4. Lastly, add the EvalScript by clicking on the "edit" icon next to Data Processing, as shown in the screenshot above. This defines how the data should be rendered within the layer*. A repository on Evalscripts can be found here.
*With EvalScripts you can create custom visualizations or composite imagery with unique colormaps, perform complex band calculations (beyond the standard indices), and combine data sources.
Note that the True Color Evalscripts provided for SkySat data as a default and within the repository pertain to Surface Reflectance assets, which are provided in unit16 format. The scaling factor is defined as 10000 in the script due to being Surface Reflectance and hence leads to a sub-optimal rendering of the Visual asset. Let's go ahead and tweak the script to be able to view the RGB Visual Asset optimally within EO Browser.
The EvalScript to be used is below:
//VERSION=3
//True Color
function setup() {
return {
input: ["blue", "red", "green", "dataMask"],
output: { bands: 4 }
}
}
var f = 1/255
function evaluatePixel(sample) {
return [sample.red * f, sample.green * f, sample.blue * f, sample.dataMask]
}
Once you click the "Edit" icon next to Data Processing, paste the Evalscript within the Custom Script Editor.
Once you have done this, your Layer is ready to be visualized. Within the Configuration, please click on "Open in EO Browser".
When in EO Browser, please zoom to your area of interest by searching in the search bar or by panning to the area. My image is near Wembley, London. Go ahead and Select the Theme as your Configuration Name, select the Data Sources checkbox, define a Time Range within which data is present in your Collection and hit search.
The results will populate and you can click visualize.
The True Color Layer is visualized as per our EvalScript.
Image Stacks: Analysis-Ready PlanetScope
Now that we understand how to render an image, let's actually do some analysis! Let's take our next dataset, which is Analysis-Ready PlanetScope. ARPS is a stack of images that I had delivered to my Sentinel Hub Collection via the Subscriptions API. The area of interest is Hamburg, Germany and we'll discuss what we could do with this. Remember, ARPS is delivered as an analytical Surface Reflectance asset. It has 4 bands and we can do analysis on them, unlike a visual asset that only has 3 bands and digital number DN values.
Our ARPS data is within a Collection. Let's go ahead and build out a configuration so that we can visualize and conduct analysis on this data. After following the steps described above, the configuration looks like this. For ARPS the custom scripts can be found here.
Now all we need to do is Open in EO Browser. Zoom to Hamburg on the map, and select the theme and data source as ARPS and hit search.
Then, click Visualize. The layers can be seen and you can visualize them. The advantage with an EvalScript is we can render the image using a cloud mask, masking out any unusable pixels.
Now, I would like to see my favorite park. Let's zoom to it!
It's a lush green park and NDVI Stands out! Here we're obtaining statistics of NDVI over the past 3 months for the part of the park which is a large lawn. Let's now go to the NDVI layer on 30th of June, 2023 and will use the Statistics tool to compute NDVI for the past 3 month from this date.
But wait, we did not use the Cloud Filter. Meaning these statistics include values that may otherwise be unusable. Let's drag the cloud slider to mask out any unwanted pixels, taking advantage of ARPS's robust cloud mask. Much smoother!
We've seen images! What about Planetary Variables?
Now, let's see how the pattern plays out for the Soil Water Content 100m L band product. My data was delivered using Planet's Subscriptions API and delivered to a Sentinel Hub Collection. A quick look at the configuration within the Sentinel Hub dashboard shows that we've set our Layers to display Soil Water Content Data. We've also included the Derived Root Zone Soil Water Content Layer. DRZSWC is an estimate of the amount of water in the soil in the root zone: the depth range over which plant roots take up most of their water. The root zone depends on the type of vegetation, but typically covers the upper 100 cm of the soil [Stocker et al., 2023]. With satellites, we can observe soil water content (SWC) in the upper layer of the soil, typically covering the first 5 to 10 cm. To estimate SWC in the root zone from the near-surface SWC observed by satellites, we can use an exponential filter, and this is done via the EvalScript provided in this Repository.
Once the layer is loaded, we go to our AOI within the park, for which we derived NDVI values using the ARPS Dataset. We compute the SWC values for the AOI for the past three months using the Statistics tool.
It's noticed that in the period from May to June, we have a decline in SWC values until it starts going up again. We can also create a Timelapse to see how the SWC changes over time. Let's do this for our full dataset!
SWC Visualization March 1, 2023 - June 30, 2023
DRSWC Visualization March 1, 2023 - June 30, 2023
Neat, right? During dry spells when SWC values are low, the SWC values in the Root Zone are even lower. You've now seen the power of an EvalScript and how Sentinel Hub allows you to derive insights from your data!
What else can be done with a configuration you ask? Well, we can reuse Configurations for a different data Collection, or create a new Configuration based on an existing instance and visualize it in EO Browser.
Should you wish to stream data in a collection within your GIS application, you can use the Instance ID of the configuration within our OGC API supported service. Simply add a new data Collection in your GIS application (ArcGIS, QGIS, OpenLayers, Google Earth or any other app supporting standard services) and start using the data right away! Read more here.
Hopefully, this article has served as a starting point to getting familiar with Collections, Configurations and Layers and doing a bit of analysis within EO Browser. What insight's will you derive?
- To learn more about creating your own Evalscripts, please refer to the course: Introduction to Custom Scripts on the Planet Insights Platform
- EO Browser User Guide.
- More on Delivering Data to Sentinel Hub can be found in this Community post.
Comments
Article is closed for comments.