# count number of valid observations per pixel using valid data maskĬount_val_sh = CountValid('VALID_DATA', # name of existing maskĮdit: I am guessing that my request to download the masks was not that of S2Cloudless, thus I tried the following: cloud_classifier = get_s2_pixel_cloud_detector(average_over=2, dilation_size=1, all_bands=True)Īdd_clm = AddCloudMaskTask(cloud_classifier, 'BANDS', cm_size_y='80m', cm_size_x='80m',Ĭprobs_feature='CLP' # cloud prob. # validate pixels using SentinelHub's cloud detection mask and region of acquisitionĪdd_sh_valmask = AddValidDataMaskTask(SentinelHubValidData(), The result is rounded to the nearest integers. Calculates width and height in pixels for a given bbox of a given pixel resolution (in meters). Time_difference=datetime.timedelta(minutes=120),Īdditional_data=[(FeatureType.MASK, 'dataMask', 'IS_DATA'), Module for manipulation of geographical information. # s2cloudless masks and probabilities are requested via additional dataīands_feature=(FeatureType.DATA, 'BANDS'), Get satellite imagery on your table without worrying about synchronization issues, storage, processing, de-compression algorithms, meta-data or sensor bands. However, if you create a layer with NDVI values, you will require FLOAT32-supported raster layers (as NDVI values are typically between -1 and 1), which is not supported in most GIS tools out. Our API can provide actual NDVI value for any chosen pixel, as I demonstrated above. # add a request for S2 bands (downloading the data from the configurator) We make satellite data (Sentinels, Landsat and other providers) easily accessible for you to be browsed or analyzed, within our cloud GIS or within your own environment. This depends quite a bit on qht kind of application are you using. In the following scripts you can tailor the bounds of the data (0.0 and 1.0) to tweak the visualisation range. Then you can call the visualiser and you are done. Therefore the first step is to return 3 bands (or 4 if you want to make noData areas transparent). # Correspond to wavelengths BANDS-S2-L2Aīand_names= A visualiser takes values and maps them to RGB colours. The task counts number of valid observations in time-series and stores the results in the timeless mask.ĭef _init_(self, count_what, feature_name):Įopatch.add_feature(FeatureType.MASK_TIMELESS, self.name, np.count_nonzero(eopatch.mask,axis=0)) The SentinelHub's cloud mask is asumed to be found in eopatch.mask This is the code I used to download the images: class SentinelHubValidData:Ĭombine Sen2Cor's classification map with `IS_DATA` to define a `VALID_DATA_SH` mask In March 2019, Sentinel Hub processed, for the first time, more than 100 million requests that month. As a reminder, SCL is Scene classification data, based on Sen2Cor processor.This is the time interval : time_interval = It is used not just by remote sensing experts but also by hundreds of application developers, who integrate EO satellite data into solutions for precision farming, mapping, defense, oil & gas, policy making, and many more. After some empirical tests, we found that it was more efficient to make the most of the SCL band offered with Sentinel-2 L2A images and combine the CLM and SCL bands. In the example that you are showing in your post, you are using the CLM band on its own. That would essentially allow you to multiply the cloud extent.Ĭan you also confirm if the cloud masks we see through EO Browser/Sentinel Hub are calculated the same as those in your blog post, request builder etc.? If you have a workflow (for example in Python) that retrieves images using Sentinel Hub services, you could fetch the CLM (see here) band as a raster and buffer it using geospatial libraries. Sentinel Hub services are designed on a “per-pixel” approach, so you cannot extend the cloud mask directly in EO Browser. The loss of some good quality data would be more than made up for with reduced cloud noise To counteract this is there anyway the cloud masks can be applied more liberally, or multiply there existing extent by some fraction? I still think that the cloudless algorithm does a pretty good job! Clouds… the nemesis of all optical Remote Sensing experts!Īs you have noticed, it is indeed very difficult to identify 100% of the clouds in a scene with automated approaches (even more so over bright surfaces).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |